diff --git a/src/HydraFrontend/lib/HydraFrontend/Controller/Root.pm b/src/HydraFrontend/lib/HydraFrontend/Controller/Root.pm index 53d2d10f..9bf9caba 100644 --- a/src/HydraFrontend/lib/HydraFrontend/Controller/Root.pm +++ b/src/HydraFrontend/lib/HydraFrontend/Controller/Root.pm @@ -29,6 +29,7 @@ sub getBuild { sub index :Path :Args(0) { my ( $self, $c ) = @_; $c->stash->{template} = 'index.tt'; + $c->stash->{jobs} = [$c->model('DB::Jobs')->all]; $c->stash->{projects} = [$c->model('DB::Projects')->all]; $c->stash->{allBuilds} = [$c->model('DB::Builds')->search(undef, {order_by => "timestamp DESC"})]; # Get the latest build for each unique job. diff --git a/src/HydraFrontend/lib/HydraFrontend/Schema.pm b/src/HydraFrontend/lib/HydraFrontend/Schema.pm index 64759718..41bd4553 100644 --- a/src/HydraFrontend/lib/HydraFrontend/Schema.pm +++ b/src/HydraFrontend/lib/HydraFrontend/Schema.pm @@ -8,8 +8,8 @@ use base 'DBIx::Class::Schema'; __PACKAGE__->load_classes; -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-09 01:36:21 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:G17vptu+2rEUXbsqVtoXzQ +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-10 10:30:11 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:xP97YDrN7Bm2B/BlbQJ7fQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/HydraFrontend/lib/HydraFrontend/Schema/Buildlogs.pm b/src/HydraFrontend/lib/HydraFrontend/Schema/Buildlogs.pm index e3ce113f..5c9991a0 100644 --- a/src/HydraFrontend/lib/HydraFrontend/Schema/Buildlogs.pm +++ b/src/HydraFrontend/lib/HydraFrontend/Schema/Buildlogs.pm @@ -21,8 +21,8 @@ __PACKAGE__->set_primary_key("build", "logphase"); __PACKAGE__->belongs_to("build", "HydraFrontend::Schema::Builds", { id => "build" }); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-09 01:36:21 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:xvWlrugDQD11vH+7f91K0A +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-10 10:30:11 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:pt0CJFX1pP9Z2TjqrTjTkw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/HydraFrontend/lib/HydraFrontend/Schema/Buildproducts.pm b/src/HydraFrontend/lib/HydraFrontend/Schema/Buildproducts.pm index 2348498b..9aa4387e 100644 --- a/src/HydraFrontend/lib/HydraFrontend/Schema/Buildproducts.pm +++ b/src/HydraFrontend/lib/HydraFrontend/Schema/Buildproducts.pm @@ -21,8 +21,8 @@ __PACKAGE__->set_primary_key("build", "path"); __PACKAGE__->belongs_to("build", "HydraFrontend::Schema::Builds", { id => "build" }); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-09 01:36:21 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:SMsT6htcybeWNHhv82+ilA +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-10 10:30:11 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:3NKUaF4u4H6ZmIRCeva8yA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/HydraFrontend/lib/HydraFrontend/Schema/Builds.pm b/src/HydraFrontend/lib/HydraFrontend/Schema/Builds.pm index c370d01c..3f2152f7 100644 --- a/src/HydraFrontend/lib/HydraFrontend/Schema/Builds.pm +++ b/src/HydraFrontend/lib/HydraFrontend/Schema/Builds.pm @@ -38,6 +38,16 @@ __PACKAGE__->add_columns( { data_type => "text", is_nullable => 0, size => undef }, ); __PACKAGE__->set_primary_key("id"); +__PACKAGE__->belongs_to( + "project", + "HydraFrontend::Schema::Projects", + { name => "project" }, +); +__PACKAGE__->belongs_to( + "jobset", + "HydraFrontend::Schema::Jobsets", + { name => "jobset", project => "project" }, +); __PACKAGE__->has_many( "inputs", "HydraFrontend::Schema::Inputs", @@ -55,8 +65,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-09 01:36:21 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:nfVureYYGM1V/NHroQA5Tw +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-10 10:30:11 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:8s5Z03ugocOVb021EwGVag __PACKAGE__->has_many(dependents => 'HydraFrontend::Schema::Inputs', 'dependency'); diff --git a/src/HydraFrontend/lib/HydraFrontend/Schema/Inputs.pm b/src/HydraFrontend/lib/HydraFrontend/Schema/Inputs.pm index 3ae7e42b..c184ac4c 100644 --- a/src/HydraFrontend/lib/HydraFrontend/Schema/Inputs.pm +++ b/src/HydraFrontend/lib/HydraFrontend/Schema/Inputs.pm @@ -35,8 +35,8 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->belongs_to("build", "HydraFrontend::Schema::Builds", { id => "build" }); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-09 01:36:21 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:3PAsUD+79bZk4vGeSyyACg +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-10 10:30:11 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:AzV6B/6CCrroPlO32n2p3A __PACKAGE__->belongs_to("dependency", "HydraFrontend::Schema::Builds", { id => "dependency" }); diff --git a/src/HydraFrontend/lib/HydraFrontend/Schema/Jobs.pm b/src/HydraFrontend/lib/HydraFrontend/Schema/Jobs.pm index 81274320..1dff2914 100644 --- a/src/HydraFrontend/lib/HydraFrontend/Schema/Jobs.pm +++ b/src/HydraFrontend/lib/HydraFrontend/Schema/Jobs.pm @@ -14,6 +14,10 @@ __PACKAGE__->add_columns( { data_type => "integer", is_nullable => 0, size => undef }, "priority", { data_type => "integer", is_nullable => 0, size => undef }, + "busy", + { data_type => "integer", is_nullable => 0, size => undef }, + "locker", + { data_type => "text", is_nullable => 0, size => undef }, "project", { data_type => "text", is_nullable => 0, size => undef }, "jobset", @@ -30,10 +34,20 @@ __PACKAGE__->add_columns( { data_type => "text", is_nullable => 0, size => undef }, ); __PACKAGE__->set_primary_key("id"); +__PACKAGE__->belongs_to( + "project", + "HydraFrontend::Schema::Projects", + { name => "project" }, +); +__PACKAGE__->belongs_to( + "jobset", + "HydraFrontend::Schema::Jobsets", + { name => "jobset", project => "project" }, +); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-09 01:36:21 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:T8O0XTTOZXapWpJbzjKLTw +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-10 10:30:11 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:GubRofAmJ/sbJbjyV3aKSQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/HydraFrontend/lib/HydraFrontend/Schema/Jobsetinputalts.pm b/src/HydraFrontend/lib/HydraFrontend/Schema/Jobsetinputalts.pm index b29816d2..5c2ebb9a 100644 --- a/src/HydraFrontend/lib/HydraFrontend/Schema/Jobsetinputalts.pm +++ b/src/HydraFrontend/lib/HydraFrontend/Schema/Jobsetinputalts.pm @@ -6,7 +6,7 @@ use warnings; use base 'DBIx::Class'; __PACKAGE__->load_components("Core"); -__PACKAGE__->table("jobSetInputAlts"); +__PACKAGE__->table("jobsetInputAlts"); __PACKAGE__->add_columns( "project", { data_type => "text", is_nullable => 0, size => undef }, @@ -33,8 +33,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-09 01:36:21 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:DzEHCDlnponciGmGASknlg +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-10 10:30:11 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ZjjWLbAWExxOqsDz41A3KA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/HydraFrontend/lib/HydraFrontend/Schema/Jobsetinputs.pm b/src/HydraFrontend/lib/HydraFrontend/Schema/Jobsetinputs.pm index 6093bde3..1a371df0 100644 --- a/src/HydraFrontend/lib/HydraFrontend/Schema/Jobsetinputs.pm +++ b/src/HydraFrontend/lib/HydraFrontend/Schema/Jobsetinputs.pm @@ -6,7 +6,7 @@ use warnings; use base 'DBIx::Class'; __PACKAGE__->load_components("Core"); -__PACKAGE__->table("jobSetInputs"); +__PACKAGE__->table("jobsetInputs"); __PACKAGE__->add_columns( "project", { data_type => "text", is_nullable => 0, size => undef }, @@ -43,8 +43,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-09 01:36:21 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Lm2oIWEUSHFICYMX2qmTfw +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-10 10:30:11 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:6hzbFjPWQ872UxFhhpxjFg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/HydraFrontend/lib/HydraFrontend/Schema/Jobsets.pm b/src/HydraFrontend/lib/HydraFrontend/Schema/Jobsets.pm index 019a1052..236e06b3 100644 --- a/src/HydraFrontend/lib/HydraFrontend/Schema/Jobsets.pm +++ b/src/HydraFrontend/lib/HydraFrontend/Schema/Jobsets.pm @@ -6,7 +6,7 @@ use warnings; use base 'DBIx::Class'; __PACKAGE__->load_components("Core"); -__PACKAGE__->table("jobSets"); +__PACKAGE__->table("jobsets"); __PACKAGE__->add_columns( "name", { data_type => "text", is_nullable => 0, size => undef }, @@ -20,6 +20,14 @@ __PACKAGE__->add_columns( { data_type => "text", is_nullable => 0, size => undef }, ); __PACKAGE__->set_primary_key("project", "name"); +__PACKAGE__->has_many( + "builds", + "HydraFrontend::Schema::Builds", + { + "foreign.jobset" => "self.name", + "foreign.project" => "self.project", + }, +); __PACKAGE__->belongs_to( "project", "HydraFrontend::Schema::Projects", @@ -38,10 +46,18 @@ __PACKAGE__->has_many( "foreign.project" => "self.project", }, ); +__PACKAGE__->has_many( + "jobs", + "HydraFrontend::Schema::Jobs", + { + "foreign.jobset" => "self.name", + "foreign.project" => "self.project", + }, +); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-09 01:36:21 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:EmATMMeNmMd2AI8lVzcLFA +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-10 10:30:11 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:oRV4yw0DWG5PI0agcM7QHA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/HydraFrontend/lib/HydraFrontend/Schema/Projects.pm b/src/HydraFrontend/lib/HydraFrontend/Schema/Projects.pm index e43a0b0a..b0b7069d 100644 --- a/src/HydraFrontend/lib/HydraFrontend/Schema/Projects.pm +++ b/src/HydraFrontend/lib/HydraFrontend/Schema/Projects.pm @@ -12,15 +12,25 @@ __PACKAGE__->add_columns( { data_type => "text", is_nullable => 0, size => undef }, ); __PACKAGE__->set_primary_key("name"); +__PACKAGE__->has_many( + "builds", + "HydraFrontend::Schema::Builds", + { "foreign.project" => "self.name" }, +); __PACKAGE__->has_many( "jobsets", "HydraFrontend::Schema::Jobsets", { "foreign.project" => "self.name" }, ); +__PACKAGE__->has_many( + "jobs", + "HydraFrontend::Schema::Jobs", + { "foreign.project" => "self.name" }, +); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-09 01:36:21 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ZifQocKoHOPRrJQSPggZ+w +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-10 10:30:11 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:9SeEXSEOH1ocrdkoa7fx5Q # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/HydraFrontend/root/build.tt b/src/HydraFrontend/root/build.tt index 211b7a32..2b7137c3 100644 --- a/src/HydraFrontend/root/build.tt +++ b/src/HydraFrontend/root/build.tt @@ -1,7 +1,7 @@ [% WRAPPER layout.tt title="Hydra Overview" %] [% USE date %] -
Priority | Project | Job | System | Timestamp | Description |
---|---|---|---|---|---|
[% job.priority %] | +[% job.project.name %] | +[% job.jobset.name %] | +[% job.system %] | +[% date.format(job.timestamp, '%Y-%m-%d %H:%M:%S') %] | +[% job.description %] | +