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";
|
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" });
|
$self->status_ok($c, entity => { redirect => "$uri" });
|
||||||
|
|
||||||
|
$c->flash->{successMsg} = "The jobset configuration has been updated.";
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
|
@ -85,6 +87,8 @@ sub jobset_DELETE {
|
||||||
|
|
||||||
my $uri = $c->uri_for($c->controller('Project')->action_for("project"), [$c->stash->{project}->name]);
|
my $uri = $c->uri_for($c->controller('Project')->action_for("project"), [$c->stash->{project}->name]);
|
||||||
$self->status_ok($c, entity => { redirect => "$uri" });
|
$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'] });
|
{ columns => ['id', 'job', 'finished', 'buildstatus'] });
|
||||||
foreach my $b (@builds) {
|
foreach my $b (@builds) {
|
||||||
my $jobName = $b->get_column('job');
|
my $jobName = $b->get_column('job');
|
||||||
$evals->{$eval->id}->{$jobName} =
|
$evals->{$eval->id}->{$jobName} =
|
||||||
{ id => $b->id, finished => $b->finished, buildstatus => $b->buildstatus };
|
{ id => $b->id, finished => $b->finished, buildstatus => $b->buildstatus };
|
||||||
$jobs{$jobName} = 1;
|
$jobs{$jobName} = 1;
|
||||||
$nrBuilds++;
|
$nrBuilds++;
|
||||||
|
|
|
@ -59,6 +59,8 @@ sub project_PUT {
|
||||||
|
|
||||||
my $uri = $c->uri_for($self->action_for("project"), [$c->stash->{project}->name]) . "#tabs-configuration";
|
my $uri = $c->uri_for($self->action_for("project"), [$c->stash->{project}->name]) . "#tabs-configuration";
|
||||||
$self->status_ok($c, entity => { redirect => "$uri" });
|
$self->status_ok($c, entity => { redirect => "$uri" });
|
||||||
|
|
||||||
|
$c->flash->{successMsg} = "The project configuration has been updated.";
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
|
@ -95,6 +97,8 @@ sub project_DELETE {
|
||||||
|
|
||||||
my $uri = $c->res->redirect($c->uri_for("/"));
|
my $uri = $c->res->redirect($c->uri_for("/"));
|
||||||
$self->status_ok($c, entity => { redirect => "$uri" });
|
$self->status_ok($c, entity => { redirect => "$uri" });
|
||||||
|
|
||||||
|
$c->flash->{successMsg} = "The project has been deleted.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -67,17 +67,17 @@
|
||||||
|
|
||||||
[% IF flashMsg %]
|
[% IF flashMsg %]
|
||||||
<br />
|
<br />
|
||||||
<p class="btn-info btn-large">[% flashMsg %]</p>
|
<div class="alert alert-info">[% flashMsg %]</div>
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
||||||
[% IF successMsg %]
|
[% IF successMsg %]
|
||||||
<br />
|
<br />
|
||||||
<p class="btn-success btn-large">[% successMsg %]</p>
|
<div class="alert alert-success">[% successMsg %]</div>
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
||||||
[% IF errorMsg %]
|
[% IF errorMsg %]
|
||||||
<br />
|
<br />
|
||||||
<p class="btn-warning btn-large">Error: [% errorMsg %]</p>
|
<div class="alert alert-warning">Error: [% errorMsg %]</div>
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
||||||
[% IF !hideHeader %]
|
[% IF !hideHeader %]
|
||||||
|
|
Loading…
Reference in a new issue