diff --git a/nezha-fronted/src/components/charts/chart-alert-list.vue b/nezha-fronted/src/components/charts/chart-alert-list.vue
index 468cf636d..7bca21891 100644
--- a/nezha-fronted/src/components/charts/chart-alert-list.vue
+++ b/nezha-fronted/src/components/charts/chart-alert-list.vue
@@ -100,11 +100,11 @@
{{severityData[2].value}}
- {{value}}
+ {{item.value}}
@@ -203,11 +203,11 @@
{{severityData[2].value}}
- {{value}}
+ {{item.value}}
@@ -503,6 +503,21 @@ export default {
startResize(e) {
let vm = this;
this.$chartResizeTool.start(vm, this.data, e);
+ },
+ labelsSort:function(obj){
+ let buildIn=['asset','endpoint','module','project','datacenter']
+ let labels=JSON.parse(JSON.stringify(obj));
+ let result=[];
+ for(let key of buildIn){
+ if(key in labels){
+ result.push({label:key,value:labels[key]})
+ delete labels[key]
+ }
+ }
+ Object.keys(labels).sort().forEach(key=>{
+ result.push({label:key,value:labels[key]})
+ })
+ return result;
},
labelsClassName(row) {
if (row.column.label == this.$t("alert.list.labels")) {
diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTab.vue b/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTab.vue
index 32a8e437f..dac983e03 100644
--- a/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTab.vue
+++ b/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTab.vue
@@ -92,11 +92,11 @@
-
-->
- {{value}}
+ :key="item.label"
+ v-if="item.label != 'alertname' && item.label != 'severity'"
+ v-for="item in labelsSort(scope.row.labels)">{{item.value}}
- second
+ {{$t('alert.config.second')}}
{{alertRule.last}}s
diff --git a/nezha-fronted/src/components/page/alert/list.vue b/nezha-fronted/src/components/page/alert/list.vue
index 11ce0f201..33796f2b6 100644
--- a/nezha-fronted/src/components/page/alert/list.vue
+++ b/nezha-fronted/src/components/page/alert/list.vue
@@ -107,11 +107,11 @@
-->