From 51609c9e098c0a1b06de312afb44f524f6c051ac Mon Sep 17 00:00:00 2001 From: Qiuxia Fan Date: Fri, 1 Apr 2022 17:24:12 +0800 Subject: [PATCH] update legend --- .../related/topology/components/Graph.vue | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/src/views/dashboard/related/topology/components/Graph.vue b/src/views/dashboard/related/topology/components/Graph.vue index aed1c8ad..4a74cb81 100644 --- a/src/views/dashboard/related/topology/components/Graph.vue +++ b/src/views/dashboard/related/topology/components/Graph.vue @@ -20,6 +20,20 @@ limitations under the License. --> element-loading-background="rgba(0, 0, 0, 0)" :style="`height: ${height}px`" > +
+
+ + + {{ settings.description ? settings.description.healthy || "" : "" }} + +
+
+ + + {{ settings.description ? settings.description.unhealthy || "" : "" }} + +
+
@@ -99,6 +113,7 @@ import { useAppStoreWithOut } from "@/store/modules/app"; import getDashboard from "@/hooks/useDashboardsSession"; import { MetricConfigOpt } from "@/types/dashboard"; import { aggregation } from "@/hooks/useProcessor"; +import icons from "@/assets/img/icons"; /*global Nullable, defineProps */ const props = defineProps({ @@ -563,6 +578,29 @@ watch( overflow: auto; margin-top: 30px; + .legend { + position: absolute; + top: 10px; + left: 15px; + color: #ccc; + + div { + margin-bottom: 5px; + } + + img { + width: 32px; + } + + span { + display: inline-block; + height: 32px; + line-height: 32px; + float: right; + margin-left: 5px; + } + } + .setting { position: absolute; top: 80px;