diff --git a/nezha-fronted/src/components/charts/chart-alert-list.vue b/nezha-fronted/src/components/charts/chart-alert-list.vue index 23ea64827..26220fc4b 100644 --- a/nezha-fronted/src/components/charts/chart-alert-list.vue +++ b/nezha-fronted/src/components/charts/chart-alert-list.vue @@ -50,6 +50,7 @@ @tableDataSort="tableDataSort" @deleteMessage="deleteMessage" ref="alertListTable" + :form="'chartList'" > @@ -69,6 +70,7 @@ @tableDataSort="tableDataSort" @deleteMessage="deleteMessage" ref="alertListScreenTable" + :form="'chartList'" > diff --git a/nezha-fronted/src/components/common/alert/alertMessageTable.vue b/nezha-fronted/src/components/common/alert/alertMessageTable.vue index 90d160bba..58c583073 100644 --- a/nezha-fronted/src/components/common/alert/alertMessageTable.vue +++ b/nezha-fronted/src/components/common/alert/alertMessageTable.vue @@ -233,7 +233,8 @@ loading:{}, tableHeight:{}, tableId:{}, - projectAlertId:{} + projectAlertId:{}, + from:{} }, data() { vm = this; @@ -886,12 +887,22 @@ }); } }); - this.tablelable = localStorage.getItem("nz-tableTitle-" + localStorage.getItem("nz-username") + "-" + this.$route.path) - ? JSON.parse(localStorage.getItem("nz-tableTitle-" + localStorage.getItem("nz-username") + "-" + this.$route.path)) - : this.tableTitle; - this.dropCol = localStorage.getItem("nz-tableTitle-" + localStorage.getItem("nz-username") + "-" + this.$route.path) - ? JSON.parse(localStorage.getItem("nz-tableTitle-" + localStorage.getItem("nz-username") + "-" + this.$route.path)) - : this.tableTitle; + if(this.from=='alertMessage' || this.from=='chartList'){ + this.tablelable = localStorage.getItem("nz-tableTitle-" + localStorage.getItem("nz-username") + "-" + this.$route.path) + ? JSON.parse(localStorage.getItem("nz-tableTitle-" + localStorage.getItem("nz-username") + "-" + this.$route.path)) + : this.tableTitle; + this.dropCol = localStorage.getItem("nz-tableTitle-" + localStorage.getItem("nz-username") + "-" + this.$route.path) + ? JSON.parse(localStorage.getItem("nz-tableTitle-" + localStorage.getItem("nz-username") + "-" + this.$route.path)) + : this.tableTitle; + } + if(this.from=='alertMessageTab'){ + this.tablelable = localStorage.getItem("nz-tableTitle-" + localStorage.getItem("nz-username") + "-/alertList") + ? JSON.parse(localStorage.getItem("nz-tableTitle-" + localStorage.getItem("nz-username") + "-/alertList")) + : this.tableTitle; + this.dropCol = localStorage.getItem("nz-tableTitle-" + localStorage.getItem("nz-username") + "-/alertList") + ? JSON.parse(localStorage.getItem("nz-tableTitle-" + localStorage.getItem("nz-username") + "-/alertList")) + : this.tableTitle; + } } } diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTab.vue b/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTab.vue index 96b3cc099..622e4318e 100644 --- a/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTab.vue +++ b/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTab.vue @@ -27,9 +27,9 @@ :tableId="tableId" @tableDataSort="tableDataSort" @deleteMessage="deleteMessage" + :from="'alertMessageTab'" > - diff --git a/nezha-fronted/src/components/page/alert/alertMessage.vue b/nezha-fronted/src/components/page/alert/alertMessage.vue deleted file mode 100644 index 658917def..000000000 --- a/nezha-fronted/src/components/page/alert/alertMessage.vue +++ /dev/null @@ -1,1037 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{scope.row[item.prop].alertName}} - - - - - - - - {{scope.row[item.prop]}} - - - - - {{scope.row[item.prop]}} - - - - - {{$CONSTANTS.alertMessage.severityData.find(s => {return s.key == 'high'})}} - {{$CONSTANTS.alertMessage.severityData.find(s => {return s.key == 'medium'})}} - {{$CONSTANTS.alertMessage.severityData.find(s => {return s.key == 'low'})}} - - - - - - - - - {{item.value}} - - - - - - - - {{scope.row['state'] == 1 ? "Pending" : ""}} - {{scope.row['state'] == 2 ? "Expired" : ""}} - - - - - - - - - {{formatThreshold(scope.row.current[1],scope.row.alertRule.unit)}} - - {{$unixTimeParseToString(scope.row.current[0])}} - - - - - - {{scope.row[item.prop]}} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{$t('overall.exportCur')}} - - - {{$t('overall.exportAll')}} - - - - - - - - - - - - {{$t('tip.no')}} - - - {{$t('tip.yes')}} - - - - - - - - {{$t("project.endpoint.dialogTitle")}} - - - - - - - - - - diff --git a/nezha-fronted/src/components/page/alert/list.vue b/nezha-fronted/src/components/page/alert/list.vue index a188ead0e..bff6ea1b3 100644 --- a/nezha-fronted/src/components/page/alert/list.vue +++ b/nezha-fronted/src/components/page/alert/list.vue @@ -38,6 +38,7 @@ :tableId="tableId" @tableDataSort="tableDataSort" @deleteMessage="deleteMessage" + :form="'chartList'" >