From 3adb337934a9e7082041ad5a9985a36968a8e353 Mon Sep 17 00:00:00 2001 From: zhangyu Date: Wed, 14 Jul 2021 10:37:20 +0800 Subject: [PATCH] =?UTF-8?q?NEZ=3D824=20fix=EF=BC=9B=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E6=97=B6=E9=97=B4=E5=90=8E=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nezha-fronted/src/components/page/alert/alertMessage.vue | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/nezha-fronted/src/components/page/alert/alertMessage.vue b/nezha-fronted/src/components/page/alert/alertMessage.vue index 332219f2c..dfdd4129e 100644 --- a/nezha-fronted/src/components/page/alert/alertMessage.vue +++ b/nezha-fronted/src/components/page/alert/alertMessage.vue @@ -82,6 +82,7 @@ { + this.searchTimeDialog = [bus.computeTimezoneTime(new Date().getTime() - 1 * 30 * 60 * 1000), bus.computeTimezoneTime(new Date().getTime())] this.queryChartDate() }) }) @@ -298,8 +300,8 @@ export default { }, queryChartDate () { const $temp = this - const start = this.searchTime[0] ? this.searchTime[0] : bus.computeTimezoneTime(new Date().getTime() - 1 * 30 * 60 * 1000) - const end = this.searchTime[1] ? this.searchTime[1] : bus.computeTimezoneTime(new Date().getTime()) + const start = this.searchTimeDialog[0] ? this.searchTimeDialog[0] : bus.computeTimezoneTime(new Date().getTime() - 1 * 30 * 60 * 1000) + const end = this.searchTimeDialog[1] ? this.searchTimeDialog[1] : bus.computeTimezoneTime(new Date().getTime()) this.searchTimeDialog = [start, end] const timeDiff = (new Date(end).getTime() - new Date(start).getTime()) / 1000 / (24 * 60 * 60) let step = '15s' @@ -463,7 +465,8 @@ export default { } }) }, - promQueryParamConvert (obj) { + promQueryParamConvert (alert) { + const obj = { ...alert } let r = '(' + obj.alertRule.expr.replace(/\"/g, '\'') + ')' let intoLabels = false obj.labels = JSON.parse(obj.labels)