diff --git a/src/types/alarm.d.ts b/src/types/alarm.d.ts
index 6358b5d9..06c09958 100644
--- a/src/types/alarm.d.ts
+++ b/src/types/alarm.d.ts
@@ -26,7 +26,7 @@ export interface Alarm {
startTime: string;
scope: string;
tags: Array<{ key: string; value: string }>;
- events: any[];
+ events: Event[];
}
export interface Event {
diff --git a/src/views/alarm/Content.vue b/src/views/alarm/Content.vue
index a8c41f28..7281d411 100644
--- a/src/views/alarm/Content.vue
+++ b/src/views/alarm/Content.vue
@@ -17,7 +17,7 @@ limitations under the License. -->
@@ -43,30 +43,97 @@ limitations under the License. -->
+
+
+
{{ t(item.value) }}:
+
+ {{ dateFormat(currentDetail[item.label]) }}
+
+
+ {{ d }}
+
+
+
+
+ -
+
+ {{ t(i.text) }}
+
+
+ -
+
+
+ {{ dateFormat(event[d.class]) }}
+
+
+ {{ event[d.class] }}
+
+
+
+
+
+
+
{{ currentDetail[item.label] }}
+
+
-
diff --git a/src/views/alarm/data.ts b/src/views/alarm/data.ts
index 673c8aa3..302e10d3 100644
--- a/src/views/alarm/data.ts
+++ b/src/views/alarm/data.ts
@@ -7,3 +7,33 @@ export const AlarmOptions = [
{ label: "ServiceInstanceRelation", value: "ServiceInstanceRelation" },
{ label: "EndpointRelation", value: "EndpointRelation" },
];
+export const EventsDetailHeaders = [
+ { text: "eventID", class: "uuid" },
+ { text: "eventName", class: "name" },
+ { text: "eventsType", class: "type" },
+ { text: "startTime", class: "startTime" },
+ { text: "endTime", class: "endTime" },
+];
+
+export const AlarmDetailCol = [
+ {
+ label: "scope",
+ value: "scope",
+ },
+ {
+ label: "startTime",
+ value: "startTime",
+ },
+ {
+ label: "tags",
+ value: "tags",
+ },
+ {
+ label: "message",
+ value: "message",
+ },
+ {
+ label: "events",
+ value: "eventDetail",
+ },
+];
diff --git a/src/views/alarm/index.scss b/src/views/alarm/index.scss
index 7fd410b6..e8981628 100644
--- a/src/views/alarm/index.scss
+++ b/src/views/alarm/index.scss
@@ -20,6 +20,60 @@
flex-grow: 1;
overflow: auto;
height: 100%;
+}
+
+.time-line {
+ padding: 14px 30px;
+ min-height: 63px;
+ max-width: 132px;
+}
+
+.timeline-table-i {
+ padding: 10px 15px;
+ border-left: 4px solid #eee;
+ position: relative;
+
+ &::after {
+ content: "";
+ display: inline-block;
+ position: absolute;
+ width: 7px;
+ height: 7px;
+ left: -23px;
+ top: 25px;
+ border-radius: 4px;
+ background-color: #448dfe;
+ }
+
+ &::before {
+ content: "";
+ display: inline-block;
+ position: absolute;
+ width: 1px;
+ height: calc(100% + 11px);
+ top: 0;
+ left: -20px;
+ border-radius: 5px;
+ background-color: #448dfe99;
+ }
+}
+
+.timeline-table-i-scope {
+ display: inline-block;
+ padding: 0 8px;
+ border: 1px solid;
+ margin-top: -1px;
+ border-radius: 4px;
+}
+
+.timeline-item {
+ cursor: pointer;
+ margin-bottom: 9px;
+}
+
+.alarm-detail {
+ max-height: 600px;
+ overflow: auto;
ul {
min-height: 100px;
@@ -59,51 +113,3 @@
padding-left: 120px;
}
}
-
-.time-line {
- padding: 14px 30px;
- min-height: 63px;
- max-width: 132px;
-}
-
-.timeline-table-i {
- padding: 10px 15px;
- border-left: 4px solid #2e2f331a;
- position: relative;
-
- &::after {
- content: "";
- display: inline-block;
- position: absolute;
- width: 7px;
- height: 7px;
- left: -23px;
- top: 25px;
- border-radius: 4px;
- background-color: #448dfe;
- }
-
- &::before {
- content: "";
- display: inline-block;
- position: absolute;
- width: 1px;
- height: calc(100% + 11px);
- top: 0;
- left: -20px;
- border-radius: 5px;
- background-color: #448dfe99;
- }
-}
-
-.timeline-table-i-scope {
- display: inline-block;
- padding: 0 8px;
- border: 1px solid;
- margin-top: -1px;
- border-radius: 4px;
-}
-
-.timeline-item {
- cursor: pointer;
-}