forked from lix-project/hydra
This commit is contained in:
parent
cd06b6c97d
commit
0f03c796e7
|
@ -47,11 +47,12 @@ sub project :Local {
|
|||
my ( $self, $c, $projectName ) = @_;
|
||||
$c->stash->{template} = 'project.tt';
|
||||
|
||||
$c->stash->{projects} = [$c->model('DB::Projects')->search({}, {order_by => 'displayname'})];
|
||||
|
||||
(my $project) = $c->model('DB::Projects')->search({ name => $projectName });
|
||||
return error($c, "Project <tt>$projectName</tt> doesn't exist.") if !defined $project;
|
||||
|
||||
$c->stash->{project} = $project;
|
||||
$c->model('DB::Builds')->search({project => $projectName}, {join => 'resultInfo', select => {sum => 'starttime'}});
|
||||
$c->stash->{curProject} = $project;
|
||||
|
||||
$c->stash->{finishedBuilds} = $c->model('DB::Builds')->search(
|
||||
{project => $projectName, finished => 1});
|
||||
|
@ -97,9 +98,13 @@ sub default :Path {
|
|||
sub build :Local {
|
||||
my ( $self, $c, $id ) = @_;
|
||||
|
||||
$c->stash->{projects} = [$c->model('DB::Projects')->search({}, {order_by => 'displayname'})];
|
||||
|
||||
my $build = getBuild($c, $id);
|
||||
return error($c, "Build with ID $id doesn't exist.") if !defined $build;
|
||||
|
||||
$c->stash->{curProject} = $build->project;
|
||||
|
||||
$c->stash->{template} = 'build.tt';
|
||||
$c->stash->{build} = $build;
|
||||
$c->stash->{id} = $id;
|
||||
|
|
|
@ -150,6 +150,7 @@ td.buildfarmMainColumn {
|
|||
pre.buildlog {
|
||||
border: 1px solid black;
|
||||
padding: 0.3em;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
ul.productList {
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
<div class="title">Projects</div>
|
||||
<ul>
|
||||
[% FOREACH project IN projects %]
|
||||
<li><div class="title"><a href="[% c.uri_for('/project' project.name) %]">[% project.displayname %]</a></div></li>
|
||||
<li [% IF curProject.name == project.name %]class="active"[% END %]><div class="title"><a href="[% c.uri_for('/project' project.name) %]">[% project.displayname %]</a></div></li>
|
||||
[% END %]
|
||||
</ul>
|
||||
</li>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
[% WRAPPER layout.tt title="Hydra Overview" %]
|
||||
|
||||
<h1>Project <tt>[% project.name %]</tt></h1>
|
||||
<h1>Project <tt>[% curProject.name %]</tt></h1>
|
||||
|
||||
|
||||
<h2>Definition</h2>
|
||||
|
||||
[% FOREACH jobset IN project.jobsets -%]
|
||||
[% FOREACH jobset IN curProject.jobsets -%]
|
||||
|
||||
<h3>Jobset <tt>[% jobset.name %]</tt></h3>
|
||||
|
||||
|
@ -54,7 +54,7 @@
|
|||
|
||||
<ul>
|
||||
[% FOREACH jobName IN jobNames -%]
|
||||
<li><a href="[% c.uri_for('/job' project.name jobName.attrname) %]"><tt>[% jobName.attrname %]</tt></a></li>
|
||||
<li><a href="[% c.uri_for('/job' curProject.name jobName.attrname) %]"><tt>[% jobName.attrname %]</tt></a></li>
|
||||
[% END %]
|
||||
</ul>
|
||||
|
||||
|
|
Loading…
Reference in a new issue