forked from lix-project/hydra
BuildDiff: move cmdBuilds from Controller/JobsetEval
This commit is contained in:
parent
0c51f3ca7d
commit
ec98bdaaaa
|
@ -64,18 +64,9 @@ sub view_GET {
|
||||||
|
|
||||||
$c->stash->{otherEval} = $eval2 if defined $eval2;
|
$c->stash->{otherEval} = $eval2 if defined $eval2;
|
||||||
|
|
||||||
sub cmpBuilds {
|
|
||||||
my ($left, $right) = @_;
|
|
||||||
return $left->get_column('job') cmp $right->get_column('job')
|
|
||||||
|| $left->get_column('system') cmp $right->get_column('system')
|
|
||||||
}
|
|
||||||
|
|
||||||
my @builds = $eval->builds->search($filter, { columns => [@buildListColumns] });
|
my @builds = $eval->builds->search($filter, { columns => [@buildListColumns] });
|
||||||
my @builds2 = defined $eval2 ? $eval2->builds->search($filter, { columns => [@buildListColumns] }) : ();
|
my @builds2 = defined $eval2 ? $eval2->builds->search($filter, { columns => [@buildListColumns] }) : ();
|
||||||
|
|
||||||
@builds = sort { cmpBuilds($a, $b) } @builds;
|
|
||||||
@builds2 = sort { cmpBuilds($a, $b) } @builds2;
|
|
||||||
|
|
||||||
buildDiff(@builds, @builds2);
|
buildDiff(@builds, @builds2);
|
||||||
|
|
||||||
$c->stash->{full} = ($c->req->params->{full} || "0") eq "1";
|
$c->stash->{full} = ($c->req->params->{full} || "0") eq "1";
|
||||||
|
|
|
@ -15,6 +15,15 @@ our @EXPORT = qw(
|
||||||
|
|
||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
|
|
||||||
|
sub cmpBuilds {
|
||||||
|
my ($left, $right) = @_;
|
||||||
|
return $left->get_column('job') cmp $right->get_column('job')
|
||||||
|
|| $left->get_column('system') cmp $right->get_column('system')
|
||||||
|
}
|
||||||
|
|
||||||
|
# $builds = sort { cmpBuilds($a, $b) } $builds;
|
||||||
|
# $builds2 = sort { cmpBuilds($a, $b) } $builds2;
|
||||||
|
|
||||||
sub buildDiff {
|
sub buildDiff {
|
||||||
my ($builds, $builds2) = @_;
|
my ($builds, $builds2) = @_;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue