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..31b0c1e4 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..c81f6523 100644 --- a/src/lib/Hydra/Schema/Builds.pm +++ b/src/lib/Hydra/Schema/Builds.pm @@ -619,7 +619,9 @@ my %hint = ( 'releasename' ], eager_relations => { - buildoutputs => 'name' + buildoutputs => 'name', + buildinputs_builds => 'name', + buildproducts => 'productnr', } ); diff --git a/src/root/overview.tt b/src/root/overview.tt index 8ae4ff77..9b31aeb5 100644 --- a/src/root/overview.tt +++ b/src/root/overview.tt @@ -1,7 +1,7 @@ [% WRAPPER layout.tt title="Overview" hideHeader=1 %] [% PROCESS common.tt %] -[% IF newItems.size != 0 %] +[% IF newsItems.size != 0 %]
[% FOREACH i IN newsItems %]
@@ -15,6 +15,8 @@

Projects

+[% IF projects.size != 0 %] +

The following projects are hosted on this server:

@@ -36,4 +38,11 @@
+[% ELSE %] + +
Hydra has no projects yet. Please + create a project.
+ +[% END %] + [% END %] diff --git a/src/root/topbar.tt b/src/root/topbar.tt index a48038d5..80895e67 100644 --- a/src/root/topbar.tt +++ b/src/root/topbar.tt @@ -72,12 +72,14 @@ [% END %] [% END %] - [% IF c.user_exists && c.check_user_roles('admin') %] + [% IF c.user_exists && (c.check_user_roles('admin') || + c.check_user_roles('create-projects')) %] [% WRAPPER makeSubMenu title="Admin" %] - [% IF c.check_user_roles('admin') %] + [% IF c.check_user_roles('admin') || c.check_user_roles('create-projects') %] [% INCLUDE menuItem uri = c.uri_for(c.controller('Project').action_for('create')) title = "Create project" %]
  • [% END %] + [% IF c.check_user_roles('admin') %] [% INCLUDE menuItem uri = c.uri_for(c.controller('Admin').action_for('machines')) title = "Manage machines" %] @@ -103,6 +105,7 @@ title = "Clear VCS caches" confirmmsg = "Are you sure you want to clear the VCS cache?" class = "" %] + [% END %] [% END %] [% END %] diff --git a/src/root/user.tt b/src/root/user.tt index 8c70736c..8f577929 100644 --- a/src/root/user.tt +++ b/src/root/user.tt @@ -71,7 +71,7 @@
    diff --git a/src/script/hydra-queue-runner b/src/script/hydra-queue-runner index f67d8cc2..2744c243 100755 --- a/src/script/hydra-queue-runner +++ b/src/script/hydra-queue-runner @@ -106,7 +106,7 @@ sub checkBuilds { { join => ['project'], select => ['system'], as => ['system'], distinct => 1 }); # Get the total number of scheduling shares. - my $totalShares = getTotalShares($db); + my $totalShares = getTotalShares($db) || 1; # For each system type, select up to the maximum number of # concurrent build for that system type.