Transpose the aggregate constituents table

[?]
Aug 27, 2013, 1:45 PM
EVYSAFB2LYZWBCFCEZSV6JVGRMYN3ALIZCBZG3IZVUDUXCLFYELAC

Dependencies

  • [2] WYMEG4VP Make some more tables clickable
  • [3] 3K53ZLNX Don't break certain table columns
  • [4] CQQSJLON On aggregate job pages, show a matrix showing all the constituent builds
  • [5] GNIEG2GC * Disambiguate jobs by jobset name. I.e. jobs with the same name in
  • [6] DEMSSSB2 * Controller for jobs which inherits all actions in ListBuilds. So
  • [7] WGUKOIQZ Fix indentation
  • [8] CQTN62OH Die tabs die
  • [9] 4WZQW2N6 Fix indentation and get rid of some unnecessary whitespace in the output
  • [*] IK53RV4V
  • [*] ODNCGFQ5 * Improved the navigation bar: don't include all projects (since that
  • [*] J5UVLXOK * Start of a basic Catalyst web interface.
  • [*] KKJNJHO5 Update bootstrap to 2.0.3
  • [*] PZL3SZM3 Give every page a consistent title
  • [*] S5GCSCNS Update bootstrap to 2.3.1
  • [*] D5QIOJGP * Move everything up one directory.

Change contents

  • replacement in src/lib/Hydra/Controller/Job.pm at line 43
    [4.234][4.234:357]()
    { aggregate => { -in => $job->builds->search({}, { columns => ["id"], order_by => "id desc", rows => 10 })->as_query } },
    [4.234]
    [4.357]
    { aggregate => { -in => $job->builds->search({}, { columns => ["id"], order_by => "id desc", rows => 15 })->as_query } },
  • replacement in src/lib/Hydra/Controller/Job.pm at line 54
    [4.681][4.681:739]()
    $aggregates->{$b->get_column('aggregate')}->{$jobName} =
    [4.681]
    [4.739]
    $aggregates->{$b->get_column('aggregate')}->{constituents}->{$jobName} =
  • edit in src/lib/Hydra/Controller/Job.pm at line 57
    [4.852]
    [4.852]
    }
    foreach my $agg (keys %$aggregates) {
    # FIXME: could be done in one query.
    $aggregates->{$agg}->{build} =
    $c->model('DB::Builds')->find({id => $agg}, {columns => [@buildListColumns]}) or die;
  • replacement in src/root/common.tt at line 23
    [5.731][2.0:116]()
    <a [% IF inRow %]class="row-link"[% END %] href="[% c.uri_for('/job' project jobset job) %]"><tt>[% job %]</tt></a>
    [5.731]
    [5.807]
    <a [% IF inRow %]class="row-link"[% END %] href="[% c.uri_for('/job' project jobset job) %]">[% job %]</a>
  • replacement in src/root/job.tt at line 31
    [4.1185][4.1185:1864]()
    <table class="table table-striped table-condensed">
    <thead>
    <tr>
    <th>#</th>
    [% FOREACH j IN constituentJobs %]
    <th>[% HTML.escape(j) %]</th>
    [% END %]
    </tr>
    </thead>
    <tbody>
    [% FOREACH agg IN aggregates.keys.nsort.reverse %]
    <tr>
    <td><a class="row-link" href="[% c.uri_for('/build' agg) %]">[% agg %]</a></td>
    [% FOREACH j IN constituentJobs %]
    <td>
    [% r = aggregates.$agg.$j; IF r.id %]
    <a href="[% c.uri_for('/build' r.id) %]">
    [% INCLUDE renderBuildStatusIcon size=16 build=r %]
    </a>
    [% END %]
    </td>
    [% END %]
    </tr>
    [% END %]
    </tbody>
    </table>
    <hr/>
    [4.1185]
    [4.1864]
    <div class="well well-small">This is an <em>aggregate job</em>:
    its success or failure is determined entirely by the result of
    building its <em>constituent jobs</em>. The table below shows
    the status of each constituent job for the [%
    aggregates.keys.size %] most recent builds of the
    aggregate.</div>
  • replacement in src/root/job.tt at line 38
    [4.1867][4.1867:1925]()
    <table class="table table-striped table-condensed">
    [4.1867]
    [4.1925]
    [% aggs = aggregates.keys.nsort.reverse %]
    <table class="table table-striped table-condensed table-header-rotated">
  • replacement in src/root/job.tt at line 42
    [4.1942][4.1942:2035]()
    <th>#</th>
    [% FOREACH j IN constituentJobs %]
    <th>[% HTML.escape(j) %]</th>
    [4.1942]
    [4.2035]
    <th>Job</th>
    [% FOREACH agg IN aggs %]
    <th class="rotate-45">
    [% agg_ = aggregates.$agg %]
    <div><span class="[% agg_.build.finished == 0 ? "text-info" : (agg_.build.buildstatus == 0 ? "text-success" : "text-warning") %] override-link">
    <a href="[% c.uri_for('/build' agg) %]">[% agg %]</a>
    </span></div></th>
  • replacement in src/root/job.tt at line 53
    [4.2078][4.2078:2132]()
    [% FOREACH agg IN aggregates.keys.nsort.reverse %]
    [4.2078]
    [4.2132]
    [% FOREACH j IN constituentJobs %]
  • replacement in src/root/job.tt at line 55
    [4.2142][4.2142:2320]()
    <td><a class="row-link" href="[% c.uri_for('/build' agg) %]">[% agg %]</a></td>
    [% FOREACH j IN constituentJobs %]
    <td>
    [% r = aggregates.$agg.$j; IF r.id %]
    [4.2142]
    [4.2320]
    <th style="width: 1em;">[% INCLUDE renderJobName project=project.name jobset=jobset.name job=j %]</th>
    [% FOREACH agg IN aggs %]
    <td>
    [% r = aggregates.$agg.constituents.$j; IF r.id %]
  • edit in src/root/job.tt at line 70
    [4.2528][4.2528:2529]()
  • edit in src/root/layout.tt at line 27
    [14.72825]
    [15.3053]
    <link rel="stylesheet" href="/static/css/rotated-th.css" type="text/css" />
  • edit in src/root/static/css/hydra.css at line 93
    [3.404]
    [16.296]
    }
    .override-link a {
    color: inherit;
  • file addition: rotated-th.css (----------)
    [17.2111]
    /* Rotated table headers, borrowed from http://jimmybonney.com/articles/column_header_rotation_css */
    .tab-content {
    margin-right: 5em;
    overflow: visible;
    }
    td.centered {
    text-align: center;
    }
    .table-header-rotated th.rotate-45{
    height: 80px;
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    position: relative;
    vertical-align: bottom;
    padding: 0;
    font-size: 100%;
    line-height: 0.9;
    }
    .table-header-rotated th.rotate-45 > div {
    position: relative;
    top: 0px;
    left: 40px; /* 80 * tan(45) / 2 = 40 where 80 is the height on the cell and 45 is the transform angle*/
    height: 100%;
    -ms-transform:skew(-45deg,0deg);
    -moz-transform:skew(-45deg,0deg);
    -webkit-transform:skew(-45deg,0deg);
    -o-transform:skew(-45deg,0deg);
    transform:skew(-45deg,0deg);
    overflow: hidden;
    border-left: 1px solid #dddddd;
    }
    .table-header-rotated th.rotate-45 span {
    -ms-transform:skew(45deg,0deg) rotate(315deg);
    -moz-transform:skew(45deg,0deg) rotate(315deg);
    -webkit-transform:skew(45deg,0deg) rotate(315deg);
    -o-transform:skew(45deg,0deg) rotate(315deg);
    transform:skew(45deg,0deg) rotate(315deg);
    position: absolute;
    bottom: 30px; /* 40 cos(45) = 28 with an additional 2px margin*/
    left: -25px; /*Because it looked good, but there is probably a mathematical link here as well*/
    display: inline-block;
    // width: 100%;
    width: 85px; /* 80 / cos(45) - 40 cos (45) = 85 where 80 is the height of the cell, 40 the width of the cell and 45 the transform angle*/
    text-align: left;
    // white-space: nowrap; /*whether to display in one line or not*/
    }