Ellipsize long jobset/job names to prevent bootstrap navbar breakage

[?]
Apr 26, 2013, 11:23 AM
XKXMU5PVXDNCWV6JDO2VWHB4HRAXI3H4ADRSTBJ227WIJBLHRFJAC

Dependencies

  • [2] OZDDUMVP Automatically chomp all [%...%] directives
  • [3] JZVRK5QJ Group some menu items together under a "Status" menu
  • [4] J5UVLXOK * Start of a basic Catalyst web interface.
  • [5] QL55ECJ6 - adapted ui for hydra, more in line with nixos.org website
  • [6] 4JS4DWHD All/recent builds -> Latest builds
  • [7] Y6AHH4TH Remove the logfile and logSize columns from the database
  • [8] 3PNG7NIB Remove trailing whitespace
  • [9] OEPUOUNB Using twitter bootstrap for more consistent looks for Hydra

Change contents

  • replacement in src/lib/Hydra/View/TT.pm at line 11
    [2.41][4.9720:9761](),[4.9720][4.9720:9761]()
    expose_methods => [qw/log_exists/]);
    [2.41]
    [4.6867]
    expose_methods => [qw/log_exists ellipsize/]);
  • edit in src/lib/Hydra/View/TT.pm at line 19
    [4.6919]
    [4.6919]
    sub ellipsize {
    my ($self, $c, $s, $n) = @_;
    return length $s <= $n ? $s : substr($s, 0, $n - 3) . "...";
    }
  • replacement in src/root/topbar.tt at line 64
    [4.12283][3.657:720]()
    [% WRAPPER makeSubMenu title=("Jobset: " _ jobset.name) %]
    [4.12283]
    [4.12360]
    [% WRAPPER makeSubMenu title=("Jobset: " _ ellipsize(jobset.name, 30)) %]
  • replacement in src/root/topbar.tt at line 112
    [4.13499][4.13499:13556]()
    [% WRAPPER makeSubMenu title=("Job: " _ job.name) %]
    [4.13499]
    [4.13556]
    [% WRAPPER makeSubMenu title=("Job: " _ ellipsize(job.name, 30)) %]