my $sortby = $query->param('sortby') || 'nosort';
if ($sortby eq 'name')
{
- $sort_clause = 'lower(sysname),';
+ $sort_clause = 'lower(b.sysname),';
}
elsif ($sortby eq 'os')
{
- $sort_clause = 'lower(operating_system), os_version desc,';
+ $sort_clause = 'lower(b.operating_system), b.os_version desc,';
}
elsif ($sortby eq 'compiler')
{
- $sort_clause = "lower(compiler), compiler_version,";
+ $sort_clause = "lower(b.compiler), b.compiler_version,";
}
elsif ($sortby eq 'namenobranch')
{
- $presort_clause = "lower(sysname), snapshot desc,"
+ $presort_clause = "lower(b.sysname), b.snapshot desc,"
}
my $db = DBI->connect($dsn,$dbuser,$dbpass,{pg_expand_array => 0})
my $statement =<<EOS;
- select timezone('GMT'::text, now())::timestamp(0) without time zone - b.snapshot AS when_ago, b.*
+ select timezone('GMT'::text,
+ now())::timestamp(0) without time zone - b.snapshot AS when_ago,
+ b.*,
+ d.stage as current_stage
from nrecent_failures_db_data b
+ left join dashboard_mat d
+ on (d.sysname = b.sysname and d.branch = b.branch)
order by $presort_clause
- branch = 'HEAD' desc,
- branch desc,
+ b.branch = 'HEAD' desc,
+ b.branch desc,
$sort_clause
- snapshot desc
+ b.snapshot desc
EOS
;
.status, .detail { border-bottom: 1px #fff solid; }
tr.last td { border-bottom: 1px #aaa solid; }
-.pass td.status, .pass td.detail { background: #6f6; }
-.warn td.status, .warn td.detail { background: #fc3; }
-.warnx td.status, .warn td.detail { background: #f99; }
-.fail td.status, .fail td.detail { background: #f66; }
+.pass td.status, .pass td.detail, td.pass { background: #6f6; }
+.warn td.status, .warn td.detail, td.warn { background: #fc3; }
+.warnx td.status, .warn td.detail, td.warnx { background: #f99; }
+.fail td.status, .fail td.detail, td.fail { background: #f66; }
body.history th { text-align: right; }
body.application table { margin: 0 auto; }
body.application th { text-align: right; }
<tr><th colspan="2">Alias</th><th>System</th><th>Status</th><th>Flags</th></tr>
[% END %]
<tr [% PROCESS cl bgfor=row.stage %]>
- <td><a
+ <td [% PROCESS cl bgfor=row.current_stage %]><a
href="show_history.pl?nm=[% row.sysname %]&br=[% row.branch %]"
title="History"
>[% row.sysname %]</a></td>