The per-system presentation doesn't make much sense any more given issue #60. It should be replaced by (say) a grid showing each job per evaluation.
J3RYO2CUWIOO7OHRHULCZZRESUJB6W4F3GD2G7PK3V6WHKPIHWWQC
6GEU36HWK66LK3IY37HZOTJI5HOXJRUHIEYGYSVSIF57YBUEATRAC
LZVO64YG43JD7YMZSCTZNOBS5ROZA4FMPKJW2YOMHX2V5PTGBVWQC
QTC3SYBMNNTPZHQGXRMV5GU5KDODGXPIM3TIGWBAF7HDKNDKTCXQC
3HZY24CX4U2TO74HOY4YX3LBJIYF4DLXHCIY7J2RASAC4COMSMZAC
6QRHXIM3XHCDLSIIBEGETDV67V6LTV55QMHC64ZPBMLTAECM5N3QC
Q4VDOA762MDHLJKNJMPLHFYRRACCT3DQXF66ZTVMETZCR52B72OQC
4UUKWXDFP2CBW6MJCBIOROQZXZDJPWJWDCKYTXBFKNCGVMJ32BJQC
VH5ZABDRP565VZIG55YHNYYPST53NQ2J6YM362NSLXCAHI5WPH4AC
KG5AMUMGZA53FMA35K3KYOPJTNG3BKWDFWDPVXJ6XGG2GJJRI2LAC
UMFB2767NMAG46NAG3XHMYQMCLF5TMVN46SST4AM2CFUEMNZH3WQC
RWFCW6ZNIE24XTEQUK5Y37K42BQER7EDGSSD4GQNFTGO5V4TY72QC
TFK74CQRYCOR2RAUZ6LATA3IJVR7QCWSPCMTXCJPPDPIRS7D5UTQC
3PNG7NIBQQURUUPRVQXYL342OT7JUUYOMY2JJNP6YDX7SYJDZMYAC
JXPHAZMVKLQZ6NHALF3IH4EP34ZGP7QW75OMUTAJYK4YGU3FRGOAC
6ABZ4GQYFKFAR6MSBMOV3E5Z3KE55JZPE2AXCQI6AN4IWWAZI6GQC
ZI535LI6PJMKSOBJE33B3RRZ5S2JVTR3XPUDTSXJW6BZNTAHS3GQC
CQTN62OHT4DY35E2MJEG7GFTVNEE5KRDMV6ASBQLBHN7BUDK7WHAC
TNMOG2ZQTXJJ6TEPEDB6D4XPIIGMAV3DUDWO33WD23CGDVT4LO2QC
TJPIS3UPRE4ZIPXGRO7B4KOPR7P6UDYWUKCNY6UHJQEQDXWS4XVAC
D5QIOJGPKQJIYBUCSC3MFJ3TXLPNZ2XMI37GXMFRVRFWWR2VMTFAC
OX6NYJDVCDX2UCJ4QQMTRJVZ535NOMCJGYCHDLCADJPQI7RMCXPQC
ODNCGFQ5FPKFI624BVMLW7PJ2EFJOR3TY66OCZM42UNNTWBCF2TQC
}
}
sub status_tab : Chained('jobsetChain') PathPart('status-tab') Args(0) {
my ($self, $c) = @_;
$c->stash->{template} = 'jobset-status-tab.tt';
# FIXME: use latest eval instead of iscurrent.
$c->stash->{systems} =
[ $c->stash->{jobset}->builds->search({ iscurrent => 1 }, { select => ["system"], distinct => 1, order_by => "system" }) ];
# status per system
my @systems = ();
foreach my $system (@{$c->stash->{systems}}) {
push(@systems, $system->system);
}
my @select = ();
my @as = ();
push(@select, "job"); push(@as, "job");
foreach my $system (@systems) {
push(@select, "(select buildstatus from Builds b where b.id = (select max(id) from Builds t where t.project = me.project and t.jobset = me.jobset and t.job = me.job and t.system = '$system' and t.iscurrent = 1 ))");
push(@as, $system);
push(@select, "(select b.id from Builds b where b.id = (select max(id) from Builds t where t.project = me.project and t.jobset = me.jobset and t.job = me.job and t.system = '$system' and t.iscurrent = 1 ))");
push(@as, "$system-build");
$c->stash->{activeJobsStatus} = [
$c->model('DB')->resultset('ActiveJobsForJobset')->search(
{},
{ bind => [$c->stash->{project}->name, $c->stash->{jobset}->name]
, select => \@select
, as => \@as
, order_by => ["job"]
}) ];
[% PROCESS common.tt %]
<table class="table table-striped table-condensed">
<thead><tr><th>Job</th>[% FOREACH s IN systems %]<th>[% s.system %]</th>[% END %]</tr></thead>
<tbody>
[% FOREACH j IN activeJobsStatus %]
<tr>
<td>[% INCLUDE renderJobName project=project.name jobset = jobset.name job = j.get_column('job') %]</td>
[% FOREACH s IN systems %]
[% system = s.system %]
[% systemStatus = j.get_column(system) %]
<td class="centered">
[% IF systemStatus != undef %]
<a href="[% c.uri_for('/build' j.get_column(system _ '-build') ) %]">
[% INCLUDE renderBuildStatusIcon buildstatus=systemStatus size=16 %]
</a>
[% END %]
</td>
[% END %]
</tr>
[% END %]
</tbody>
</table>