From 87468b5ce9e46fbbaf637188a578e9e39c92d02f Mon Sep 17 00:00:00 2001 From: Qiuxia Fan Date: Thu, 27 Jan 2022 15:09:12 +0800 Subject: [PATCH] feat: add topology --- src/assets/icons/device_hub.svg | 18 ++++++++++++++++++ src/store/modules/dashboard.ts | 5 +++++ src/views/dashboard/Edit.vue | 8 ++++++++ src/views/dashboard/data.ts | 3 ++- src/views/dashboard/panel/Tool.vue | 3 +++ src/views/dashboard/related/Topology.vue | 17 +++++++++++++++++ .../related/service/ServiceTopology.vue | 0 7 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 src/assets/icons/device_hub.svg create mode 100644 src/views/dashboard/related/Topology.vue create mode 100644 src/views/dashboard/related/service/ServiceTopology.vue diff --git a/src/assets/icons/device_hub.svg b/src/assets/icons/device_hub.svg new file mode 100644 index 00000000..db4932c4 --- /dev/null +++ b/src/assets/icons/device_hub.svg @@ -0,0 +1,18 @@ + + +device_hub + + diff --git a/src/store/modules/dashboard.ts b/src/store/modules/dashboard.ts index 88264c2e..236bc2ee 100644 --- a/src/store/modules/dashboard.ts +++ b/src/store/modules/dashboard.ts @@ -34,6 +34,7 @@ interface DashboardState { activedGridItem: string; durationTime: Duration; selectorStore: any; + showTopology: boolean; } export const dashboardStore = defineStore({ @@ -47,6 +48,7 @@ export const dashboardStore = defineStore({ activedGridItem: "", durationTime: useAppStoreWithOut().durationTime, selectorStore: useSelectorStore(), + showTopology: false, }), actions: { setLayout(data: LayoutConfig[]) { @@ -160,6 +162,9 @@ export const dashboardStore = defineStore({ this.layout = [ConfigData]; } }, + setTopology(show: boolean) { + this.showTopology = show; + }, setConfigs(param: { [key: string]: unknown }) { const actived = this.activedGridItem.split("-"); const index = this.layout.findIndex( diff --git a/src/views/dashboard/Edit.vue b/src/views/dashboard/Edit.vue index a96732a7..10cb8759 100644 --- a/src/views/dashboard/Edit.vue +++ b/src/views/dashboard/Edit.vue @@ -25,6 +25,14 @@ limitations under the License. --> > + + topology +