Skip to content

Commit

Permalink
feat: load mask for deployment details panel (NUWCDIVNPT#1336)
Browse files Browse the repository at this point in the history
  • Loading branch information
csmig authored Jul 29, 2024
1 parent 66abb10 commit 0e343a7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions client/src/js/appDataAdmin.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
async function addAppDataAdmin( params ) {
let detailBodyWrapEl
try {
let { treePath } = params
const tab = Ext.getCmp('main-tab-panel').getItem('appdata-admin-tab')
Expand Down Expand Up @@ -250,6 +251,8 @@ async function addAppDataAdmin( params ) {
})
thisTab.show()

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

const el = detailJson.body
JsonView.render(detailTree, el)
JsonView.render(detailTree, detailJson.body)
}
catch (e) {
SM.Error.handleError(e)
}
finally {
detailBodyWrapEl.unmask()
}
}

0 comments on commit 0e343a7

Please sign in to comment.