From 385ceaff4d1b603ba80b17da58f0dff20fb53638 Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Tue, 5 Nov 2013 09:42:05 -0500 Subject: [PATCH] Show buildinput and buildproduct information in the Builds API Signed-off-by: Shea Levy --- src/lib/Hydra/Schema/BuildInputs.pm | 13 +++++++++++++ src/lib/Hydra/Schema/BuildProducts.pm | 19 ++++++++++++++++++- src/lib/Hydra/Schema/Builds.pm | 7 +++---- 3 files changed, 34 insertions(+), 5 deletions(-) diff --git a/src/lib/Hydra/Schema/BuildInputs.pm b/src/lib/Hydra/Schema/BuildInputs.pm index dafae860..446f9b57 100644 --- a/src/lib/Hydra/Schema/BuildInputs.pm +++ b/src/lib/Hydra/Schema/BuildInputs.pm @@ -179,4 +179,17 @@ __PACKAGE__->belongs_to( # Created by DBIx::Class::Schema::Loader v0.07033 @ 2013-10-08 13:08:15 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:OaJPzRM+8XGsu3eIkqeYEw +my %hint = ( + columns => [ + 'type', + 'uri', + 'value', + 'revision', + ], +); + +sub json_hint { + return \%hint; +} + 1; diff --git a/src/lib/Hydra/Schema/BuildProducts.pm b/src/lib/Hydra/Schema/BuildProducts.pm index 538b1eff..1ab22493 100644 --- a/src/lib/Hydra/Schema/BuildProducts.pm +++ b/src/lib/Hydra/Schema/BuildProducts.pm @@ -153,5 +153,22 @@ __PACKAGE__->belongs_to( # Created by DBIx::Class::Schema::Loader v0.07033 @ 2013-06-13 01:54:50 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:+0LkZiaRL5tGJvbLxnwD/g -# You can replace this text with custom content, and it will be preserved on regeneration +my %hint = ( + columns => [ + 'type', + 'subtype', + 'name', + 'fileSize', + 'sha1hash', + 'sha256hash', + 'description', + 'path', + 'defaultPath' + ], +); + +sub json_hint { + return \%hint; +} + 1; diff --git a/src/lib/Hydra/Schema/Builds.pm b/src/lib/Hydra/Schema/Builds.pm index 2355e4ee..438f33ab 100644 --- a/src/lib/Hydra/Schema/Builds.pm +++ b/src/lib/Hydra/Schema/Builds.pm @@ -603,9 +603,6 @@ makeQueries('ForJob', "and project = ? and jobset = ? and job = ?"); my %hint = ( columns => [ - 'id', - 'finished', - 'timestamp', 'starttime', 'stoptime', 'project', @@ -619,7 +616,9 @@ my %hint = ( 'releasename' ], eager_relations => { - buildoutputs => 'name' + buildoutputs => 'name', + buildinputs => 'name' + buildproducts => 'productnr', } );