Skip to content

Commit 0e343a7

Browse files
authored
feat: load mask for deployment details panel (#1336)
1 parent 66abb10 commit 0e343a7

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

client/src/js/appDataAdmin.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
async function addAppDataAdmin( params ) {
2+
let detailBodyWrapEl
23
try {
34
let { treePath } = params
45
const tab = Ext.getCmp('main-tab-panel').getItem('appdata-admin-tab')
@@ -250,6 +251,8 @@ async function addAppDataAdmin( params ) {
250251
})
251252
thisTab.show()
252253

254+
detailBodyWrapEl = detailJson.getEl().child('.x-panel-bwrap')
255+
detailBodyWrapEl.mask('Getting data...')
253256
const detailResponseText = (await getDetail()).response.responseText //used by downloadBlob
254257
const detailTree = JsonView.createTree(JSON.parse(detailResponseText))
255258
// adjust for rendering
@@ -258,10 +261,12 @@ async function addAppDataAdmin( params ) {
258261
detailTree.isExpanded = true
259262
detailTree.children[0].isExpanded = true
260263

261-
const el = detailJson.body
262-
JsonView.render(detailTree, el)
264+
JsonView.render(detailTree, detailJson.body)
263265
}
264266
catch (e) {
265267
SM.Error.handleError(e)
266268
}
269+
finally {
270+
detailBodyWrapEl.unmask()
271+
}
267272
}

0 commit comments

Comments
 (0)