Module: tools Branch: master Commit: 938ba099ac2a888271cfab4d60dd4df3244723fd URL: http://source.winehq.org/git/tools.git/?a=commit;h=938ba099ac2a888271cfab4d6...
Author: Francois Gouget fgouget@codeweavers.com Date: Thu Mar 28 14:43:28 2013 +0100
testbot/web: Refresh the JobDetails page normally after canceling or restarting a job.
This is possible now that Job::Cancel() updates the job status synchronously.
---
testbot/web/JobDetails.pl | 27 ++++----------------------- 1 files changed, 4 insertions(+), 23 deletions(-)
diff --git a/testbot/web/JobDetails.pl b/testbot/web/JobDetails.pl index 429a87c..944d178 100644 --- a/testbot/web/JobDetails.pl +++ b/testbot/web/JobDetails.pl @@ -167,7 +167,8 @@ sub OnCancel return !1; }
- return 1; + $self->Redirect("/JobDetails.pl?Key=" . $self->{JobId}); + exit; }
sub OnRestart @@ -188,7 +189,8 @@ sub OnRestart return !1; }
- return 1; + $self->Redirect("/JobDetails.pl?Key=" . $self->{JobId}); + exit; }
sub OnAction @@ -238,27 +240,6 @@ sub GenerateBody { my $self = shift;
- if ($self->{ActionPerformed}) - { - print "<h1>" . $self->GetTitle() . "</h1>\n"; - print "<div class='Content'>\n"; - my $Action = $self->GetParam("Action"); - if ($Action eq "Cancel job") - { - print "<p>Job will be canceled.</p>\n"; - } - elsif ($Action eq "Restart job") - { - print "<p>Job will be restarted.</p>\n"; - } - else - { - print "<p>Unknown action $Action.</p>\n"; - } - print "</div>\n"; - return; - } - $self->SUPER::GenerateBody(@_);
print "<div class='Content'>\n";