File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
core/src/main/resources/hudson/widgets/HistoryWidget
src/main/js/pages/project Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,10 @@ THE SOFTWARE.
4949 clazz =" ${page.runs.isEmpty() and page.queueItems.isEmpty() ? 'jenkins-hidden' : ''}" />
5050
5151 <div class =" app-builds-container" >
52- <div id =" no-builds" class =" app-builds-container__placeholder" >
52+ <div id =" loading-builds" class =" app-builds-container__placeholder" >
53+ <l : spinner text =" ${%Loading builds...}" />
54+ </div >
55+ <div id =" no-builds" style =" display:none" class =" app-builds-container__placeholder" >
5356 ${%No builds}
5457 </div >
5558
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ const ajaxUrl = buildHistoryPage.getAttribute("page-ajax");
99const card = document . querySelector ( "#jenkins-builds" ) ;
1010const contents = card . querySelector ( "#jenkins-build-history" ) ;
1111const container = card . querySelector ( ".app-builds-container" ) ;
12+ const loadingBuilds = card . querySelector ( "#loading-builds" ) ;
1213const noBuilds = card . querySelector ( "#no-builds" ) ;
1314
1415// Pagination controls
@@ -58,6 +59,7 @@ function load(options = {}) {
5859 if ( responseText . trim ( ) === "" ) {
5960 contents . innerHTML = "" ;
6061 noBuilds . style . display = "block" ;
62+ loadingBuilds . style . display = "none" ;
6163 updateCardControls ( {
6264 pageHasUp : false ,
6365 pageHasDown : false ,
@@ -69,7 +71,7 @@ function load(options = {}) {
6971
7072 // Show the refreshed builds list
7173 contents . innerHTML = responseText ;
72- noBuilds . style . display = "none" ;
74+ loadingBuilds . style . display = "none" ;
7375 behaviorShim . applySubtree ( contents ) ;
7476
7577 // Show the card controls
@@ -146,6 +148,7 @@ document.addEventListener("DOMContentLoaded", function () {
146148 debouncedLoad ( ) ;
147149 } ) ;
148150
151+ container . classList . add ( "app-builds-container--loading" ) ;
149152 load ( ) ;
150153
151154 window . addEventListener ( "focus" , function ( ) {
You can’t perform that action at this time.
0 commit comments