diff --git a/src/lib/Hydra/Controller/Jobset.pm b/src/lib/Hydra/Controller/Jobset.pm index e0d5ee83..b8a149d2 100644 --- a/src/lib/Hydra/Controller/Jobset.pm +++ b/src/lib/Hydra/Controller/Jobset.pm @@ -53,6 +53,8 @@ sub jobset_PUT { my $uri = $c->uri_for($self->action_for("jobset"), [$c->stash->{project}->name, $c->stash->{jobset}->name]) . "#tabs-configuration"; $self->status_ok($c, entity => { redirect => "$uri" }); + + $c->flash->{successMsg} = "The jobset configuration has been updated."; } else { @@ -85,6 +87,8 @@ sub jobset_DELETE { my $uri = $c->uri_for($c->controller('Project')->action_for("project"), [$c->stash->{project}->name]); $self->status_ok($c, entity => { redirect => "$uri" }); + + $c->flash->{successMsg} = "The jobset has been deleted."; } @@ -107,7 +111,7 @@ sub jobs_tab : Chained('jobsetChain') PathPart('jobs-tab') Args(0) { { columns => ['id', 'job', 'finished', 'buildstatus'] }); foreach my $b (@builds) { my $jobName = $b->get_column('job'); - $evals->{$eval->id}->{$jobName} = + $evals->{$eval->id}->{$jobName} = { id => $b->id, finished => $b->finished, buildstatus => $b->buildstatus }; $jobs{$jobName} = 1; $nrBuilds++; diff --git a/src/lib/Hydra/Controller/Project.pm b/src/lib/Hydra/Controller/Project.pm index 8a7f39da..f2cede92 100644 --- a/src/lib/Hydra/Controller/Project.pm +++ b/src/lib/Hydra/Controller/Project.pm @@ -59,6 +59,8 @@ sub project_PUT { my $uri = $c->uri_for($self->action_for("project"), [$c->stash->{project}->name]) . "#tabs-configuration"; $self->status_ok($c, entity => { redirect => "$uri" }); + + $c->flash->{successMsg} = "The project configuration has been updated."; } else { @@ -95,6 +97,8 @@ sub project_DELETE { my $uri = $c->res->redirect($c->uri_for("/")); $self->status_ok($c, entity => { redirect => "$uri" }); + + $c->flash->{successMsg} = "The project has been deleted."; } diff --git a/src/root/layout.tt b/src/root/layout.tt index cf58d27b..b2b76910 100644 --- a/src/root/layout.tt +++ b/src/root/layout.tt @@ -67,17 +67,17 @@ [% IF flashMsg %]
-

[% flashMsg %]

+
[% flashMsg %]
[% END %] [% IF successMsg %]
-

[% successMsg %]

+
[% successMsg %]
[% END %] [% IF errorMsg %]
-

Error: [% errorMsg %]

+
Error: [% errorMsg %]
[% END %] [% IF !hideHeader %]