Formatting tweaks

[?]
Feb 20, 2013, 3:47 PM
V6S6OYIAW3ZCBP6UHUYAZGG4P237WBB6HDG5NQIF3E5YFDTQRA4AC

Dependencies

  • [2] 4WZQW2N6 Fix indentation and get rid of some unnecessary whitespace in the output
  • [3] PMNWRTGJ Add multiple output support
  • [4] ZWCTAZGL added newsitems, added some admin options to clear various caches.
  • [5] S5PV6IIM * Represent jobs explicitly in the DB.
  • [6] JARRBLZD Bootstrapify the Hydra forms (except the project and jobset edit pages)
  • [7] 6FXGLP7T * Render durations nicely.
  • [8] SMCOU72F hydra: add some admin for adding/enabling/etc build machines
  • [9] FFEH62DE Machine status page now looks much better and more consistent with rest of Hydra
  • [10] NVEFBXAM hydra: order machines by enabled/disabled, add green and red color for enabled/disabled
  • [*] IK53RV4V

Change contents

  • replacement in src/root/common.tt at line 57
    [2.1084][2.1084:1272]()
    IF duration >= 24 * 60 * 60; duration div (24 * 60 * 60) %]d[% END;
    IF duration >= 60 * 60; duration div (60 * 60) % 24 %]h[% END;
    IF duration >= 60; duration div 60 % 60 %]m[% END;
    [2.1084]
    [2.1272]
    IF duration >= 24 * 60 * 60; duration div (24 * 60 * 60) %]d [% END;
    IF duration >= 60 * 60; duration div (60 * 60) % 24 %]h [% END;
    IF duration >= 60; duration div 60 % 60 %]m [% END;
  • replacement in src/root/machine-status.tt at line 5
    [3.77][3.9468:9496](),[3.9393][3.9468:9496]()
    [% FOREACH m IN machines %]
    [3.77]
    [3.9525]
    [% FOREACH m IN machines %]
  • replacement in src/root/machine-status.tt at line 7
    [3.9537][3.9537:9550](),[3.9550][3.78:107](),[3.107][3.9579:9619](),[3.158][3.9579:9619](),[3.9579][3.9579:9619](),[3.9619][3.108:239](),[3.239][3.9731:9758](),[3.9731][3.9731:9758](),[3.9758][3.240:395](),[3.395][3.9896:10041](),[3.9896][3.9896:10041]()
    <tr>
    <th colspan="5">
    [% IF m.enabled == 1 %]
    <a class="btn btn-success btn-mini" href="[% c.uri_for('/admin/machine' m.hostname 'disable' ) %]">Running</a>
    [% ELSE %]
    <a class="btn btn-danger btn-mini" href="[% c.uri_for('/admin/machine' m.hostname 'enable' ) %]">Stopped</a>
    [% END %]
    [% m.hostname %] <tt>[% FOREACH ms IN m.buildmachinesystemtypes %] [% ms.system %][% END %]</tt>
    </th>
    </tr>
    [3.9537]
    [3.10041]
    <tr>
    <th colspan="5">
    [% IF m.enabled == 1 %]
    <a class="btn btn-success btn-mini" href="[% c.uri_for('/admin/machine' m.hostname 'disable' ) %]">Running</a>
    [% ELSE %]
    <a class="btn btn-danger btn-mini" href="[% c.uri_for('/admin/machine' m.hostname 'enable' ) %]">Stopped</a>
    [% END %] <tt>[% m.hostname %]</tt> (<tt>[% comma=0; FOREACH ms IN m.buildmachinesystemtypes %][% IF comma; %], [% ELSE; comma = 1; END; ms.system; END %])</tt>
    </th>
    </tr>
  • replacement in src/root/machine-status.tt at line 18
    [3.10066][3.10066:10117]()
    [% idle = 1 %]
    [% FOREACH step IN steps %]
    [3.10066]
    [3.10117]
    [% idle = 1 %]
    [% FOREACH step IN steps %]
  • replacement in src/root/machine-status.tt at line 21
    [3.10178][3.10178:10531](),[3.10531][3.11198:11268](),[3.11268][3.10601:10724](),[3.10601][3.10601:10724]()
    [% idle = 0 %]
    <tr>
    <td><tt>[% INCLUDE renderFullJobName project = step.build.project.name jobset = step.build.jobset.name job = step.build.job.name %]</tt></td>
    <td><tt>[% step.system %]</tt></td>
    <td><a href="[% c.uri_for('/build' step.build.id) %]">[% step.build.id %]</a></td>
    <td><tt>[% step.drvpath.match('-(.*)').0 %]</tt></td>
    <td class='right'>[% INCLUDE renderDuration duration = curTime - step.starttime %] </td>
    </tr>
    [3.10178]
    [3.10724]
    [% idle = 0 %]
    <tr>
    <td><tt>[% INCLUDE renderFullJobName project = step.build.project.name jobset = step.build.jobset.name job = step.build.job.name %]</tt></td>
    <td><tt>[% step.system %]</tt></td>
    <td><a href="[% c.uri_for('/build' step.build.id) %]">[% step.build.id %]</a></td>
    <td><tt>[% step.drvpath.match('-(.*)').0 %]</tt></td>
    <td class='right'>[% INCLUDE renderDuration duration = curTime - step.starttime %] </td>
    </tr>
  • replacement in src/root/machine-status.tt at line 30
    [3.10742][3.10742:10913]()
    [% END %]
    [% IF idle == 1 %]
    <tr><td colspan="5">Idle since [% INCLUDE renderDuration duration = curTime - m.get_column('idle') %]</td></tr>
    [% END %]
    [3.10742]
    [3.10913]
    [% END %]
    [% IF idle == 1 %]
    <tr><td colspan="5">Idle since [% INCLUDE renderDuration duration = curTime - m.get_column('idle') %]</td></tr>
    [% END %]
  • replacement in src/root/machine-status.tt at line 35
    [3.10926][3.396:406]()
    [% END %]
    [3.10926]
    [3.10926]
    [% END %]