This commit is contained in:
Eelco Dolstra 2008-11-17 23:59:20 +00:00
parent 51e617e9e8
commit f0eb8cf08c
23 changed files with 94 additions and 60 deletions

View file

@ -66,6 +66,7 @@ sub updateProject {
$project->name($projectName);
$project->displayname($displayName);
$project->description($c->request->params->{description});
$project->enabled($c->request->params->{enabled} eq "1" ? 1 : 0);
$project->update;
@ -372,6 +373,19 @@ sub download :Local {
$c->serve_static_file($path);
}
sub closure :Local {
my ( $self, $c, $buildId, $productnr ) = @_;
my $build = getBuild($c, $buildId);
return error($c, "Build with ID $buildId doesn't exist.") if !defined $build;
my $product = $build->buildproducts->find({productnr => $productnr});
return error($c, "Build $buildId doesn't have a product $productnr.") if !defined $product;
return error($c, "Not yet implemented.");
}
sub end : ActionClass('RenderView') {}

View file

@ -8,8 +8,8 @@ use base 'DBIx::Class::Schema';
__PACKAGE__->load_classes;
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-17 12:36:40
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:KEl9aBHuDTOb+pkc2Wde0A
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-17 17:09:46
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:uZCNqZeWS46Z2RdysLEDaA
# You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -40,8 +40,8 @@ __PACKAGE__->belongs_to(
);
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-17 12:36:40
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:wkxzzlIrlNAnzUlBQMkx/A
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-17 17:09:46
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:96p2HKZ/6kk0zZKq3JuvDg
# You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -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-17 12:36:40
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:q7krNxyxcF4PlLGT8dmkLQ
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-17 17:09:46
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:zWuDHHMl7eWUWU238D5MWg
# You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -33,8 +33,8 @@ __PACKAGE__->set_primary_key("build", "productnr");
__PACKAGE__->belongs_to("build", "HydraFrontend::Schema::Builds", { id => "build" });
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-17 12:36:40
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:60iPYEFvRtct6aHFChM8Eg
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-17 17:09:46
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:kiP5lQxpuaZUZiqHigHYxQ
# You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -25,8 +25,8 @@ __PACKAGE__->set_primary_key("id");
__PACKAGE__->belongs_to("id", "HydraFrontend::Schema::Builds", { id => "id" });
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-17 12:36:40
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:twJAkSC32lJGcGItKegomg
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-17 17:09:46
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:MqQ972Qn6sjoWbbbzmE1cg
# You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -79,8 +79,8 @@ __PACKAGE__->has_many(
);
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-17 12:36:40
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:kTvNLSNfUxIbzFQ82v+AHg
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-17 17:09:46
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:yYcxVJ1KnjD3KKWt4XQFMg
__PACKAGE__->has_many(dependents => 'HydraFrontend::Schema::Buildinputs', 'dependency');

View file

@ -23,8 +23,8 @@ __PACKAGE__->set_primary_key("id");
__PACKAGE__->belongs_to("id", "HydraFrontend::Schema::Builds", { id => "id" });
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-17 12:36:40
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:a9oTOE0Aw1nHAamSOf+AVw
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-17 17:09:46
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:uAs9z69gMZRAQSzvOGsqEQ
# You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -35,8 +35,8 @@ __PACKAGE__->set_primary_key("id", "stepnr");
__PACKAGE__->belongs_to("id", "HydraFrontend::Schema::Builds", { id => "id" });
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-17 12:36:40
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:8JPNCq31oRo9w3tQGPpwMw
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-17 17:09:46
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:mM/rt5x2l2wMZn+EnctifQ
# You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -31,8 +31,8 @@ __PACKAGE__->belongs_to(
);
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-17 12:36:40
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:EVQbKQiSBV7xXLVym+lUxQ
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-17 17:09:46
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:xj0LojYsbdSMWCv+KUH8sw
# You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -43,8 +43,8 @@ __PACKAGE__->has_many(
);
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-17 12:36:40
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:DcDEOgQY24GPqdhDlleLsQ
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-17 17:09:46
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:VO/SU4tv5UxNAmiwsqn6UA
# You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -48,8 +48,8 @@ __PACKAGE__->has_many(
);
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-17 12:36:40
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:nsVTqxR1wQaamEpy5nNOTQ
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-17 17:09:46
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jZ0kG9EzEJn5mJFSp2WFpw
# You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -14,6 +14,8 @@ __PACKAGE__->add_columns(
{ data_type => "text", is_nullable => 0, size => undef },
"description",
{ data_type => "VARCHAR", is_nullable => 0, size => undef },
"enabled",
{ data_type => "integer", is_nullable => 0, size => undef },
);
__PACKAGE__->set_primary_key("name");
__PACKAGE__->has_many(
@ -28,8 +30,8 @@ __PACKAGE__->has_many(
);
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-17 12:36:40
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:TNoQBA0pY/OwfunCJ+/9Gw
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-17 17:09:46
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:XkQtF1ABmLxvxND62rBlCw
# You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -1,4 +1,5 @@
[% WRAPPER layout.tt title="Hydra Overview" %]
[% PROCESS common.tt %]
[% USE date %]
[% USE mibs=format("%.2f") %]
@ -122,7 +123,7 @@
[% FOREACH input IN build.inputs -%]
<tr>
<td><tt>[% input.name %]</tt></td>
<td><tt>[% input.type %]</tt></td>
<td><tt>[% type = input.type; inputTypes.$type %]</tt></td>
<td>
[% IF input.type == "build" %]
<a href="[% c.uri_for('/build' input.dependency.id) %]">Job <tt>[% input.dependency.project.name %]:[% input.dependency.attrname %]</tt> build [% input.dependency.id %]</a>
@ -200,7 +201,10 @@
[% SWITCH product.type %]
[% CASE "nix-build" %]
Nix build of path <tt>[% product.path %]</tt>
<a href="[% c.uri_for('/closure' build.id product.productnr) %]">
<img src="/static/images/nix-build.png" alt="Source" />
Nix build of path <tt>[% product.path %]</tt>
</a>
[% CASE "file" %]
<a href="[% c.uri_for('/download' build.id product.productnr product.name) %]">
@ -208,7 +212,7 @@
[% CASE "source-dist" %]
<img src="/static/images/source-dist.png" alt="Source" /> Source distribution <tt>[% product.name %]</tt>
[% CASE "rpm" %]
<img src="/static/images/rpm-fedora.png" alt="RPM" /> RPM package <tt>[% product.name %]</tt>
<img src="/static/images/rpm.png" alt="RPM" /> RPM package <tt>[% product.name %]</tt>
[% CASE DEFAULT %]
File <tt>[% product.name %]</tt> of type <tt>[% product.subtype %]</tt>
[% END %]
@ -234,6 +238,7 @@
[% CASE "report" %]
<a href="[% c.uri_for('/download' build.id product.productnr product.name) %]">
<img src="/static/images/report.png" alt="Report" />
[% SWITCH product.subtype %]
[% CASE "coverage" %]
Code coverage analysis report
@ -245,6 +250,7 @@
[% CASE "doc" %]
<a href="[% c.uri_for('/download' build.id product.productnr product.name) %]">
<img src="/static/images/document.png" alt="Document" />
[% SWITCH product.subtype %]
[% CASE "readme" %]
“README” file

View file

@ -0,0 +1,9 @@
[% inputTypes =
{ "svn" = "Subversion checkout"
, "cvs" = "CVS checkout"
, "tarball" = "Download of a tarball"
, "string" = "String value"
, "path" = "Local path"
, "build" = "Build output"
}
%]

View file

@ -360,9 +360,17 @@ input.string {
font-family: sans-serif;
font-size: 100%;
background-color: #fffff0;
width: 30em;
width: 13em;
}
input.shortString {
width: 10em;
width: 7em;
}
select {
background-color: #fffff0;
}
button {
background-color: #f0f0e0;
}

View file

@ -1,7 +1,21 @@
[% WRAPPER layout.tt title="Hydra Overview" %]
[% PROCESS common.tt %]
[% USE HTML %]
[% BLOCK renderSelection %]
[% IF edit %]
<select [% HTML.attributes(id => param, name => param) %]>
[% FOREACH name IN options.keys.sort %]
<option [% HTML.attributes(value => name) %] [% IF name == curValue; "selected='selected'"; END %]>[% options.$name %]</option>
[% END %]
</select>
[% ELSE %]
[% options.$curValue %]
[% END %]
[% END %]
[% BLOCK maybeEditString %]
[% IF edit %]
<input type="text" class="string [% extraClass %]" [% HTML.attributes(id => param, name => param, value => value) %] />
@ -11,22 +25,6 @@
[% END %]
[% BLOCK renderInputType %]
[% SWITCH type %]
[% CASE "svn" %]Subversion checkout
[% CASE "cvs" %]CVS checkout
[% CASE "tarball" %]Download of a tarball
[% CASE "string" %]String value
[% CASE "path" %]Local path
[% END %]
[% END %]
[% BLOCK renderInputTypeOption %]
<option value="[% type %]" [% IF value == type %]selected="selected"[%END %]>[% INCLUDE renderInputType %]</option>
[% END %]
[% BLOCK renderInput %]
<tr class="input [% extraClass %]" id="[% id %]">
@ -39,17 +37,7 @@
<tt>[% INCLUDE maybeEditString param="$baseName-name" value=input.name extraClass="shortString" %]</tt>
</td>
<td>
[% IF edit %]
<select id="[% "$baseName-type" %]" name="[% "$baseName-type" %]">
[% INCLUDE renderInputTypeOption value=input.type type="svn" %]
[% INCLUDE renderInputTypeOption value=input.type type="cvs" %]
[% INCLUDE renderInputTypeOption value=input.type type="tarball" %]
[% INCLUDE renderInputTypeOption value=input.type type="string" %]
[% INCLUDE renderInputTypeOption value=input.type type="path" %]
</select>
[% ELSE %]
[% INCLUDE renderInputType type=input.type %]
[% END %]
[% INCLUDE renderSelection curValue=input.type param="$baseName-type" options=inputTypes %]
</td>
<td class="inputalts" id="[% baseName %]">
[% FOREACH alt IN input.jobsetinputalts -%]
@ -58,7 +46,7 @@
"[% HTML.escape(alt.value) %]"
[% ELSE %]
[% INCLUDE maybeEditString param="$baseName-values" value=alt.value %]
[% IF edit %]<a href="javascript:" onclick='$(this).parents(".inputalt").remove()'>[X]</a>[% END %]
[% IF edit %]<a href="javascript:" onclick='$(this).parents(".inputalt").remove()'>[X]</a><br />[% END %]
[% END %]
</tt>
[% END %]
@ -153,6 +141,12 @@
<th>Description:</th>
<td>[% INCLUDE maybeEditString param="description" value=curProject.description %]</td>
</tr>
<tr>
<th>Enabled:</th>
<td>
[% INCLUDE renderSelection param="enabled" curValue=curProject.enabled options={"1" = "Yes", "0" = "No"} %]
</td>
</tr>
</table>
@ -278,14 +272,14 @@
<hr />
<p><input type="submit" value="[% IF create %]Create[% ELSE %]Apply changes[% END %]" /></p>
<p><button type="submit"><img src="/static/images/success.gif" />[%IF create %]Create[% ELSE %]Apply changes[% END %]</button></p>
</form>
[% IF !create %]
<form action="[% c.uri_for('/project' curProject.name 'delete') %]" method="post">
<p><input id="delete-project" type="submit" value="Delete this project" /></p>
<p><button id="delete-project" type="submit"><img src="/static/images/failure.gif" />Delete this project</button></p>
</form>
<script>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 534 B

After

Width:  |  Height:  |  Size: 2.2 KiB

View file

@ -151,7 +151,8 @@ create trigger cascadeBuildDeletion
create table Projects (
name text primary key not null, -- project id, lowercase (e.g. "patchelf")
displayName text not null, -- display name (e.g. "PatchELF")
description text
description text,
enabled integer not null default 1
);