diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTabNew.vue b/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTabNew.vue
index 1eb4e7761..53359a61a 100644
--- a/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTabNew.vue
+++ b/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTabNew.vue
@@ -17,6 +17,7 @@
+
1) {
- this.$set(this.searchLabel, 'startAt', this.timezoneToUtcTimeStr(this.searchTime[0]))
- this.$set(this.searchLabel, 'endAt', this.timezoneToUtcTimeStr(this.searchTime[1]))
+ if (this.searchTimeHeader && this.searchTimeHeader.length > 1) {
+ this.$set(this.searchLabel, 'startAt', this.timezoneToUtcTimeStr(this.searchTimeHeader[0]))
+ this.$set(this.searchLabel, 'endAt', this.timezoneToUtcTimeStr(this.searchTimeHeader[1]))
} else {
delete this.searchLabel.startAt
delete this.searchLabel.endAt
@@ -366,7 +369,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)
@@ -425,6 +429,7 @@ export default {
this.currentMsg = { ...row, alertRule: { ...res.data } }
this.graphShow = true
this.$nextTick(() => {
+ this.searchTime = [bus.computeTimezoneTime(new Date().getTime() - 1 * 30 * 60 * 1000), bus.computeTimezoneTime(new Date().getTime())]
this.queryChartDate()
})
})