* Some jQuery / CSS hackery.
[?]
Oct 28, 2008, 3:34 PM
UVMFS73TI6RARMAAGY2UVS5LCPZUKLQECXQQVER4F7S4BNUXQQ3ACDependencies
- [2]
ELCI5T2A* Show the latest build for each job. - [3]
J5UVLXOK* Start of a basic Catalyst web interface. - [4]
E2ZY5TE5
Change contents
- edit in src/HydraFrontend/lib/HydraFrontend/Controller/Root.pm at line 36
}sub job :Local {my ( $self, $c, $jobName ) = @_;$c->stash->{template} = 'job.tt';$c->stash->{jobName} = $jobName;$c->stash->{builds} = [$c->model('DB::Builds')->search({name => $jobName}, {order_by => "timestamp DESC"})]; - replacement in src/HydraFrontend/root/hydra.css at line 153
}[3.10676]}/* Sortable tables */table.tablesorter {text-align: left;}table.tablesorter thead tr .header {background-image: url(/static/js/tablesorter/themes/blue/bg.gif);background-repeat: no-repeat;background-position: center right;cursor: pointer;}table.tablesorter thead tr .headerSortUp {background-image: url(/static/js/tablesorter/themes/blue/asc.gif);}table.tablesorter thead tr .headerSortDown {background-image: url(/static/js/tablesorter/themes/blue/desc.gif);}table.tablesorter thead tr .headerSortDown, table.tablesorter thead tr .headerSortUp {background-color: #ffe000;} - edit in src/HydraFrontend/root/index.tt at line 2
[% USE date %] - replacement in src/HydraFrontend/root/index.tt at line 5
<table><tr><th></th><th>Id</th><th>Attribute name</th><th>Timestamp</th><th>Description</th></tr>[% FOREACH build IN latestBuilds -%][% INCLUDE "short-build-info.tt" %][% END -%]<table class="tablesorter"><thead><tr><th></th><th>Id</th><th>Job</th><th>Timestamp</th><th>Description</th></tr></thead><tbody>[% FOREACH build IN latestBuilds -%][% INCLUDE "short-build-info.tt" %][% END -%]</tbody> - replacement in src/HydraFrontend/root/index.tt at line 20[3.10798]→[3.10798:10806](∅→∅),[3.10806]→[3.0:93](∅→∅),[3.93]→[2.673:749](∅→∅),[2.749]→[3.11151:11164](∅→∅),[3.11151]→[3.11151:11164](∅→∅)
<table><tr><th></th><th>Id</th><th>Attribute name</th><th>Timestamp</th><th>Description</th></tr>[% FOREACH build IN allBuilds -%][% INCLUDE "short-build-info.tt" %][% END -%]<table class="tablesorter"><thead><tr><th></th><th>#</th><th>Job</th><th>Timestamp</th><th>Description</th></tr></thead><tbody>[% FOREACH build IN allBuilds -%][% INCLUDE "short-build-info.tt" %][% END -%]</tbody> - file addition: job.tt[3.7332]
[% WRAPPER layout.tt title="Hydra Overview" %]<h1>All builds for job <tt>[% jobName %]</tt></h1><table><tr><th></th><th>Id</th><th>Job</th><th>Timestamp</th><th>Description</th></tr>[% FOREACH build IN builds -%][% INCLUDE "short-build-info.tt" %][% END -%]</table>[% END %] - edit in src/HydraFrontend/root/layout.tt at line 11
<script type="text/javascript" src="/static/js/tablesorter/jquery-latest.js"></script><script type="text/javascript" src="/static/js/tablesorter/jquery.tablesorter.js"></script><script type="text/javascript">$(document).ready(function(){$("table.tablesorter").tablesorter();});</script> - file addition: short-build-info.tt[3.7332]
[% USE date %]<tr><td>[% IF build.buildstatus == 0 %]<img src="/static/images/success.gif" />[% ELSE %]<img src="/static/images/failure.gif" />[% END %]</td><td><a href="[% c.uri_for('/build' build.id) %]">[% build.id %]</a></td><td><a href="[% c.uri_for('/job' build.name) %]"><tt>[% build.name %]</tt></a></td><td>[% date.format(build.timestamp, '%Y-%m-%d %H:%M:%S') %]</td><td>[% build.description %]</td></tr>