diff --git a/src/HydraFrontend/lib/HydraFrontend/Controller/Root.pm b/src/HydraFrontend/lib/HydraFrontend/Controller/Root.pm index baf2c1d2..53d2d10f 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->{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. # select * from builds as x where timestamp == (select max(timestamp) from builds where jobName == x.jobName); diff --git a/src/HydraFrontend/lib/HydraFrontend/Schema.pm b/src/HydraFrontend/lib/HydraFrontend/Schema.pm index 03f3c4ce..64759718 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-08 23:34:46 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Gl/KqOOAg3rH0hWZUovhxw +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-09 01:36:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:G17vptu+2rEUXbsqVtoXzQ # 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 f96ded5e..e3ce113f 100644 --- a/src/HydraFrontend/lib/HydraFrontend/Schema/Buildlogs.pm +++ b/src/HydraFrontend/lib/HydraFrontend/Schema/Buildlogs.pm @@ -8,7 +8,7 @@ use base 'DBIx::Class'; __PACKAGE__->load_components("Core"); __PACKAGE__->table("buildLogs"); __PACKAGE__->add_columns( - "buildid", + "build", { data_type => "integer", is_nullable => 0, size => undef }, "logphase", { data_type => "text", is_nullable => 0, size => undef }, @@ -17,16 +17,12 @@ __PACKAGE__->add_columns( "type", { data_type => "text", is_nullable => 0, size => undef }, ); -__PACKAGE__->set_primary_key("buildid", "logphase"); -__PACKAGE__->belongs_to( - "buildid", - "HydraFrontend::Schema::Builds", - { id => "buildid" }, -); +__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-08 23:34:46 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:tlyJLjDbR0vk3Jt/O3M4nw +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-09 01:36:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:xvWlrugDQD11vH+7f91K0A # 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 7fb7e2d9..2348498b 100644 --- a/src/HydraFrontend/lib/HydraFrontend/Schema/Buildproducts.pm +++ b/src/HydraFrontend/lib/HydraFrontend/Schema/Buildproducts.pm @@ -8,7 +8,7 @@ use base 'DBIx::Class'; __PACKAGE__->load_components("Core"); __PACKAGE__->table("buildProducts"); __PACKAGE__->add_columns( - "buildid", + "build", { data_type => "integer", is_nullable => 0, size => undef }, "path", { data_type => "text", is_nullable => 0, size => undef }, @@ -17,16 +17,12 @@ __PACKAGE__->add_columns( "subtype", { data_type => "text", is_nullable => 0, size => undef }, ); -__PACKAGE__->set_primary_key("buildid", "path"); -__PACKAGE__->belongs_to( - "buildid", - "HydraFrontend::Schema::Builds", - { id => "buildid" }, -); +__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-08 23:34:46 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:lCdfeZud7izQv/11dVFFVA +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-09 01:36:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:SMsT6htcybeWNHhv82+ilA # 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 5893afa9..c370d01c 100644 --- a/src/HydraFrontend/lib/HydraFrontend/Schema/Builds.pm +++ b/src/HydraFrontend/lib/HydraFrontend/Schema/Builds.pm @@ -39,25 +39,25 @@ __PACKAGE__->add_columns( ); __PACKAGE__->set_primary_key("id"); __PACKAGE__->has_many( - "buildinputs", - "HydraFrontend::Schema::Buildinputs", - { "foreign.buildid" => "self.id" }, + "inputs", + "HydraFrontend::Schema::Inputs", + { "foreign.build" => "self.id" }, ); __PACKAGE__->has_many( "buildproducts", "HydraFrontend::Schema::Buildproducts", - { "foreign.buildid" => "self.id" }, + { "foreign.build" => "self.id" }, ); __PACKAGE__->has_many( "buildlogs", "HydraFrontend::Schema::Buildlogs", - { "foreign.buildid" => "self.id" }, + { "foreign.build" => "self.id" }, ); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-08 23:34:46 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:JRXGOLW2h+DOY7LZUdkCWQ +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-09 01:36:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:nfVureYYGM1V/NHroQA5Tw -__PACKAGE__->has_many(dependentBuildInputs => 'HydraFrontend::Schema::Buildinputs', 'inputid'); +__PACKAGE__->has_many(dependents => 'HydraFrontend::Schema::Inputs', 'dependency'); 1; diff --git a/src/HydraFrontend/lib/HydraFrontend/Schema/Buildinputs.pm b/src/HydraFrontend/lib/HydraFrontend/Schema/Inputs.pm similarity index 56% rename from src/HydraFrontend/lib/HydraFrontend/Schema/Buildinputs.pm rename to src/HydraFrontend/lib/HydraFrontend/Schema/Inputs.pm index 9b0d789c..3ae7e42b 100644 --- a/src/HydraFrontend/lib/HydraFrontend/Schema/Buildinputs.pm +++ b/src/HydraFrontend/lib/HydraFrontend/Schema/Inputs.pm @@ -1,4 +1,4 @@ -package HydraFrontend::Schema::Buildinputs; +package HydraFrontend::Schema::Inputs; use strict; use warnings; @@ -6,9 +6,13 @@ use warnings; use base 'DBIx::Class'; __PACKAGE__->load_components("Core"); -__PACKAGE__->table("buildInputs"); +__PACKAGE__->table("inputs"); __PACKAGE__->add_columns( - "buildid", + "id", + { data_type => "integer", is_nullable => 0, size => undef }, + "build", + { data_type => "integer", is_nullable => 0, size => undef }, + "job", { data_type => "integer", is_nullable => 0, size => undef }, "name", { data_type => "text", is_nullable => 0, size => undef }, @@ -20,28 +24,20 @@ __PACKAGE__->add_columns( { data_type => "integer", is_nullable => 0, size => undef }, "tag", { data_type => "text", is_nullable => 0, size => undef }, - "inputid", + "value", + { data_type => "text", is_nullable => 0, size => undef }, + "dependency", { data_type => "integer", is_nullable => 0, size => undef }, "path", { data_type => "text", is_nullable => 0, size => undef }, - "value", - { data_type => "text", is_nullable => 0, size => undef }, -); -__PACKAGE__->set_primary_key("buildid", "name"); -__PACKAGE__->belongs_to( - "buildid", - "HydraFrontend::Schema::Builds", - { id => "buildid" }, ); +__PACKAGE__->set_primary_key("id"); +__PACKAGE__->belongs_to("build", "HydraFrontend::Schema::Builds", { id => "build" }); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-08 23:34:46 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:2XeATQWeO3i3eSHlquS2QA +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-09 01:36:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:3PAsUD+79bZk4vGeSyyACg -__PACKAGE__->belongs_to( - "build", - "HydraFrontend::Schema::Builds", - { id => "inputid" }, -); +__PACKAGE__->belongs_to("dependency", "HydraFrontend::Schema::Builds", { id => "dependency" }); 1; diff --git a/src/HydraFrontend/lib/HydraFrontend/Schema/Jobs.pm b/src/HydraFrontend/lib/HydraFrontend/Schema/Jobs.pm new file mode 100644 index 00000000..81274320 --- /dev/null +++ b/src/HydraFrontend/lib/HydraFrontend/Schema/Jobs.pm @@ -0,0 +1,40 @@ +package HydraFrontend::Schema::Jobs; + +use strict; +use warnings; + +use base 'DBIx::Class'; + +__PACKAGE__->load_components("Core"); +__PACKAGE__->table("jobs"); +__PACKAGE__->add_columns( + "id", + { data_type => "integer", is_nullable => 0, size => undef }, + "timestamp", + { data_type => "integer", is_nullable => 0, size => undef }, + "priority", + { data_type => "integer", is_nullable => 0, size => undef }, + "project", + { data_type => "text", is_nullable => 0, size => undef }, + "jobset", + { data_type => "text", is_nullable => 0, size => undef }, + "attrname", + { data_type => "text", is_nullable => 0, size => undef }, + "description", + { data_type => "text", is_nullable => 0, size => undef }, + "drvpath", + { data_type => "text", is_nullable => 0, size => undef }, + "outpath", + { data_type => "text", is_nullable => 0, size => undef }, + "system", + { data_type => "text", is_nullable => 0, size => undef }, +); +__PACKAGE__->set_primary_key("id"); + + +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-09 01:36:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:T8O0XTTOZXapWpJbzjKLTw + + +# You can replace this text with custom content, and it will be preserved on regeneration +1; diff --git a/src/HydraFrontend/lib/HydraFrontend/Schema/Jobsetinputalts.pm b/src/HydraFrontend/lib/HydraFrontend/Schema/Jobsetinputalts.pm index e2b2cd20..b29816d2 100644 --- a/src/HydraFrontend/lib/HydraFrontend/Schema/Jobsetinputalts.pm +++ b/src/HydraFrontend/lib/HydraFrontend/Schema/Jobsetinputalts.pm @@ -33,8 +33,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-08 23:34:46 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:m24w17dWVxjIqPlea77G3A +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-09 01:36:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:DzEHCDlnponciGmGASknlg # 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 2cecaa33..6093bde3 100644 --- a/src/HydraFrontend/lib/HydraFrontend/Schema/Jobsetinputs.pm +++ b/src/HydraFrontend/lib/HydraFrontend/Schema/Jobsetinputs.pm @@ -43,8 +43,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-08 23:34:46 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ufIbhVFTzl7awpRrZofvJQ +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-09 01:36:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Lm2oIWEUSHFICYMX2qmTfw # 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 67bc9f9b..019a1052 100644 --- a/src/HydraFrontend/lib/HydraFrontend/Schema/Jobsets.pm +++ b/src/HydraFrontend/lib/HydraFrontend/Schema/Jobsets.pm @@ -40,8 +40,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-08 23:34:46 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7hm28Izo7wCZc07fH1EJRg +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-09 01:36:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:EmATMMeNmMd2AI8lVzcLFA # 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 ffb748fd..e43a0b0a 100644 --- a/src/HydraFrontend/lib/HydraFrontend/Schema/Projects.pm +++ b/src/HydraFrontend/lib/HydraFrontend/Schema/Projects.pm @@ -19,8 +19,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-08 23:34:46 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:WCqXnL5vOhpwjYB9/Aw7tg +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-09 01:36:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ZifQocKoHOPRrJQSPggZ+w # 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 22197099..211b7a32 100644 --- a/src/HydraFrontend/root/build.tt +++ b/src/HydraFrontend/root/build.tt @@ -33,11 +33,11 @@