From 3ac0765aa669b1f1cc5b04b4f61dde351923aa43 Mon Sep 17 00:00:00 2001 From: zhangyu Date: Fri, 25 Aug 2023 09:59:47 +0800 Subject: [PATCH 1/2] =?UTF-8?q?NEZ-3141=20fix=EF=BC=9Aexplore=20=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E9=80=89=E6=8B=A9=E5=99=A8=E6=A0=A1=E9=AA=8C=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nezha-fronted/src/components/common/timePicker.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/nezha-fronted/src/components/common/timePicker.vue b/nezha-fronted/src/components/common/timePicker.vue index 4b83253d0..cde2088cf 100644 --- a/nezha-fronted/src/components/common/timePicker.vue +++ b/nezha-fronted/src/components/common/timePicker.vue @@ -381,10 +381,14 @@ export default { this.oldSearchTime[1] = bus.timeFormate(this.oldSearchTime[1]) } } - if (moment(this.oldSearchTime[0], timeFormatMain).isValid() && moment(this.oldSearchTime[1], timeFormatMain).isValid() && !moment(this.oldSearchTime[0]).isBefore(this.oldSearchTime[1])) { + let isBefore = true + if (moment(this.oldSearchTime[0], timeFormatMain).isValid() && moment(this.oldSearchTime[1], timeFormatMain).isValid()) { + isBefore = this.momentStrToTimestamp(this.oldSearchTime[0]) < this.momentStrToTimestamp(this.oldSearchTime[1]) + } + if (moment(this.oldSearchTime[0], timeFormatMain).isValid() && moment(this.oldSearchTime[1], timeFormatMain).isValid() && !isBefore) { this.oldSearchTimeError[0] = true this.inputError = this.$t('date.fromGreaterTo') - } else if (moment(this.oldSearchTime[0], timeFormatMain).isValid() && moment(this.oldSearchTime[1], timeFormatMain).isValid() && moment(this.oldSearchTime[0]).isBefore(this.oldSearchTime[1])) { + } else if (moment(this.oldSearchTime[0], timeFormatMain).isValid() && moment(this.oldSearchTime[1], timeFormatMain).isValid() && isBefore) { this.oldSearchTimeError[0] = false } }, From 42748b5c85a6ab0b2d8436c28677a06ccb420f93 Mon Sep 17 00:00:00 2001 From: zhangyu Date: Fri, 25 Aug 2023 10:47:13 +0800 Subject: [PATCH 2/2] =?UTF-8?q?NEZ-3140=20fix=EF=BC=9A=20Alert=20rule?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E7=82=B9=E5=87=BB=E6=9F=A5=E7=9C=8B=EF=BC=8C?= =?UTF-8?q?=E5=9C=A8=E5=91=8A=E8=AD=A6=E4=BF=A1=E6=81=AF=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E4=B8=AD=E6=8C=89ID=E8=BF=9B=E8=A1=8C=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=EF=BC=8C=E7=BB=93=E6=9E=9C=E6=98=BE=E7=A4=BA=E4=B8=8D=E6=AD=A3?= =?UTF-8?q?=E7=A1=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nezha-fronted/src/components/common/searchBox/searchBox.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nezha-fronted/src/components/common/searchBox/searchBox.vue b/nezha-fronted/src/components/common/searchBox/searchBox.vue index 276702474..dcdd95704 100644 --- a/nezha-fronted/src/components/common/searchBox/searchBox.vue +++ b/nezha-fronted/src/components/common/searchBox/searchBox.vue @@ -1113,6 +1113,9 @@ export default { if (this.targetTab) { switch (this.targetTab) { case 'alertMessageTab': + case 'moduleAlertMessage': + case 'endpointAlertMessage': + case 'alertRuleAlertMessage': return 'alertmessage' } }