Francois Gouget : testbot/web: Better document the job details page reloads.
Alexandre Julliard
julliard at winehq.org
Mon Apr 4 15:32:47 CDT 2022
Module: tools
Branch: master
Commit: d4eb21b18ef5ae4538b6c7b8b6c51352ae032fc6
URL: https://source.winehq.org/git/tools.git/?a=commit;h=d4eb21b18ef5ae4538b6c7b8b6c51352ae032fc6
Author: Francois Gouget <fgouget at codeweavers.com>
Date: Mon Apr 4 18:09:00 2022 +0200
testbot/web: Better document the job details page reloads.
Also use $SCRIPT_NAME instead of hardcoding the script name.
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
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 7e1df1f..ccd4044 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($$)
More information about the wine-cvs
mailing list