Also use $SCRIPT_NAME instead of hardcoding the script name.
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- testbot/web/JobDetails.pl | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/testbot/web/JobDetails.pl b/testbot/web/JobDetails.pl index 7e1df1ffa..ccd40443a 100644 --- a/testbot/web/JobDetails.pl +++ b/testbot/web/JobDetails.pl @@ -256,7 +256,11 @@ sub OnCancel($) return !1; }
- exit($self->{EnclosingPage}->Redirect("/JobDetails.pl?Key=$JobId")); + # Ideally this would use something like GetMoreInfoLink() to rebuild a Get + # URL to preserve which logs and screenshots have been expanded. But the + # anchor would likely be lost anyway. + # So just do a basic reload to refresh the tasks' status. + exit($self->{EnclosingPage}->Redirect($ENV{"SCRIPT_NAME"} ."?Key=$JobId")); }
sub OnRestart($) @@ -278,7 +282,10 @@ sub OnRestart($) return !1; }
- exit($self->{EnclosingPage}->Redirect("/JobDetails.pl?Key=$JobId")); + # Reload to refresh the tasks' status. Note that all logs and screenshots + # have been cleared so there is no point specifying which one to open or + # adding an anchor. + exit($self->{EnclosingPage}->Redirect($ENV{"SCRIPT_NAME"} ."?Key=$JobId")); }
sub OnAction($$)