From 10546555859ab3983cc092d6b59f48efd38b5e79 Mon Sep 17 00:00:00 2001
From: chenjinsong <523037378@qq.com>
Date: Fri, 15 May 2020 18:07:20 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dalertmsg=E5=9B=BE?=
=?UTF-8?q?=E8=A1=A8=E5=8D=95=E4=BD=8D=E5=88=87=E6=8D=A2=E6=97=A0=E6=95=88?=
=?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
---
.../common/bottomBox/tabs/alertMessageTab.vue | 12 ++++++++++--
nezha-fronted/src/components/page/alert/list.vue | 11 +++++++++--
2 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTab.vue b/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTab.vue
index a830f0eb4..b76c38262 100644
--- a/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTab.vue
+++ b/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTab.vue
@@ -184,10 +184,10 @@
{{$t("project.endpoint.dialogTitle")}}
-
+
@@ -216,6 +216,7 @@
sameLabels: ['instance','module','project','asset','endpoint','datacenter'],
searchTime: [new Date().setHours(new Date().getHours() - 1), new Date()],
currentMsg: {},
+ chartUnit: 5,
defaultSearchValue: this.obj.alertNum ? 1 : 0,
showElementSet: false,
@@ -561,6 +562,13 @@
this.queryChartDate();
});
},
+ chartUnitChange:function(unit){
+ this.chartUnit=unit;
+ this.$nextTick(()=>{
+ this.queryChartDate()
+ })
+ },
+
dialogClose() {
this.graphShow = false;
},
diff --git a/nezha-fronted/src/components/page/alert/list.vue b/nezha-fronted/src/components/page/alert/list.vue
index b30e7a240..a58ffa841 100644
--- a/nezha-fronted/src/components/page/alert/list.vue
+++ b/nezha-fronted/src/components/page/alert/list.vue
@@ -208,10 +208,10 @@
{{$t("project.endpoint.dialogTitle")}}
-
+
@@ -258,6 +258,7 @@
legend: [],
searchTime: [new Date().setHours(new Date().getHours() - 1), new Date()],
currentMsg: {},
+ chartUnit: 5,
tableId: 'alertListTable', //需要分页的table的id,用于记录每页数量
showTopBtn: false,
@@ -471,6 +472,12 @@
this.$store.commit('setHeaderTable', data);
this.tablelable = data;
},
+ chartUnitChange:function(unit){
+ this.chartUnit=unit;
+ this.$nextTick(()=>{
+ this.queryChartDate()
+ })
+ },
queryChartDate() {
let start = this.searchTime[0]?this.searchTime[0]:this.getTime(-1, 'h');
let end = this.searchTime[1]?this.searchTime[1]:this.getTime(0, 'h')