forked from lix-project/hydra
Remove the jobs status page
The per-system presentation doesn't make much sense any more given issue #60. It should be replaced by (say) a grid showing each job per evaluation.
This commit is contained in:
parent
e54c361a95
commit
6264995198
|
@ -151,8 +151,8 @@ sub jobs_tab : Chained('jobsetChain') PathPart('jobs-tab') Args(0) {
|
||||||
$c->stash->{activeJobs} = [];
|
$c->stash->{activeJobs} = [];
|
||||||
$c->stash->{inactiveJobs} = [];
|
$c->stash->{inactiveJobs} = [];
|
||||||
|
|
||||||
(my $latestEval) = $c->stash->{jobset}->jobsetevals->search(
|
my $latestEval = $c->stash->{jobset}->jobsetevals->search(
|
||||||
{ hasnewbuilds => 1}, { limit => 1, order_by => ["id desc"] });
|
{ hasnewbuilds => 1}, { limit => 1, order_by => ["id desc"] })->single;
|
||||||
|
|
||||||
my %activeJobs;
|
my %activeJobs;
|
||||||
if (defined $latestEval) {
|
if (defined $latestEval) {
|
||||||
|
@ -173,42 +173,6 @@ sub jobs_tab : Chained('jobsetChain') PathPart('jobs-tab') Args(0) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sub status_tab : Chained('jobsetChain') PathPart('status-tab') Args(0) {
|
|
||||||
my ($self, $c) = @_;
|
|
||||||
$c->stash->{template} = 'jobset-status-tab.tt';
|
|
||||||
|
|
||||||
# FIXME: use latest eval instead of iscurrent.
|
|
||||||
|
|
||||||
$c->stash->{systems} =
|
|
||||||
[ $c->stash->{jobset}->builds->search({ iscurrent => 1 }, { select => ["system"], distinct => 1, order_by => "system" }) ];
|
|
||||||
|
|
||||||
# status per system
|
|
||||||
my @systems = ();
|
|
||||||
foreach my $system (@{$c->stash->{systems}}) {
|
|
||||||
push(@systems, $system->system);
|
|
||||||
}
|
|
||||||
|
|
||||||
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"]
|
|
||||||
}) ];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# Hydra::Base::Controller::ListBuilds needs this.
|
# Hydra::Base::Controller::ListBuilds needs this.
|
||||||
sub get_builds : Chained('jobsetChain') PathPart('') CaptureArgs(0) {
|
sub get_builds : Chained('jobsetChain') PathPart('') CaptureArgs(0) {
|
||||||
my ($self, $c) = @_;
|
my ($self, $c) = @_;
|
||||||
|
|
|
@ -1,23 +0,0 @@
|
||||||
[% 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>
|
|
||||||
[% FOREACH j IN activeJobsStatus %]
|
|
||||||
<tr>
|
|
||||||
<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>
|
|
|
@ -45,7 +45,6 @@
|
||||||
[% IF jobset.errormsg %]
|
[% IF jobset.errormsg %]
|
||||||
<li><a href="#tabs-errors" data-toggle="tab"><img src="/static/images/error_16.png" /> Evaluation errors</a></li>
|
<li><a href="#tabs-errors" data-toggle="tab"><img src="/static/images/error_16.png" /> Evaluation errors</a></li>
|
||||||
[% END %]
|
[% END %]
|
||||||
<li><a href="#tabs-status" data-toggle="tab">Job status</a></li>
|
|
||||||
<li><a href="#tabs-jobs" data-toggle="tab">Jobs</a></li>
|
<li><a href="#tabs-jobs" data-toggle="tab">Jobs</a></li>
|
||||||
<li><a href="#tabs-configuration" data-toggle="tab">Configuration</a></li>
|
<li><a href="#tabs-configuration" data-toggle="tab">Configuration</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -91,8 +90,6 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
[% INCLUDE makeLazyTab tabName="tabs-status" uri=c.uri_for('/jobset' project.name jobset.name "status-tab") %]
|
|
||||||
|
|
||||||
[% IF jobset.errormsg %]
|
[% IF jobset.errormsg %]
|
||||||
<div id="tabs-errors" class="tab-pane">
|
<div id="tabs-errors" class="tab-pane">
|
||||||
<p>Errors occurred at [% INCLUDE renderDateTime timestamp=jobset.errortime %].</p>
|
<p>Errors occurred at [% INCLUDE renderDateTime timestamp=jobset.errortime %].</p>
|
||||||
|
|
Loading…
Reference in a new issue