diff --git a/Plan/common/src/main/resources/assets/plan/web/js/query.js b/Plan/common/src/main/resources/assets/plan/web/js/query.js index 994d15b68..92fee8c24 100644 --- a/Plan/common/src/main/resources/assets/plan/web/js/query.js +++ b/Plan/common/src/main/resources/assets/plan/web/js/query.js @@ -271,11 +271,17 @@ function runQuery() { queryButton.setAttribute('disabled', 'true'); queryButton.classList.add('disabled'); - // document.querySelector('#content .tab').innerHTML = - // `
- // - //

Loading..

- //
`; + if (timestamp) { + document.querySelector('#content .tab').innerHTML = + `
+ +

Loading..

+
`; + } else { + const icon = document.createElement('template'); + icon.innerHTML = '' + queryButton.querySelector('.fa').replaceWith(icon.content); + } jsonRequest(getQueryAddress(), function (json, error) { const previousPath = document.getElementById('result-path'); @@ -290,6 +296,9 @@ function runQuery() { // Reset query queryButton.removeAttribute('disabled'); queryButton.classList.remove('disabled'); + const icon = document.createElement('template'); + icon.innerHTML = '' + queryButton.querySelector('.loader').replaceWith(icon.content); query.splice(0, query.length); } else { // Cached query expired