fix:多次无用加载修复
This commit is contained in:
@@ -576,6 +576,7 @@ export default {
|
||||
}
|
||||
let axiosArr=[];
|
||||
let paramStr = JSON.stringify(this.promQueryParamConvert(this.currentMsg));
|
||||
if(paramStr&¶mStr.trim()!='""'){
|
||||
axiosArr.push(axios.get("/prom/api/v1/query_range?query="+paramStr.substring(1, paramStr.length-1).replace(/\+/g, "%2B").replace(/ /g, "%20").replace(/\\/g, "")+"&start="+this.$stringTimeParseToUnix(start)+"&end="+this.$stringTimeParseToUnix(end)+"&step="+step));
|
||||
this.legend = [];
|
||||
this.chartDatas = [];
|
||||
@@ -630,6 +631,7 @@ export default {
|
||||
this.$refs.messageChart.endLoading();
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
getAlertList: function (filterType) {
|
||||
let queryParam={
|
||||
@@ -669,7 +671,7 @@ export default {
|
||||
this.storedTableData.forEach((item) => {
|
||||
item.labels = JSON.parse(item.labels);
|
||||
let paramStr = JSON.stringify(this.promQueryParamConvert(item));
|
||||
if(paramStr&& paramStr !=''){
|
||||
if(paramStr&& paramStr !='""'){
|
||||
this.$get('/prom/api/v1/query?query=' + paramStr.substring(1, paramStr.length-1).replace(/\+/g, "%2B").replace(/ /g, "%20").replace(/\\/g, "")).then(response2 => {
|
||||
let current = [];
|
||||
if (response2.data && response2.data.result && response2.data.result.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user