Handle SSH hosts without a @

[?]
Jun 17, 2015, 11:49 AM
XO72X6PQOB2636JAVQTXC2WC7BYZTYVYTQDAWYFXZIQYCDIP6ALQC

Dependencies

  • [2] J4R2VCPP Fix showing build steps in the machine status page
  • [3] JPTXSWBO Show whether a job still exists
  • [4] FFEH62DE Machine status page now looks much better and more consistent with rest of Hydra
  • [5] O757ISIS Remove unused function
  • [6] ZH6B56XR Try harder to find build logs
  • [7] OZDDUMVP Automatically chomp all [%...%] directives
  • [8] AXU7D4PD Machine status page: Add link to build step
  • [9] Y6AHH4TH Remove the logfile and logSize columns from the database
  • [10] XKXMU5PV Ellipsize long jobset/job names to prevent bootstrap navbar breakage
  • [11] HOMDMC3K Handle utf-8 properly
  • [12] HTL6HIBM machine-status: Read /etc/nix.machines instead of using the BuildMachines table
  • [13] V6S6OYIA Formatting tweaks
  • [14] SMCOU72F hydra: add some admin for adding/enabling/etc build machines
  • [*] J5UVLXOK * Start of a basic Catalyst web interface.
  • [*] ZWCTAZGL added newsitems, added some admin options to clear various caches.

Change contents

  • replacement in src/lib/Hydra/View/TT.pm at line 12
    [4.41][3.0:74]()
    expose_methods => [qw/buildLogExists buildStepLogExists jobExists/]);
    [4.41]
    [4.2156]
    expose_methods => [qw/buildLogExists buildStepLogExists jobExists stripSSHUser/]);
  • edit in src/lib/Hydra/View/TT.pm at line 24
    [4.2517]
    [4.166]
    }
    sub stripSSHUser {
    my ($self, $c, $name) = @_;
    if ($name =~ /^.*@(.*)$/) {
    return $1;
    } else {
    return $name;
    }
  • replacement in src/root/machine-status.tt at line 16
    [4.222][2.0:62]()
    [% name = m.key ? m.key.match('@(.*)').0 : "localhost" %]
    [4.222]
    [4.9525]
    [% name = m.key ? stripSSHUser(m.key) : "localhost" %]
  • replacement in src/root/machine-status.tt at line 30
    [4.811][2.392:473]()
    [% name2 = step.machine ? step.machine.match('@(.*)').0 : "localhost" %]
    [4.811]
    [2.473]
    [% name2 = step.machine ? stripSSHUser(step.machine) : "localhost" %]