File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,15 @@ export interface ModuleRecord {
6262 eventData ?: any
6363}
6464
65+ // 告警变更记录类型定义
66+ export interface AlarmChangeItem {
67+ id : string
68+ service : string
69+ change : string
70+ timestamp : string
71+ details : string
72+ }
73+
6574export const useAppStore = defineStore ( 'app' , ( ) => {
6675 // 状态
6776 const currentView = ref < 'home' | 'changelog' > ( 'home' )
Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ const transformDeploymentChangelogToChangeItems = (changelogData: any[]): Change
121121 ]
122122
123123 return {
124- id: ` chg-${index + 1 } ` ,
124+ id: ` chg-${item . service }-${ item . version }-${ item . startTime } ` ,
125125 service: item .service ,
126126 version: item .version ,
127127 state ,
@@ -147,7 +147,7 @@ const transformAlertRuleChangelogToAlarmChangeItems = (changelogData: AlertRuleC
147147 const timestamp = new Date (item .editTime ).toLocaleString (' zh-CN' )
148148
149149 return {
150- id: ` alarm-${index + 1 } ` ,
150+ id: ` alarm-${item . name }-${ item . editTime } ` ,
151151 service: serviceName ,
152152 change: ` ${item .name }: ${changeDescription } ` ,
153153 timestamp ,
You can’t perform that action at this time.
0 commit comments