From 2a9545d7afb77180f24456131a2381c7a7ae5cc6 Mon Sep 17 00:00:00 2001 From: zyh Date: Wed, 15 May 2024 17:41:02 +0800 Subject: [PATCH] =?UTF-8?q?NEZ-3471=20fix:=20=E5=A4=8D=E5=88=B6=E6=B5=8F?= =?UTF-8?q?=E8=A7=88=E5=99=A8url=E8=AE=BF=E9=97=AE=EF=BC=8C=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=9D=A1=E4=BB=B6=E6=9C=AA=E6=AD=A3=E7=A1=AE=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/page/dashboard/explore/exploreItem.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/nezha-fronted/src/components/page/dashboard/explore/exploreItem.vue b/nezha-fronted/src/components/page/dashboard/explore/exploreItem.vue index c7bd90803..0d59aab83 100644 --- a/nezha-fronted/src/components/page/dashboard/explore/exploreItem.vue +++ b/nezha-fronted/src/components/page/dashboard/explore/exploreItem.vue @@ -3992,7 +3992,11 @@ export default { // 过滤掉state为0的元素 this.expressions.forEach((item, index) => { if (item != '' && this.promqlKeys[index].state && item) { - requestArr.push(this.$get('/logs/loki/api/v1/query_range?format=1&query=' + encodeURIComponent(item) + '&start=' + this.$stringTimeParseToUnix(bus.formateTimeToTime(this.filterTime[0])) + '&end=' + this.$stringTimeParseToUnix(bus.formateTimeToTime(this.filterTime[1])) + '&limit=' + limit)) + let query = '/logs/loki/api/v1/query_range?format=1&query=' + encodeURIComponent(item) + '&start=' + this.$stringTimeParseToUnix(bus.formateTimeToTime(this.filterTime[0])) + '&end=' + this.$stringTimeParseToUnix(bus.formateTimeToTime(this.filterTime[1])) + '&limit=' + limit + if (this.promqlKeys[index].step) { + query += '&step=' + this.promqlKeys[index].step + 's' + } + requestArr.push(this.$get(query)) realArr.push(index) } }) @@ -4465,7 +4469,7 @@ export default { const nowTimeType = data.nowTimeType this.filterTime = data.searchTime if (nowTimeType && nowTimeType.type) { - this.setSearchTime('filterTime') + this.setSearchTime('filterTime', nowTimeType) } if (nowTimeType) { nowTimeType.start_time = this.filterTime[0]