machines: Read /etc/nix.machines instead of using the BuildMachines table
[?]
Mar 4, 2013, 9:03 PM
IQ5NESOOULVKGJUTRI5OWLMNCSIASMBKHNVD6ANU4W3ROYWBGCDACDependencies
- [2]
JARRBLZDBootstrapify the Hydra forms (except the project and jobset edit pages) - [3]
SMCOU72Fhydra: add some admin for adding/enabling/etc build machines - [4]
3PNG7NIBRemove trailing whitespace - [5]
SZYDW2DGhydra: added some user admin - [6]
R2PON6R7Allow non-admin users to see the machine status page - [7]
SMTMFEKEhydra: add missing templates - [*]
ZWCTAZGLadded newsitems, added some admin options to clear various caches.
Change contents
- replacement in src/lib/Hydra/Controller/Admin.pm at line 59
$c->stash->{machines} = [$c->model('DB::BuildMachines')->search({}, {order_by => "hostname"})];$c->stash->{systems} = [$c->model('DB::SystemTypes')->search({}, {select => ["system"], order_by => "system" })];$c->stash->{nixMachines} = nixMachines($c);$c->stash->{nixMachinesWritable} = (-e "/etc/nix.machines" && -w "/etc/nix.machines");$c->stash->{machines} = getMachines; - replacement in src/root/machines.tt at line 11
[% FOREACH s IN systems %]<th>[% s.system %]</th>[% END %]<th>Systems</th> - replacement in src/root/machines.tt at line 17[3.2884]→[3.2884:3162](∅→∅),[3.3162]→[2.13417:13549](∅→∅),[2.13549]→[3.3308:3821](∅→∅),[3.3308]→[3.3308:3821](∅→∅)
<td><input type="checkbox" name="enabled" [% IF m.enabled == 1 %]CHECKED[% END %] onclick="window.location='[% IF m.enabled == 1 %][%c.uri_for('/admin/machine' m.hostname 'disable' )%][% ELSE %][%c.uri_for('/admin/machine' m.hostname 'enable' )%][% END %]'"/></td><td><a href="[% c.uri_for(c.controller('Admin').action_for('machine_edit'), [m.hostname]) %]">[% m.hostname %]</a></td><td>[% m.maxconcurrent %]</td><td>[% m.speedfactor %]</td>[% FOREACH s IN systems %]<td>[% checked = false %][% FOREACH ms IN m.buildmachinesystemtypes %][% checked = ms.system == s.system %][% BREAK IF checked %][% END %]<input type="checkbox" name="system" DISABLED [% IF checked %]CHECKED[% END %]/></td>[% END %]<td><input type="checkbox" name="enabled" [% IF m.value.maxJobs > 0 %]CHECKED[% END %] disabled="true" /></td><td>[% m.key %]</a></td><td>[% m.value.maxJobs %]</td><td>[% m.value.speedFactor %]</td><td>[% comma=0; FOREACH system IN m.value.systemTypes %][% IF comma; %], [% ELSE; comma = 1; END; system; END %]</td> - edit in src/root/machines.tt at line 30
<p><a class="btn" href="[% c.uri_for(c.controller('Admin').action_for('create_machine')) %]"><i class="icon-plus"></i> Add a new machine</a></p>