Don't show how long a machine has been idle

[?]
Jul 10, 2015, 1:34 PM
UFFPFIXSKKIWSUHC6D4YPUZRNZJV2YW5V62L6ZQGMY7B3YNQJ43QC

Dependencies

  • [2] SQINIEM2 Fix colspan
  • [3] HTL6HIBM machine-status: Read /etc/nix.machines instead of using the BuildMachines table
  • [4] RFGPN7U7 Machine status: Don't show removed machines anymore
  • [5] 36ZTCZ4F Add basic Persona support
  • [6] SMCOU72F hydra: add some admin for adding/enabling/etc build machines
  • [7] BZUB3ZSH Use get_column for 'as' column (max_stoptime).
  • [8] V6S6OYIA Formatting tweaks
  • [9] J4R2VCPP Fix showing build steps in the machine status page
  • [*] J5UVLXOK * Start of a basic Catalyst web interface.
  • [*] ZWCTAZGL added newsitems, added some admin options to clear various caches.

Change contents

  • edit in src/lib/Hydra/Controller/Root.pm at line 113
    [3.61][3.61:396](),[3.82][3.346:352](),[3.396][3.346:352](),[3.346][3.346:352]()
    # Get the last finished build step for each machine.
    foreach my $m (keys %{$machines}) {
    my $idle = $c->model('DB::BuildSteps')->find(
    { machine => "$m", stoptime => { '!=', undef } },
    { order_by => 'stoptime desc', rows => 1 });
    ${$machines}{$m}{'idle'} = $idle ? $idle->stoptime : 0;
    }
  • replacement in src/root/machine-status.tt at line 44
    [3.1374][3.1699:1730](),[3.1730][2.0:112](),[2.112][3.1844:1863](),[3.546][3.1844:1863](),[3.1844][3.1844:1863](),[3.1863][2.113:164](),[2.164][3.1915:1933](),[3.664][3.1915:1933](),[3.1915][3.1915:1933]()
    [% IF m.value.idle %]
    <tr><td colspan="6">Idle for [% INCLUDE renderDuration duration = curTime - m.value.idle %]</td></tr>
    [% ELSE %]
    <tr><td colspan="6">Never used</td></tr>
    [% END %]
    [3.1374]
    [3.1496]
    <tr><td colspan="6">Idle</td></tr>