fix: panel请求保存的问题
This commit is contained in:
@@ -168,7 +168,7 @@ export default {
|
||||
this.tableData = []
|
||||
this.tableDataCopy = ''
|
||||
setTimeout(() => {
|
||||
this.$get('/prom/api/v1/query?query=' + escape("{endpoint='" + this.currentEndpoint.id + "'}") + '&time=' + this.$stringTimeParseToUnix(new Date(this.formatTime).getTime())).then(response => {
|
||||
this.$get('/prom/api/v1/query?query=' + encodeURIComponent("{endpoint='" + this.currentEndpoint.id + "'}") + '&time=' + this.$stringTimeParseToUnix(new Date(this.formatTime).getTime())).then(response => {
|
||||
this.loading = false
|
||||
if (response.status === 'success') {
|
||||
const results = response.data.result
|
||||
@@ -378,13 +378,13 @@ export default {
|
||||
}
|
||||
const axiosArr = []
|
||||
for (const endpoint of this.batchDeleteObjs) {
|
||||
axiosArr.push(axios.get('/prom/api/v1/query_range?query=' + escape(endpoint.element) + '&start=' + this.$stringTimeParseToUnix(start) + '&end=' + this.$stringTimeParseToUnix(end) + '&step=' + step))
|
||||
axiosArr.push(axios.get('/prom/api/v1/query_range?query=' + encodeURIComponent(endpoint.element) + '&start=' + this.$stringTimeParseToUnix(start) + '&end=' + this.$stringTimeParseToUnix(end) + '&step=' + step))
|
||||
}
|
||||
if (this.$refs.pickTime && this.$refs.pickTime.$refs.multipleTime && this.$refs.pickTime.$refs.multipleTime.searchTime.length) { // 判断是否需要添加比较
|
||||
const startTime = bus.timeFormate(this.$refs.pickTime.$refs.multipleTime.searchTime[0], 'yyyy-MM-dd hh:mm:ss')
|
||||
const endTime = bus.timeFormate(this.$refs.pickTime.$refs.multipleTime.searchTime[1], 'yyyy-MM-dd hh:mm:ss')
|
||||
for (const endpoint of this.batchDeleteObjs) {
|
||||
axiosArr.push(axios.get('/prom/api/v1/query_range?query=' + escape(endpoint.element) + '&start=' + this.$stringTimeParseToUnix(startTime) + '&end=' + this.$stringTimeParseToUnix(endTime) + '&step=' + step))
|
||||
axiosArr.push(axios.get('/prom/api/v1/query_range?query=' + encodeURIComponent(endpoint.element) + '&start=' + this.$stringTimeParseToUnix(startTime) + '&end=' + this.$stringTimeParseToUnix(endTime) + '&step=' + step))
|
||||
}
|
||||
}
|
||||
this.legend = []
|
||||
|
||||
Reference in New Issue
Block a user