* Boolean inputs.

This commit is contained in:
Eelco Dolstra
2008-11-25 18:34:24 +00:00
parent 1698e490d0
commit c72f4dd67a
19 changed files with 53 additions and 35 deletions

View File

@ -134,7 +134,7 @@ sub updateProject {
my $inputType = trim $c->request->params->{"jobset-$baseName-input-$baseName2-type"};
die "Invalid input type: $inputType" unless
$inputType eq "svn" || $inputType eq "cvs" || $inputType eq "tarball" ||
$inputType eq "string" || $inputType eq "path";
$inputType eq "string" || $inputType eq "path" || $inputType eq "boolean";
$inputNames{$inputName} = 1;
@ -161,7 +161,10 @@ sub updateProject {
my $altnr = 0;
foreach my $value (@{$values}) {
print STDERR "VALUE: $value\n";
$input->jobsetinputalts->create({altnr => $altnr++, value => trim $value});
my $value = trim $value;
die "Invalid Boolean value: $value" if
$inputType eq "boolean" && !($value eq "true" || $value eq "false");
$input->jobsetinputalts->create({altnr => $altnr++, value => $value});
}
}

View File

@ -8,8 +8,8 @@ use base 'DBIx::Class::Schema';
__PACKAGE__->load_classes;
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 18:59:54
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:woBkuPRoV3DnJmHdcZ2ZIg
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 19:24:09
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:TBu7KS/p71rCVTI6cl7Thw
# You can replace this text with custom content, and it will be preserved on regeneration

View File

@ -36,8 +36,8 @@ __PACKAGE__->belongs_to("build", "Hydra::Schema::Builds", { id => "build" });
__PACKAGE__->belongs_to("dependency", "Hydra::Schema::Builds", { id => "dependency" });
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 18:59:54
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Mwn4Pp+vduPrAU9s089pAg
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 19:24:09
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Z/kUflLoTmq+0tM82kxVYw
# 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", "Hydra::Schema::Builds", { id => "build" });
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 18:59:54
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:kzQauEWWXur6WilY/1LcfA
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 19:24:09
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gmWXPz3CSN4WOUTrcxXzQw
# You can replace this text with custom content, and it will be preserved on regeneration

View File

@ -29,8 +29,8 @@ __PACKAGE__->set_primary_key("id");
__PACKAGE__->belongs_to("id", "Hydra::Schema::Builds", { id => "id" });
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 18:59:54
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:85sz3phT3arumqXladRtMQ
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 19:24:09
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7iNqQ1Q912X3/TiDPk/RWA
# You can replace this text with custom content, and it will be preserved on regeneration

View File

@ -70,8 +70,8 @@ __PACKAGE__->has_many(
);
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 18:59:54
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:1fnKUzCj0eAt4HWx0UB3SA
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 19:24:09
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:u9AGxpJIQFY0RAILvnaIKA
__PACKAGE__->has_many(dependents => 'Hydra::Schema::Buildinputs', 'dependency');

View File

@ -23,8 +23,8 @@ __PACKAGE__->set_primary_key("id");
__PACKAGE__->belongs_to("id", "Hydra::Schema::Builds", { id => "id" });
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 18:59:54
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:+a/kUdHtdjxdAOBSWdUsVA
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 19:24:09
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:cqaeltO0pjpVPv2Ah54SQg
# 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", "Hydra::Schema::Builds", { id => "id" });
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 18:59:54
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:FYosIfp2O9OAolXdzalK+Q
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 19:24:09
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dJac1j1n7A2sQBrfgdLdYg
# You can replace this text with custom content, and it will be preserved on regeneration

View File

@ -22,8 +22,8 @@ __PACKAGE__->add_columns(
__PACKAGE__->set_primary_key("srcpath", "sha256hash");
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 18:59:54
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:KhMAz8E3CDxG2D+zleQEFw
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 19:24:09
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:5sHH9qbQ5WtUf2oRjXbwuw
# You can replace this text with custom content, and it will be preserved on regeneration

View File

@ -20,8 +20,8 @@ __PACKAGE__->add_columns(
__PACKAGE__->set_primary_key("uri", "revision");
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 18:59:54
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:S62F6Z2wPT/+NoIApQcBmQ
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 19:24:09
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:k1xO/rt0fxTjvtkPY/Jwfw
# 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-25 18:59:54
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:6N8dRzQi9IYgP5F2rbDtWg
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 19:24:09
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:B8hAt4GezVJ1/uo4ZQ3Q2g
# 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-25 18:59:54
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:QeB1Zh2L3q81y5j+fLcazw
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 19:24:09
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:4ev1n8miWroPWPRoQBc0cA
# 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-25 18:59:54
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:6aZCPgci+SLJuoGHcR3boA
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 19:24:09
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7kRl30K427lecYirFGBxew
# You can replace this text with custom content, and it will be preserved on regeneration

View File

@ -30,8 +30,8 @@ __PACKAGE__->has_many(
);
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 18:59:54
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:meEhwhiWsywgQlrkwOz48A
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 19:24:09
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ZBkLod0Yw87pgQGAEuk7Zg
# You can replace this text with custom content, and it will be preserved on regeneration