From 38bac3e1f81d4e12b80a1aff8c2482bdc45ab4f5 Mon Sep 17 00:00:00 2001 From: zhangyu Date: Mon, 13 Sep 2021 09:32:20 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E5=A4=8D=20asset=20?= =?UTF-8?q?=E4=B8=8B=E6=BB=91=E6=A1=86=20alertMessage=20=E5=9B=BE=E8=A1=A8?= =?UTF-8?q?=E4=B8=8D=E6=98=BE=E7=A4=BA=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/bottomBox/tabs/alertMessageTabNew.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTabNew.vue b/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTabNew.vue index 4f6da10ff..8fefaab34 100644 --- a/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTabNew.vue +++ b/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTabNew.vue @@ -635,8 +635,8 @@ export default { } }, exportLog ({ limit, descending }) { - const start = this.searchTimeDialog[0] ? this.searchTimeDialog[0] : bus.computeTimezoneTime(new Date().getTime() - 1 * 60 * 60 * 1000) - const end = this.searchTimeDialog[1] ? this.searchTimeDialog[1] : bus.computeTimezoneTime(new Date().getTime()) + const start = this.searchTime[0] ? this.searchTime[0] : getTime(-1, 'h') + const end = this.searchTime[1] ? this.searchTime[1] : getTime(0, 'h') const params = { logql: this.expressions, start: start, @@ -678,8 +678,8 @@ export default { if (!limit) { limit = 1000 } - const start = this.searchTimeDialog[0] ? this.searchTimeDialog[0] : bus.computeTimezoneTime(new Date().getTime() - 1 * 60 * 60 * 1000) - const end = this.searchTimeDialog[1] ? this.searchTimeDialog[1] : bus.computeTimezoneTime(new Date().getTime()) + const start = this.searchTime[0] ? this.searchTime[0] : getTime(-1, 'h') + const end = this.searchTime[1] ? this.searchTime[1] : getTime(0, 'h') this.expressions = [this.currentMsg.alertRule.expr] this.$get('/logs/loki/api/v1/query_range?format=1&query=' + this.currentMsg.alertRule.expr + '&start=' + this.$stringTimeParseToUnix(start) + '&end=' + this.$stringTimeParseToUnix(end) + '&limit=' + limit).then(res => { this.chartLoading = false