forked from lix-project/hydra
Use more flash messages
This commit is contained in:
parent
383bc62803
commit
550bf210fe
|
@ -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++;
|
||||
|
|
|
@ -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.";
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -67,17 +67,17 @@
|
|||
|
||||
[% IF flashMsg %]
|
||||
<br />
|
||||
<p class="btn-info btn-large">[% flashMsg %]</p>
|
||||
<div class="alert alert-info">[% flashMsg %]</div>
|
||||
[% END %]
|
||||
|
||||
[% IF successMsg %]
|
||||
<br />
|
||||
<p class="btn-success btn-large">[% successMsg %]</p>
|
||||
<div class="alert alert-success">[% successMsg %]</div>
|
||||
[% END %]
|
||||
|
||||
[% IF errorMsg %]
|
||||
<br />
|
||||
<p class="btn-warning btn-large">Error: [% errorMsg %]</p>
|
||||
<div class="alert alert-warning">Error: [% errorMsg %]</div>
|
||||
[% END %]
|
||||
|
||||
[% IF !hideHeader %]
|
||||
|
|
Loading…
Reference in a new issue