Jobset page: Load the jobs and status tabs on demand
[?]
Feb 22, 2013, 1:29 PM
QTC3SYBMNNTPZHQGXRMV5GU5KDODGXPIM3TIGWBAF7HDKNDKTCXQCDependencies
- [2]
TNMOG2ZQIndentation - [3]
XKJGBVO2Show build status for up to 100 jobs in stead of 50. - [4]
4UUKWXDFJobset page: Show last evaluation time - [5]
3PNG7NIBRemove trailing whitespace - [6]
JARRBLZDBootstrapify the Hydra forms (except the project and jobset edit pages) - [7]
HPEG2RHVMerge the BuildResultInfo table into the Builds table - [8]
6ABZ4GQY* hydra: alphabetical order of systems in status overview - [9]
RWFCW6ZNIn the jobset evals lists, show what inputs changed between consecutive evals - [10]
Z4KRJX4Q* In the last succeeded / job status queries, use the Builds.isCurrent - [11]
J7EE2XZAFix a huge performance regression in the jobstatus page - [12]
MOX7XJ2EMerge the BuildSchedulingInfo table into the Builds table - [13]
3B53TTEP* Remove a debug statement. - [14]
JXPHAZMVMinor style changes - [15]
CQTN62OHDie tabs die - [16]
TFK74CQRPut job status on a separate tab - [17]
VZYX66Q3* hydra: only show current jobs in status overview of jobset page - [18]
AKAXJDMW* Disable the statistics on the project, jobset and job pages for now - [19]
FGQPXZIXhydra: make nr of build to keep configurable per jobset - [20]
OX6NYJDVSplit viewing and editing a jobset - [21]
UMFB2767Hydra/64: Leaving number of builds empty gives DBIx error - [22]
6QRHXIM3* Speed up the jobset index page. Especially the query to get the - [23]
UXHP37RFset threshold to show status on jobset page to a more usable size - [24]
K22TMPH5Make the info tables less compressed - [25]
SFUSIKUY* Use isCurrent to determine the inactive jobs. - [26]
VH5ZABDRAdd a page to show the latest evaluations for the entire server - [27]
Q4VDOA76Replace last 5 builds on jobset page with last 5 evaluations. Moved hide/unhide and evaluate options to jobset topmenu. - [28]
N45RZUQ6Reduce I/O in build listings by only fetching required columns - [29]
3HZY24CX* Make jobsets viewable under - [30]
ZI535LI6* hydra: 'new' UI for project/jobset/job/build - [31]
TJPIS3UPhydra: minor improvements in hydra ui - [32]
PZL3SZM3Give every page a consistent title - [33]
KG5AMUMGCleanup - [34]
ODNCGFQ5* Improved the navigation bar: don't include all projects (since that - [*]
D5QIOJGP* Move everything up one directory.
Change contents
- replacement in src/lib/Hydra/Controller/Jobset.pm at line 24
sub jobsetIndex {my ($self, $c, $forceStatus) = @_;sub index : Chained('jobset') PathPart('') Args(0) {my ($self, $c) = @_; - replacement in src/lib/Hydra/Controller/Jobset.pm at line 32
# Get the active / inactive jobs in this jobset.my @jobs = $c->stash->{jobset}->jobs->search({ },{ select => ["name",\ ("exists (select 1 from builds where project = '$projectName' and jobset = '$jobsetName' and job = me.name and isCurrent = 1) as active")], as => ["name", "active"], order_by => ["name"] });$c->stash->{evals} = getEvals($self, $c, scalar $c->stash->{jobset}->jobsetevals, 0, 10);($c->stash->{latestEval}) = $c->stash->{jobset}->jobsetevals->search({}, { limit => 1, order_by => ["id desc"] });}sub jobs_tab : Chained('jobset') PathPart('jobs-tab') Args(0) {my ($self, $c) = @_;$c->stash->{template} = 'jobset-jobs-tab.tt'; - replacement in src/lib/Hydra/Controller/Jobset.pm at line 44
foreach my $job (@jobs) {if ($job->get_column('active')) {push @{$c->stash->{activeJobs}}, $job->name;} else {(my $latestEval) = $c->stash->{jobset}->jobsetevals->search({ hasnewbuilds => 1}, { limit => 1, order_by => ["id desc"] });my %activeJobs;if (defined $latestEval) {foreach my $build ($latestEval->builds->search({}, { order_by => ["job"], select => ["job"] })) {my $job = $build->get_column("job");if (!defined $activeJobs{$job}) {$activeJobs{$job} = 1;push @{$c->stash->{activeJobs}}, $job;}}}foreach my $job ($c->stash->{jobset}->jobs->search({}, { order_by => ["name"] })) {if (!defined $activeJobs{$job->name}) { - edit in src/lib/Hydra/Controller/Jobset.pm at line 64
} - replacement in src/lib/Hydra/Controller/Jobset.pm at line 66
$c->stash->{evals} = getEvals($self, $c, scalar $c->stash->{jobset}->jobsetevals, 0, 10);sub status_tab : Chained('jobset') PathPart('status-tab') Args(0) {my ($self, $c) = @_;$c->stash->{template} = 'jobset-status-tab.tt'; - replacement in src/lib/Hydra/Controller/Jobset.pm at line 71
($c->stash->{latestEval}) = $c->stash->{jobset}->jobsetevals->search({}, { limit => 1, order_by => ["id desc"] });# FIXME: use latest eval instead of iscurrent. - replacement in src/lib/Hydra/Controller/Jobset.pm at line 82[5.9]→[3.0:68](∅→∅),[5.67]→[5.844:978](∅→∅),[3.68]→[5.844:978](∅→∅),[5.158]→[5.844:978](∅→∅),[5.978]→[5.3623:3851](∅→∅),[5.261]→[5.1218:1250](∅→∅),[5.2169]→[5.1218:1250](∅→∅),[5.3851]→[5.1218:1250](∅→∅),[5.1218]→[5.1218:1250](∅→∅),[5.1250]→[5.3852:4073](∅→∅),[5.4073]→[5.2427:2467](∅→∅),[5.2427]→[5.2427:2467](∅→∅),[5.2467]→[5.1524:1753](∅→∅),[5.1524]→[5.1524:1753](∅→∅),[5.1753]→[5.2158:2291](∅→∅)
if($forceStatus || scalar(@{$c->stash->{activeJobs}}) <= 100) {my @select = ();my @as = ();push(@select, "job"); push(@as, "job");foreach my $system (@systems) {push(@select, "(select buildstatus from Builds b where b.id = (select max(id) from Builds t where t.project = me.project and t.jobset = me.jobset and t.job = me.job and t.system = '$system' and t.iscurrent = 1 ))");push(@as, $system);push(@select, "(select b.id from Builds b where b.id = (select max(id) from Builds t where t.project = me.project and t.jobset = me.jobset and t.job = me.job and t.system = '$system' and t.iscurrent = 1 ))");push(@as, "$system-build");}$c->stash->{activeJobsStatus} =[ $c->model('DB')->resultset('ActiveJobsForJobset')->search({},{ bind => [$c->stash->{project}->name, $c->stash->{jobset}->name], select => \@select, as => \@as, order_by => ["job"]})];my @select = ();my @as = ();push(@select, "job"); push(@as, "job");foreach my $system (@systems) {push(@select, "(select buildstatus from Builds b where b.id = (select max(id) from Builds t where t.project = me.project and t.jobset = me.jobset and t.job = me.job and t.system = '$system' and t.iscurrent = 1 ))");push(@as, $system);push(@select, "(select b.id from Builds b where b.id = (select max(id) from Builds t where t.project = me.project and t.jobset = me.jobset and t.job = me.job and t.system = '$system' and t.iscurrent = 1 ))");push(@as, "$system-build"); - edit in src/lib/Hydra/Controller/Jobset.pm at line 91[5.1864]→[5.10:11](∅→∅),[5.361]→[5.819:821](∅→∅),[5.405]→[5.819:821](∅→∅),[5.483]→[5.819:821](∅→∅),[5.502]→[5.819:821](∅→∅),[5.1262]→[5.819:821](∅→∅),[5.1528]→[5.819:821](∅→∅),[5.4193]→[5.819:821](∅→∅),[5.819]→[5.819:821](∅→∅),[5.821]→[2.2:3](∅→∅),[2.3]→[5.821:822](∅→∅),[5.821]→[5.821:822](∅→∅),[5.822]→[5.159:212](∅→∅),[5.212]→[2.4:60](∅→∅),[2.60]→[5.264:266](∅→∅),[5.264]→[5.264:266](∅→∅),[5.266]→[2.61:62](∅→∅)
}sub index : Chained('jobset') PathPart('') Args(0) {my ($self, $c) = @_;jobsetIndex($self, $c, 0);} - replacement in src/lib/Hydra/Controller/Jobset.pm at line 92
sub indexWithStatus : Chained('jobset') PathPart('') Args(1) {my ($self, $c, $forceStatus) = @_;jobsetIndex($self, $c, 1);$c->stash->{activeJobsStatus} = [$c->model('DB')->resultset('ActiveJobsForJobset')->search({},{ bind => [$c->stash->{project}->name, $c->stash->{jobset}->name], select => \@select, as => \@as, order_by => ["job"]}) ]; - file addition: jobset-jobs-tab.tt[36.1486]
[% PROCESS common.tt %]<p>This jobset currently contains the following [% activeJobs.size %] jobs:<blockquote>[% IF activeJobs.size == 0 %]<em>(none)</em>[% END %][% FOREACH j IN activeJobs %][% INCLUDE renderJobName project=project.name jobset=jobset.name job=j %]<br/>[% END %]</blockquote></p><p>This jobset used to contain the following [% inactiveJobs.size %] jobs:<blockquote>[% IF inactiveJobs.size == 0 %]<em>(none)</em>[% END %][% FOREACH j IN inactiveJobs %][% INCLUDE renderJobName project=project.name jobset=jobset.name job=j %]<br/>[% END %]</blockquote></p> - file addition: jobset-status-tab.tt[36.1486]
[% PROCESS common.tt %]<table class="table table-striped table-condensed"><thead><tr><th>Job</th>[% FOREACH s IN systems %]<th>[% s.system %]</th>[% END %]</tr></thead><tbody>[% odd = 0 %][% FOREACH j IN activeJobsStatus %]<tr class="[% IF odd %] odd [% END; odd = !odd %]"><td>[% INCLUDE renderJobName project=project.name jobset = jobset.name job = j.get_column('job') %]</td>[% FOREACH s IN systems %][% system = s.system %][% systemStatus = j.get_column(system) %]<td class="centered">[% IF systemStatus != undef %]<a href="[% c.uri_for('/build' j.get_column(system _ '-build') ) %]">[% INCLUDE renderBuildStatusIcon buildstatus=systemStatus size=16 %]</a>[% END %]</td>[% END %]</tr>[% END %]</tbody></table> - replacement in src/root/jobset.tt at line 49
<li><a href="#tabs-jobs" data-toggle="tab">Jobs ([% activeJobs.size %])</a></li><li><a href="#tabs-jobs" data-toggle="tab">Jobs</a></li> - edit in src/root/jobset.tt at line 88[5.707]→[5.707:751](∅→∅),[5.751]→[5.7252:7282](∅→∅),[5.27517]→[5.7252:7282](∅→∅),[5.7304]→[5.7304:8194](∅→∅),[5.8194]→[5.706:728](∅→∅),[5.706]→[5.706:728](∅→∅),[5.728]→[5.8195:8475](∅→∅)
<div id="tabs-status" class="tab-pane">[% IF activeJobsStatus %]<table class="table table-striped table-condensed"><thead><tr><th>Job</th>[% FOREACH s IN systems %]<th>[% s.system %]</th>[% END %]</tr></thead><tbody>[% odd = 0 %][% FOREACH j IN activeJobsStatus %]<tr class="[% IF odd %] odd [% END; odd = !odd %]"><td>[% INCLUDE renderJobName project=project.name jobset = jobset.name job = j.get_column('job') %]</td>[% FOREACH s IN systems %][% system = s.system %][% systemStatus = j.get_column(system) %]<td class="centered">[% IF systemStatus != undef %]<a href="[% c.uri_for('/build' j.get_column(system _ '-build') ) %]">[% INCLUDE renderBuildStatusIcon buildstatus=systemStatus size=16 %]</a>[% END %]</td>[% END %]</tr>[% END %]</tbody></table>[% ELSE %]<h2>Status</h2><p>[ <a href="[% c.uri_for('/jobset' project.name jobset.name 'with-status' ) %]">Show status overview</a> ]</p>[% END %] - replacement in src/root/jobset.tt at line 89
</div>[% INCLUDE makeLazyTab tabName="tabs-status" uri=c.uri_for('/jobset' project.name jobset.name "status-tab") %] - replacement in src/root/jobset.tt at line 135
<div id="tabs-jobs" class="tab-pane">[% INCLUDE makeLazyTab tabName="tabs-jobs" uri=c.uri_for('/jobset' project.name jobset.name "jobs-tab") %] - edit in src/root/jobset.tt at line 137[5.30687]→[5.10112:10192](∅→∅),[5.30995]→[5.10193:10428](∅→∅),[5.10428]→[5.13217:13218](∅→∅),[5.25463]→[5.13217:13218](∅→∅),[5.31024]→[5.13217:13218](∅→∅),[5.13217]→[5.13217:13218](∅→∅),[5.13218]→[5.10429:10508](∅→∅),[5.31067]→[5.10509:10748](∅→∅),[5.10748]→[5.13244:13245](∅→∅),[5.13244]→[5.13244:13245](∅→∅),[5.2589]→[5.2589:2598](∅→∅),[5.2598]→[5.14462:14463](∅→∅),[5.8789]→[5.14462:14463](∅→∅),[5.14462]→[5.14462:14463](∅→∅)
<p>This jobset currently contains the following [% activeJobs.size %] jobs:<blockquote>[% IF activeJobs.size == 0 %]<em>(none)</em>[% END %][% FOREACH j IN activeJobs %][% INCLUDE renderJobName project=project.name jobset=jobset.name job=j %]<br/>[% END %]</blockquote></p><p>This jobset used to contain the following [% inactiveJobs.size %] jobs:<blockquote>[% IF inactiveJobs.size == 0 %]<em>(none)</em>[% END %][% FOREACH j IN inactiveJobs %][% INCLUDE renderJobName project=project.name jobset=jobset.name job=j %]<br/>[% END %]</blockquote></p></div>