Move the build time chart to the job page

[?]
Oct 7, 2014, 10:59 AM
BB2KXLXZ7NTYXKP7DHSPDKLKZG4LCV3YP7NRT4Q5AY5Q2KUPA4EQC

Dependencies

  • [2] O5DYTVGA Add jobset/job menus on buid log pages
  • [3] TBSIVFLO Use minutes in build history charts.
  • [4] 6GZZDDQB Move the store path size chart to the job page
  • [5] D5QIOJGP * Move everything up one directory.
  • [6] WDKFN4B2 Make sign in a modal dialog box rather than a separate page
  • [7] ZWCTAZGL added newsitems, added some admin options to clear various caches.
  • [8] R7MDDCB2 Some unnecessary job names
  • [9] 3JBUMW3E forgot to commit a file
  • [10] VCG6KNUX Remove the "clone build" feature
  • [11] ZB3JV52W Add a "My jobsets" tab to the dashboard
  • [12] VBWHG272 Re-add the history tab (store size and build time), now as lazy-loaded tab on build page.
  • [13] FV2M6MOT hydra: use autoconf/-make
  • [14] VH5ZABDR Add a page to show the latest evaluations for the entire server
  • [15] QCGCX2BR Generalize lazy tabs
  • [16] ZFEN2MAO Simplify jobset cloning
  • [17] LSZLZHJY Allow users to edit their own settings
  • [18] AS2OXLRM * Editing releases.
  • [19] 3PNG7NIB Remove trailing whitespace
  • [20] JOVVHIJX Remove all entry points to modify machines
  • [21] KXGOUX7P * Creating releases.
  • [22] D7X6XTKQ Integrate the "Job status" and "All jobs" tabs
  • [23] LFVXESGI Remove already disabled jobstatus code
  • [24] NEQ4BISO Add bootstrap.zip
  • [25] SMTMFEKE hydra: add missing templates
  • [26] YU6CND7C Remove support for views
  • [27] R2PON6R7 Allow non-admin users to see the machine status page
  • [28] KKJNJHO5 Update bootstrap to 2.0.3
  • [29] SZYDW2DG hydra: added some user admin
  • [30] WNQRX7QB Doh
  • [31] NW3ZYPCM added store path size graph
  • [32] U4TD3AIQ Add support for viewing jobset evaluations
  • [33] EFWN7JBV * Added a status page that shows all the currently executing build steps.
  • [34] 2GUAKGTB Fix indentation of build.tt
  • [35] U72VNKRU Remove unused file
  • [36] HZWUT4YN Allow users to reproduce builds on their own systems
  • [37] P5X4P6VK * Renaming "release sets" to "views" (not finished yet). Having
  • [38] AK2UZDS2 Jobset page: Add a new tab to show job status in a matrix
  • [39] VG4QG336 Remove tablesorter
  • [40] KSBB33RE Add a dashboard
  • [41] TRDGNILT Remove unused file
  • [42] 6FRLEP4P first try for timeline of last 24 hours in hydra
  • [43] RSEGBU6C Hydra/20: Jobset clone feature
  • [44] 36M6DGIT Show the runtime/build dependencies in the build page
  • [45] OR5SJ42Y Show releases in a tab on the project page
  • [46] QTC3SYBM Jobset page: Load the jobs and status tabs on demand
  • [47] 64IV56HI Replace bootstrap tarball
  • [48] J3RYO2CU Remove the jobs status page
  • [49] OX6NYJDV Split viewing and editing a jobset
  • [50] ODNCGFQ5 * Improved the navigation bar: don't include all projects (since that
  • [51] G2WXEQHE Remove the Errors page
  • [52] XAJFR6SR Add a chart to the job pages showing the closure size over time
  • [53] WRIU3S5E * UI for cloning builds (not functional yet).
  • [54] W3XAFDK6 Remove obsolete/broken timeline feature
  • [55] 2BUX775I * More release -> view.
  • [56] 5DSDXORD hydra: missing plain.tt
  • [57] JY7BXXOP Split viewing and editing a project
  • [58] UICHT2PS Add a search feature
  • [59] RBNQKATL * Adding persistant releases. A release is a named set of builds.
  • [60] QL55ECJ6 - adapted ui for hydra, more in line with nixos.org website
  • [61] XDDCO6CH * hydra: add dependency list with links to logfiles
  • [62] 75XUS62Y * Added a page to quickly see all failed builds and failed evaluations
  • [*] LBNVQXUB * Build the /build stuff in a separate controller.
  • [*] DEMSSSB2 * Controller for jobs which inherits all actions in ListBuilds. So
  • [*] J5UVLXOK * Start of a basic Catalyst web interface.
  • [*] IK53RV4V
  • [*] WGUKOIQZ Fix indentation

Change contents

  • edit in src/lib/Hydra/Controller/Build.pm at line 405
    [5.658][5.29:314](),[5.314][2.198:292](),[2.292][5.422:914](),[5.422][5.422:914]()
    }
    sub history_graphs : Chained('buildChain') PathPart('history-graphs') {
    my ($self, $c) = @_;
    my $build = $c->stash->{build};
    if ($build->finished) {
    $c->stash->{prevBuilds} = [$c->model('DB::Builds')->search(
    { project => $c->stash->{project}->name
    , jobset => $c->stash->{jobset}->name
    , job => $c->stash->{job}->name
    , 'me.system' => $build->system
    , finished => 1
    , buildstatus => 0
    , 'me.id' => { '<=' => $build->id }
    }
    , { join => "actualBuildStep"
    , "+select" => ["actualBuildStep.stoptime - actualBuildStep.starttime"]
    , "+as" => ["actualBuildTime"]
    , order_by => "me.id DESC"
    , rows => 50
    }
    )
    ];
    }
    $c->stash->{template} = 'build-history-tab.tt';
  • edit in src/lib/Hydra/Controller/Job.pm at line 80
    [5.228]
    [65.544]
    }
    sub build_times : Chained('job') PathPart('build-times') Args(0) {
    my ($self, $c) = @_;
    my @res = $c->stash->{job}->builds->search(
    { finished => 1, buildstatus => 0, closuresize => { '!=', 0 } },
    { join => "actualBuildStep"
    , "+select" => ["actualBuildStep.stoptime - actualBuildStep.starttime"]
    , "+as" => ["actualBuildTime"],
    , order_by => "id" });
    $self->status_ok($c, entity => [ map { { id => $_->id, timestamp => $_ ->timestamp, value => $_->get_column('actualBuildTime') } } @res ]);
  • file deletion: build-history-tab.tt (----------)
    [5.1486][5.5899:5943](),[5.5943][5.1072:1072]()
    [% PROCESS common.tt %]
    [% PROCESS "product-list.tt" %]
    [% USE HTML %]
    [% USE Date %]
    <h3>Build time history (in minutes)</h3>
    <div id="placeholder" style="width:800px;height:400px;"></div>
    <div id="overview" style="margin-left:50px;margin-top:20px;width:600px;height:50px"></div>
    <script src="[% c.uri_for("/static/js/flot/jquery.flot.js") %]" type="text/javascript"></script>
    <script src="[% c.uri_for("/static/js/flot/jquery.flot.selection.js") %]" type="text/javascript"></script>
    <script type="text/javascript">
    $(function() {
    var d = [];
    var ids = [];
    [% FOREACH prevbuild IN prevBuilds; IF prevbuild.build.starttime != 0 %]
    d.push([[% prevbuild.starttime * 1000 %],[% prevbuild.get_column('actualBuildTime') / 60 %]]);
    ids[[% prevbuild.starttime * 1000 %]] = [% prevbuild.id %] ;
    [% END; END %]
    var options = {
    xaxis: { mode: "time" },
    selection: { mode: "x" },
    points: { show: true },
    lines: { show: true },
    grid: {
    clickable: true,
    hoverable: true,
    hoverFill: '#444',
    hoverRadius: 4,
    },
    };
    var plot = $.plot($("#placeholder"), [d], options);
    var overview = $.plot($("#overview"), [d], {
    series: {
    lines: { show: true, lineWidth: 1 },
    shadowSize: 0
    },
    xaxis: { ticks: [], mode: "time" },
    yaxis: { ticks: [], min: 0, autoscaleMargin: 0.1 },
    selection: { mode: "x" }
    });
    // now connect the two
    $("#placeholder").bind("plotselected", function (event, ranges) {
    // do the zooming
    plot = $.plot($("#placeholder"), [d],
    $.extend(true, {}, options, {
    xaxis: { min: ranges.xaxis.from, max: ranges.xaxis.to }
    }));
    // don't fire event on the overview to prevent eternal loop
    overview.setSelection(ranges, true);
    });
    $("#overview").bind("plotselected", function (event, ranges) {
    plot.setSelection(ranges);
    });
    $("#placeholder").bind("plotclick", function (e, pos, item) {
    if (item) {
    plot.highlight(item.series, item.datapoint);
    buildid = ids[item.datapoint[0]];
    window.location = "/build/"+buildid;
    }
    });
    });
    </script>
  • edit in src/root/build.tt at line 106
    [5.2065][5.5944:6015]()
    <li><a href="#tabs-history" data-toggle="tab">History chart</a></li>
  • edit in src/root/build.tt at line 410
    [5.21231][5.6016:6117](),[5.6117][5.21232:21233](),[5.16693][5.21232:21233](),[5.1782][5.21232:21233]()
    [% INCLUDE makeLazyTab tabName="tabs-history" uri=c.uri_for('/build' build.id 'history-graphs') %]
  • replacement in src/root/common.tt at line 552
    [4.936][4.936:990]()
    d.push([t, x.value / (1024.0 * 1024.0)]);
    [4.936]
    [4.990]
    d.push([t, x.value [% IF yaxis == "mib" %] / (1024.0 * 1024.0)[% END %]]);
  • edit in src/root/job.tt at line 88
    [5.803]
    [68.816]
    <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') %]
  • replacement in src/root/job.tt at line 95
    [5.2839][4.2906:3030]()
    [% INCLUDE createChart id="closure-size" dataUrl=c.uri_for('/job' project.name jobset.name job.name 'closure-sizes') %]
    [5.2839]
    [5.2971]
    [% INCLUDE createChart id="closure-size" yaxis="mib" dataUrl=c.uri_for('/job' project.name jobset.name job.name 'closure-sizes') %]
  • replacement in src/root/job.tt at line 99
    [5.3270][4.3066:3188]()
    [% INCLUDE createChart id="output-size" dataUrl=c.uri_for('/job' project.name jobset.name job.name 'output-sizes') %]
    [5.3270]
    [5.3469]
    [% INCLUDE createChart id="output-size" yaxis="mib" dataUrl=c.uri_for('/job' project.name jobset.name job.name 'output-sizes') %]