* Support variant builds.
This commit is contained in:
@ -29,7 +29,7 @@ sub getBuild {
|
||||
sub index :Path :Args(0) {
|
||||
my ( $self, $c ) = @_;
|
||||
$c->stash->{template} = 'index.tt';
|
||||
$c->stash->{allBuilds} = [$c->model('DB::Builds')->all];
|
||||
$c->stash->{allBuilds} = [$c->model('DB::Builds')->search(undef, {order_by => "timestamp DESC"})];
|
||||
# Get the latest build for each unique job.
|
||||
# select * from builds as x where timestamp == (select max(timestamp) from builds where jobName == x.jobName);
|
||||
$c->stash->{latestBuilds} = [$c->model('DB::Builds')->search(undef, {order_by => "project, attrName", where => "timestamp == (select max(timestamp) from builds where project == me.project and attrName == me.attrName)"})];
|
||||
|
@ -8,8 +8,8 @@ use base 'DBIx::Class::Schema';
|
||||
__PACKAGE__->load_classes;
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-05 23:48:14
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:m+4HRK3Cwlb1lbJ+twj8zw
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-06 19:19:17
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:DQCaurV1oArj0odoPHR+zw
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
@ -24,6 +24,8 @@ __PACKAGE__->add_columns(
|
||||
{ data_type => "integer", is_nullable => 0, size => undef },
|
||||
"path",
|
||||
{ data_type => "text", is_nullable => 0, size => undef },
|
||||
"value",
|
||||
{ data_type => "VARCHAR", is_nullable => 0, size => undef },
|
||||
);
|
||||
__PACKAGE__->set_primary_key("buildid", "name");
|
||||
__PACKAGE__->belongs_to(
|
||||
@ -33,8 +35,8 @@ __PACKAGE__->belongs_to(
|
||||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-05 23:48:14
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:wqjRb/WbGiyFTBcu8QId3Q
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-06 19:19:17
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ZDtFSXPegKbVEAoM+svosg
|
||||
|
||||
__PACKAGE__->belongs_to(
|
||||
"build",
|
||||
|
@ -25,8 +25,8 @@ __PACKAGE__->belongs_to(
|
||||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-05 23:48:14
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:lU3XutG22RG9DJdxziFlgg
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-06 19:19:17
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:YwyZF3sTsIWvkKAQ5fPtMQ
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
@ -25,8 +25,8 @@ __PACKAGE__->belongs_to(
|
||||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-05 23:48:14
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:lfykD1HZfuy+uc7JM1sVCA
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-06 19:19:17
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:m2mxFOI2ZgjLoAzbNhiDlw
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
@ -34,6 +34,8 @@ __PACKAGE__->add_columns(
|
||||
{ data_type => "integer", is_nullable => 0, size => undef },
|
||||
"stoptime",
|
||||
{ data_type => "integer", is_nullable => 0, size => undef },
|
||||
"system",
|
||||
{ data_type => "text", is_nullable => 0, size => undef },
|
||||
);
|
||||
__PACKAGE__->set_primary_key("id");
|
||||
__PACKAGE__->has_many(
|
||||
@ -53,8 +55,8 @@ __PACKAGE__->has_many(
|
||||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-05 23:48:14
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:bneV9O2uXIrg3Wuencuj+Q
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-06 19:19:17
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jcNXcVLLxMEddBCUkq5aYg
|
||||
|
||||
__PACKAGE__->has_many(dependentBuildInputs => 'HydraFrontend::Schema::Buildinputs', 'inputid');
|
||||
|
||||
|
@ -0,0 +1,41 @@
|
||||
package HydraFrontend::Schema::Jobsetinputalts;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use base 'DBIx::Class';
|
||||
|
||||
__PACKAGE__->load_components("Core");
|
||||
__PACKAGE__->table("jobSetInputAlts");
|
||||
__PACKAGE__->add_columns(
|
||||
"project",
|
||||
{ data_type => "text", is_nullable => 0, size => undef },
|
||||
"jobset",
|
||||
{ data_type => "text", is_nullable => 0, size => undef },
|
||||
"input",
|
||||
{ data_type => "text", is_nullable => 0, size => undef },
|
||||
"altnr",
|
||||
{ data_type => "integer", is_nullable => 0, size => undef },
|
||||
"uri",
|
||||
{ data_type => "text", is_nullable => 0, size => undef },
|
||||
"revision",
|
||||
{ data_type => "integer", is_nullable => 0, size => undef },
|
||||
"tag",
|
||||
{ data_type => "text", is_nullable => 0, size => undef },
|
||||
"value",
|
||||
{ data_type => "text", is_nullable => 0, size => undef },
|
||||
);
|
||||
__PACKAGE__->set_primary_key("project", "jobset", "input", "altnr");
|
||||
__PACKAGE__->belongs_to(
|
||||
"jobsetinput",
|
||||
"HydraFrontend::Schema::Jobsetinputs",
|
||||
{ jobset => "jobset", name => "input", project => "project" },
|
||||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-06 19:19:17
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:YK+TrYs5Zk+8q+66b3kOUw
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
1;
|
@ -10,20 +10,14 @@ __PACKAGE__->table("jobSetInputs");
|
||||
__PACKAGE__->add_columns(
|
||||
"project",
|
||||
{ data_type => "text", is_nullable => 0, size => undef },
|
||||
"job",
|
||||
"jobset",
|
||||
{ data_type => "text", is_nullable => 0, size => undef },
|
||||
"name",
|
||||
{ data_type => "text", is_nullable => 0, size => undef },
|
||||
"type",
|
||||
{ data_type => "text", is_nullable => 0, size => undef },
|
||||
"uri",
|
||||
{ data_type => "text", is_nullable => 0, size => undef },
|
||||
"revision",
|
||||
{ data_type => "integer", is_nullable => 0, size => undef },
|
||||
"tag",
|
||||
{ data_type => "text", is_nullable => 0, size => undef },
|
||||
);
|
||||
__PACKAGE__->set_primary_key("project", "job", "name");
|
||||
__PACKAGE__->set_primary_key("project", "jobset", "name");
|
||||
__PACKAGE__->has_many(
|
||||
"jobsets",
|
||||
"HydraFrontend::Schema::Jobsets",
|
||||
@ -36,12 +30,21 @@ __PACKAGE__->has_many(
|
||||
__PACKAGE__->belongs_to(
|
||||
"jobset",
|
||||
"HydraFrontend::Schema::Jobsets",
|
||||
{ name => "job", project => "project" },
|
||||
{ name => "jobset", project => "project" },
|
||||
);
|
||||
__PACKAGE__->has_many(
|
||||
"jobsetinputalts",
|
||||
"HydraFrontend::Schema::Jobsetinputalts",
|
||||
{
|
||||
"foreign.input" => "self.name",
|
||||
"foreign.jobset" => "self.jobset",
|
||||
"foreign.project" => "self.project",
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-05 23:48:14
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:fKqDK1YOZXl88jxNRwEvSA
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-06 19:19:17
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:H0KE/7kJ23s4RKFDVRIyUQ
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
@ -33,12 +33,15 @@ __PACKAGE__->belongs_to(
|
||||
__PACKAGE__->has_many(
|
||||
"jobsetinputs",
|
||||
"HydraFrontend::Schema::Jobsetinputs",
|
||||
{ "foreign.job" => "self.name", "foreign.project" => "self.project" },
|
||||
{
|
||||
"foreign.jobset" => "self.name",
|
||||
"foreign.project" => "self.project",
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-05 23:48:14
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:R+xsUdoLpQ7JnbZagpMqJQ
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-06 19:19:17
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7JksbkRjqTKzHQkOvUkt2g
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
@ -19,8 +19,8 @@ __PACKAGE__->has_many(
|
||||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-05 23:48:14
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:PpPVJuiXpYbj8HN3sA05Gw
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-06 19:19:17
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:F3bS3Kbsxhp9G6klfVPRmg
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
@ -57,6 +57,9 @@
|
||||
<th>Output store path:</th>
|
||||
<td><tt>[% build.outpath %]</tt></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>System:</th>
|
||||
<td><tt>[% build.system %]</tt></td>
|
||||
<tr>
|
||||
<th>Status:</th>
|
||||
<td>
|
||||
@ -84,6 +87,8 @@
|
||||
<td>
|
||||
[% IF input.type == "build" %]
|
||||
<a href="[% c.uri_for('/build' input.inputid) %]">Job <tt>[% input.build.project %]:[% input.build.attrname %]</tt> build [% input.inputid %]</a>
|
||||
[% ELSIF input.type == "string" %]
|
||||
<tt>"[% input.value %]"</tt></a>
|
||||
[% ELSE %]
|
||||
<tt>[% input.uri %]</tt>
|
||||
[% END %]
|
||||
@ -131,13 +136,14 @@
|
||||
|
||||
<table class="tablesorter">
|
||||
<thead>
|
||||
<tr><th>Build</th><th>Input name</th><th>Timestamp</th></tr>
|
||||
<tr><th>Build</th><th>Input name</th><th>System</th><th>Timestamp</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
[% FOREACH input IN build.dependentBuildInputs -%]
|
||||
<tr>
|
||||
<td><a href="[% c.uri_for('/build' input.buildid.id) %]">Job <tt>[% input.buildid.project %]:[% input.buildid.attrname %]</tt> build [% input.buildid.id %]</a></td>
|
||||
<td><tt>[% input.name %]</tt></td>
|
||||
<td><tt>[% input.buildid.system %]</tt></td>
|
||||
<td>[% date.format(input.buildid.timestamp, '%Y-%m-%d %H:%M:%S') %]</td>
|
||||
</tr>
|
||||
[% END -%]
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
<table class="tablesorter">
|
||||
<thead>
|
||||
<tr><th></th><th>#</th><th>Project</th><th>Job</th><th>Timestamp</th><th>Description</th></tr>
|
||||
<tr><th></th><th>#</th><th>Project</th><th>Job</th><th>System</th><th>Timestamp</th><th>Description</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
[% FOREACH build IN latestBuilds -%]
|
||||
@ -21,7 +21,7 @@
|
||||
|
||||
<table class="tablesorter">
|
||||
<thead>
|
||||
<tr><th></th><th>#</th><th>Project</th><th>Job</th><th>Timestamp</th><th>Description</th></tr>
|
||||
<tr><th></th><th>#</th><th>Project</th><th>Job</th><th>System</th><th>Timestamp</th><th>Description</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
[% FOREACH build IN allBuilds -%]
|
||||
|
@ -3,7 +3,7 @@
|
||||
<h1>All builds for job <tt>[% jobName %]</tt></h1>
|
||||
|
||||
<table>
|
||||
<tr><th></th><th>Id</th><th>Project</th><th>Job</th><th>Timestamp</th><th>Description</th></tr>
|
||||
<tr><th></th><th>Id</th><th>Project</th><th>Job</th><th>System</th><th>Timestamp</th><th>Description</th></tr>
|
||||
[% FOREACH build IN builds -%]
|
||||
[% INCLUDE "short-build-info.tt" %]
|
||||
[% END -%]
|
||||
|
@ -11,6 +11,7 @@
|
||||
<td><a href="[% c.uri_for('/build' build.id) %]">[% build.id %]</a></td>
|
||||
<td><a href="[% c.uri_for('/project' build.project) %]"><tt>[% build.project %]</tt></a></td>
|
||||
<td><a href="[% c.uri_for('/job' build.project build.attrname) %]"><tt>[% build.jobset %]:[% build.attrname %]</tt></a></td>
|
||||
<td><tt>[% build.system %]</tt></td>
|
||||
<td>[% date.format(build.timestamp, '%Y-%m-%d %H:%M:%S') %]</td>
|
||||
<td>[% build.description %]</td>
|
||||
</tr>
|
||||
|
Reference in New Issue
Block a user