File tree 2 files changed +8
-2
lines changed
core/src/main/resources/hudson/widgets/HistoryWidget
src/main/js/pages/project
2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,10 @@ THE SOFTWARE.
49
49
clazz =" ${page.runs.isEmpty() and page.queueItems.isEmpty() ? 'jenkins-hidden' : ''}" />
50
50
51
51
<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" >
53
56
${%No builds}
54
57
</div >
55
58
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ const ajaxUrl = buildHistoryPage.getAttribute("page-ajax");
9
9
const card = document . querySelector ( "#jenkins-builds" ) ;
10
10
const contents = card . querySelector ( "#jenkins-build-history" ) ;
11
11
const container = card . querySelector ( ".app-builds-container" ) ;
12
+ const loadingBuilds = card . querySelector ( "#loading-builds" ) ;
12
13
const noBuilds = card . querySelector ( "#no-builds" ) ;
13
14
14
15
// Pagination controls
@@ -58,6 +59,7 @@ function load(options = {}) {
58
59
if ( responseText . trim ( ) === "" ) {
59
60
contents . innerHTML = "" ;
60
61
noBuilds . style . display = "block" ;
62
+ loadingBuilds . style . display = "none" ;
61
63
updateCardControls ( {
62
64
pageHasUp : false ,
63
65
pageHasDown : false ,
@@ -69,7 +71,7 @@ function load(options = {}) {
69
71
70
72
// Show the refreshed builds list
71
73
contents . innerHTML = responseText ;
72
- noBuilds . style . display = "none" ;
74
+ loadingBuilds . style . display = "none" ;
73
75
behaviorShim . applySubtree ( contents ) ;
74
76
75
77
// Show the card controls
@@ -146,6 +148,7 @@ document.addEventListener("DOMContentLoaded", function () {
146
148
debouncedLoad ( ) ;
147
149
} ) ;
148
150
151
+ container . classList . add ( "app-builds-container--loading" ) ;
149
152
load ( ) ;
150
153
151
154
window . addEventListener ( "focus" , function ( ) {
You can’t perform that action at this time.
0 commit comments