This commit is contained in:
parent
77e1bb7527
commit
83d6ad7aa2
|
@ -126,7 +126,7 @@ sub project :Local {
|
|||
$c->model('DB')->schema->txn_do(sub {
|
||||
updateProject($c, $project);
|
||||
});
|
||||
return $c->res->redirect($c->uri_for("/project", $projectName));
|
||||
return $c->res->redirect($c->uri_for("/project", $c->request->params->{name}));
|
||||
} elsif ($subcommand eq "delete" && $isPosted) {
|
||||
$c->model('DB')->schema->txn_do(sub {
|
||||
$project->delete;
|
||||
|
|
|
@ -13,15 +13,21 @@
|
|||
|
||||
[% BLOCK renderJobset %]
|
||||
|
||||
<div class="indent jobset">
|
||||
<div class="jobset">
|
||||
|
||||
<h3>Jobset <tt>[% INCLUDE maybeEditString param="jobset-$baseName-name" value=jobset.name %]</tt></h3>
|
||||
<h3>[% IF jobset %]Jobset <tt>[% jobset.name %]</tt>[% ELSE %]New jobset[% END %]</h3>
|
||||
|
||||
<div class="indent">
|
||||
<div class="indent">
|
||||
|
||||
<h4>Information</h4>
|
||||
|
||||
<table>
|
||||
[% IF edit %]
|
||||
<tr>
|
||||
<th>Identifier:</th>
|
||||
<td>[% INCLUDE maybeEditString param="jobset-$baseName-name" value=jobset.name %]</td>
|
||||
</tr>
|
||||
[% END %]
|
||||
<tr>
|
||||
<th>Description:</th>
|
||||
<td>[% INCLUDE maybeEditString param="jobset-$baseName-description" value=jobset.description %]</td>
|
||||
|
@ -137,7 +143,7 @@
|
|||
$("#add-jobset").click(function() {
|
||||
var newid = "jobset-" + id++;
|
||||
$("#jobset-template").clone(true).attr("id", newid).insertAfter($("#jobset-template")).show();
|
||||
$("#jobset-template-name", $("#" + newid)).attr("name", newid + "-name").attr("value", newid);
|
||||
$("#jobset-template-name", $("#" + newid)).attr("name", newid + "-name").attr("value", "trunk");
|
||||
$("#jobset-template-description", $("#" + newid)).attr("name", newid + "-description");
|
||||
$("#jobset-template-nixexprpath", $("#" + newid)).attr("name", newid + "-nixexprpath");
|
||||
$("#jobset-template-nixexprinput", $("#" + newid)).attr("name", newid + "-nixexprinput");
|
||||
|
|
|
@ -155,6 +155,16 @@ create table Projects (
|
|||
);
|
||||
|
||||
|
||||
create trigger cascadeProjectUpdate
|
||||
update of name on Projects
|
||||
for each row begin
|
||||
update Jobsets set project = new.name where project = old.name;
|
||||
update JobsetInputs set project = new.name where project = old.name;
|
||||
update JobsetInputAlts set project = new.name where project = old.name;
|
||||
update Builds set project = new.name where project = old.name;
|
||||
end;
|
||||
|
||||
|
||||
-- A jobset consists of a set of inputs (e.g. SVN repositories), one
|
||||
-- of which contains a Nix expression containing an attribute set
|
||||
-- describing build jobs.
|
||||
|
@ -170,6 +180,15 @@ create table Jobsets (
|
|||
);
|
||||
|
||||
|
||||
create trigger cascadeJobsetUpdate
|
||||
update of name on jobsets
|
||||
for each row begin
|
||||
update JobsetInputs set jobset = new.name where jobset = old.name;
|
||||
update JobsetInputAlts set jobset = new.name where jobset = old.name;
|
||||
update Builds set jobset = new.name where jobset = old.name;
|
||||
end;
|
||||
|
||||
|
||||
create table JobsetInputs (
|
||||
project text not null,
|
||||
jobset text not null,
|
||||
|
|
Loading…
Reference in a new issue