[JENKINS-73613] refresh buildhistory widget in all cases #9624
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
refresh the buildHistory widget instantly when the window gets focus, e.g. after switching browser tabs but also when one was in another application and clicks in the browser window.
When the window is visible it will update even when it has no focus, when the window is hidden no calls to the controller will be done.
Additionally the buildHistory will be updated when it is not on the first page. So e.g. when someone deletes a build, changes the display name or the description or when a build is still running the page gets updated.
This replaces #9605
See JENKINS-73613.
See JENKINS-73592.
Testing done
Manual testing
Create a job and run it at least once
From dashboard view open the job in a new tab
switch to tab -> the history should load instantly
make the job run for longer time and start it once (
sleep 300
)reconfigure the job to do nothing
run the job over 30 times until the long running build is on the second page of the history
go to second page of history and see that the still running build gets updated and finally finishes
in another browser window delete a build from the second page -> build is removed
in another browser window, change the display name and/or description of a build-> name/description changes
Proposed changelog entries
Proposed upgrade guidelines
N/A
Submitter checklist
Desired reviewers
@mention
Before the changes are marked as
ready-for-merge
:Maintainer checklist