hydra: add some admin for adding/enabling/etc build machines
This commit is contained in:
@ -12,8 +12,45 @@
|
||||
<li>[% INCLUDE maybeLink uri = c.uri_for(c.controller('Admin').action_for('clearvcscache')) content = "Clear VCS caches" confirmmsg = "Are you sure you want to clear the VCS caches?" %]</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>[% INCLUDE maybeLink uri = c.uri_for(c.controller('Admin').action_for('managenews')) content = "News" %]</li>
|
||||
</ul>
|
||||
|
||||
<h2>Status</h2>
|
||||
|
||||
[% FOREACH m IN machines %]
|
||||
<table style="width: 40em;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="5">
|
||||
[% IF m.enabled == 1 %]
|
||||
[% INCLUDE maybeLink uri = c.uri_for('/admin/machine' m.hostname 'disable' ) content='-' %]
|
||||
[% ELSE %]
|
||||
[% INCLUDE maybeLink uri = c.uri_for('/admin/machine' m.hostname 'enable' ) content='+' %]
|
||||
[% END %]
|
||||
[% m.hostname %] <tt>[% FOREACH ms IN m.buildmachinesystemtypes %] [% ms.system %][% END %]</tt>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
[% idle = 1 %]
|
||||
[% FOREACH step IN steps %]
|
||||
[% IF step.machine.match('@(.*)').0 == m.hostname %]
|
||||
[% 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.outpath.match('-(.*)').0 %]</tt></td>
|
||||
<td class='right'>[% INCLUDE renderDuration duration = curTime - step.starttime %] </td>
|
||||
</tr>
|
||||
[% END %]
|
||||
[% END %]
|
||||
[% IF idle == 1 %]
|
||||
<tr><td colspan="5">Idle since [% INCLUDE renderDuration duration = curTime - m.get_column('idle') %]</td></tr>
|
||||
[% END %]
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
[% END %]
|
||||
|
||||
|
||||
[% END %]
|
||||
|
@ -334,3 +334,23 @@
|
||||
|
||||
[% END %]
|
||||
|
||||
[% BLOCK hydraStatus %]
|
||||
<table class="tablesorter">
|
||||
<thead>
|
||||
<tr><th>Machine</th><th>Job</th><th>Type</th><th>Build</th><th>Step</th><th>What</th><th>Since</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
[% FOREACH step IN steps %]
|
||||
<tr>
|
||||
<td><tt>[% IF step.machine; step.machine.match('@(.*)').0; ELSE; 'localhost'; END %]</tt></td>
|
||||
<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><a href="[% c.uri_for('/build' step.build.id 'nixlog' step.stepnr) %]">[% step.stepnr %]</a></td>
|
||||
<td><tt>[% step.outpath.match('-(.*)').0 %]</tt></td>
|
||||
<td class='right'>[% INCLUDE renderDuration duration = curTime - step.starttime %] </td>
|
||||
</tr>
|
||||
[% END %]
|
||||
</tbody>
|
||||
</table>
|
||||
[% END %]
|
||||
|
@ -16,7 +16,7 @@
|
||||
<link rel="stylesheet" href="/static/css/nixos-site.css" type="text/css" />
|
||||
<link rel="stylesheet" href="/static/css/logfile.css" type="text/css" />
|
||||
<script type="text/javascript" src="/static/js/jquery/js/jquery-1.4.2.min.js"></script>
|
||||
<script type="text/javascript" src="/static/js/jquery/js/jquery-ui-1.8.4.custom.min.js"></script>
|
||||
<script type="text/javascript" src="/static/js/jquery/js/jquery-ui-1.8.5.custom.min.js"></script>
|
||||
<script type="text/javascript" src="/static/js/tablesorter/jquery.tablesorter.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
@ -24,7 +24,7 @@
|
||||
</ul>
|
||||
[% END %]
|
||||
|
||||
[% IF project %]
|
||||
[% IF project || admin %]
|
||||
|
||||
<div id="left-bar">
|
||||
|
||||
@ -73,6 +73,17 @@
|
||||
title = "Errors" %]
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
[% IF admin %]
|
||||
[% WRAPPER makeSubMenu title="Admin" %]
|
||||
[% INCLUDE makeLink
|
||||
uri = c.uri_for(c.controller('Admin').action_for('machines'))
|
||||
title = "Machines" %]
|
||||
[% INCLUDE makeLink
|
||||
uri = c.uri_for(c.controller('Admin').action_for('managenews'))
|
||||
title = "News" %]
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
</div>
|
||||
[% END %]
|
||||
|
@ -3,22 +3,6 @@
|
||||
|
||||
<h1>Hydra Status</h1>
|
||||
|
||||
<table class="tablesorter">
|
||||
<thead>
|
||||
<tr><th>Machine</th><th>Type</th><th>Build</th><th>Step</th><th>What</th><th>Since</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
[% FOREACH step IN steps %]
|
||||
<tr>
|
||||
<td><tt>[% IF step.machine; step.machine.match('@(.*)').0; ELSE; 'localhost'; END %]</tt></td>
|
||||
<td><tt>[% step.system %]</tt></td>
|
||||
<td><a href="[% c.uri_for('/build' step.build.id) %]">[% step.build.id %]</a></td>
|
||||
<td><a href="[% c.uri_for('/build' step.build.id 'nixlog' step.stepnr) %]">[% step.stepnr %]</a></td>
|
||||
<td><tt>[% step.outpath.match('-(.*)').0 %]</tt></td>
|
||||
<td class='right'>[% INCLUDE renderDuration duration = curTime - step.starttime %] </td>
|
||||
</tr>
|
||||
[% END %]
|
||||
</tbody>
|
||||
</table>
|
||||
[% INCLUDE hydraStatus %]
|
||||
|
||||
[% END %]
|
||||
|
Reference in New Issue
Block a user