Lazy load the metrics tab

[?]
Mar 25, 2016, 12:49 PM
UDS5VIT6Y4OW37PXV33I4POYWI3PIZXM52LWTYUB7GXETCZDV37AC

Dependencies

  • [2] RQTECBWX Fix rendering of metrics with dots in their name
  • [3] CQQSJLON On aggregate job pages, show a matrix showing all the constituent builds
  • [4] WGUKOIQZ Fix indentation
  • [5] 6GZZDDQB Move the store path size chart to the job page
  • [6] LSNBPB3Z Fix tabs
  • [7] XAJFR6SR Add a chart to the job pages showing the closure size over time
  • [8] BB2KXLXZ Move the build time chart to the job page
  • [9] 5GRW5XU4 Job page: Put latest builds on top
  • [10] N4ODPYP7 Job page: Remove channel tab
  • [11] T5BIOVJE Add support for tracking custom metrics
  • [*] DEMSSSB2 * Controller for jobs which inherits all actions in ListBuilds. So
  • [*] KSBB33RE Add a dashboard
  • [*] D5QIOJGP * Move everything up one directory.
  • [*] ODNCGFQ5 * Improved the navigation bar: don't include all projects (since that

Change contents

  • edit in src/lib/Hydra/Controller/Job.pm at line 80
    [14.228]
    [3.2569]
    }
  • edit in src/lib/Hydra/Controller/Job.pm at line 82
    [3.2570]
    [3.2570]
    sub metrics_tab : Chained('job') PathPart('metrics-tab') Args(0) {
    my ($self, $c) = @_;
    my $job = $c->stash->{job};
    $c->stash->{template} = 'job-metrics-tab.tt';
  • file addition: job-metrics-tab.tt (----------)
    [15.1486]
    [% PROCESS common.tt %]
    <div id="tabs-charts" class="tab-pane">
    <h3>Build time (in seconds)</h3>
    [% INCLUDE createChart id="build-times" yaxis="sec" dataUrl=c.uri_for('/job' project.name jobset.name job.name 'build-times') %]
    <h3>Closure size (in MiB)</h3>
    [% INCLUDE createChart id="closure-size" yaxis="mib" dataUrl=c.uri_for('/job' project.name jobset.name job.name 'closure-sizes') %]
    <h3>Output size (in MiB)</h3>
    [% INCLUDE createChart id="output-size" yaxis="mib" dataUrl=c.uri_for('/job' project.name jobset.name job.name 'output-sizes') %]
    [% FOREACH metric IN metrics %]
    <h3>Metric: <tt>[%HTML.escape(metric.name)%]</tt></h3>
    [% id = "metric-" _ metric.name;
    id = id.replace('\.', '_');
    INCLUDE createChart dataUrl=c.uri_for('/job' project.name jobset.name job.name 'metric' metric.name); %]
    [% END %]
    </div>
  • edit in src/root/job.tt at line 86
    [3.2555][3.760:803](),[3.803][3.637:809](),[3.803][3.816:817](),[3.809][3.816:817](),[3.2555][3.816:817](),[3.816][3.816:817](),[3.817][3.804:839](),[3.2838][3.2838:2839](),[3.2839][3.810:946](),[3.946][3.2971:2972](),[3.3030][3.2971:2972](),[3.2971][3.2971:2972](),[3.2972][3.3031:3065](),[3.3065][3.3269:3270](),[3.3269][3.3269:3270](),[3.3270][3.947:1081]()
    <div id="tabs-charts" class="tab-pane">
    <h3>Build time (in seconds)</h3>
    [% INCLUDE createChart id="build-times" yaxis="sec" dataUrl=c.uri_for('/job' project.name jobset.name job.name 'build-times') %]
    <h3>Closure size (in MiB)</h3>
    [% INCLUDE createChart id="closure-size" yaxis="mib" dataUrl=c.uri_for('/job' project.name jobset.name job.name 'closure-sizes') %]
    <h3>Output size (in MiB)</h3>
    [% INCLUDE createChart id="output-size" yaxis="mib" dataUrl=c.uri_for('/job' project.name jobset.name job.name 'output-sizes') %]
  • replacement in src/root/job.tt at line 87
    [3.8814][3.8814:8850]()
    [% FOREACH metric IN metrics %]
    [3.8814]
    [3.8850]
    [% INCLUDE makeLazyTab tabName="tabs-charts" uri=c.uri_for('/job' project.name jobset.name job.name 'metrics-tab') %]
  • edit in src/root/job.tt at line 89
    [3.8851][3.8851:8913](),[3.8913][2.467:657](),[2.657][3.9053:9068](),[3.9053][3.9053:9068](),[3.1081][3.3469:3480](),[3.3188][3.3469:3480](),[3.9068][3.3469:3480](),[3.3469][3.3469:3480]()
    <h3>Metric: <tt>[%HTML.escape(metric.name)%]</tt></h3>
    [% id = "metric-" _ metric.name;
    id = id.replace('\.', '_');
    INCLUDE createChart dataUrl=c.uri_for('/job' project.name jobset.name job.name 'metric' metric.name); %]
    [% END %]
    </div>