diff --git a/src/store/modules/topology.ts b/src/store/modules/topology.ts index 8e88b28f..82666666 100644 --- a/src/store/modules/topology.ts +++ b/src/store/modules/topology.ts @@ -43,7 +43,6 @@ interface TopologyState { linkServerMetrics: MetricVal; linkClientMetrics: MetricVal; hierarchyNodeMetrics: { [key: string]: MetricVal }; - hierarchyServiceNode: Nullable; } export const topologyStore = defineStore({ @@ -57,7 +56,6 @@ export const topologyStore = defineStore({ hierarchyInstanceNodes: [], node: null, call: null, - hierarchyServiceNode: null, nodeMetricValue: {}, linkServerMetrics: {}, linkClientMetrics: {}, @@ -70,9 +68,6 @@ export const topologyStore = defineStore({ setLink(link: Call) { this.call = link; }, - setHierarchyServiceNode(node: HierarchyNode) { - this.hierarchyServiceNode = node; - }, setInstanceTopology(data: { nodes: Node[]; calls: Call[] }) { for (const call of data.calls) { for (const node of data.nodes) { diff --git a/src/views/dashboard/related/topology/service/HierarchyMap.vue b/src/views/dashboard/related/topology/service/HierarchyMap.vue index a6dc4f9f..fa02a16e 100644 --- a/src/views/dashboard/related/topology/service/HierarchyMap.vue +++ b/src/views/dashboard/related/topology/service/HierarchyMap.vue @@ -114,7 +114,7 @@ limitations under the License. --> const loading = ref(false); const svg = ref>(null); const graph = ref>(null); - const settings = ref(props.config); + // const settings = ref(props.config); const showSetting = ref(false); const topologyLayout = ref({}); const popover = ref>(null); @@ -143,7 +143,6 @@ limitations under the License. --> svg.value.call(zoom(d3, graph.value, diff.value)); } async function freshNodes() { - topologyStore.setHierarchyServiceNode(null); const resp = await topologyStore.getHierarchyServiceTopology(); loading.value = false; @@ -183,10 +182,6 @@ limitations under the License. --> popover.value = d3.select("#popover"); } - function updateSettings(config: any) { - settings.value = config; - } - function draw() { const levels = computeLevels(topologyStore.hierarchyServiceCalls, topologyStore.hierarchyServiceNodes, []); @@ -209,19 +204,8 @@ limitations under the License. --> currentNode.value = null; } - function showConfig() { - showSetting.value = !showSetting.value; - dashboardStore.selectWidget(props.config); - } - function getNodeStatus(d: any) { - const item = - (settings.value.hierarchyServicesConfig || []).find((i: { layer: string }) => d.layer === i.layer) || {}; - - if (!item.legendMQE) { - return icons.CUBE; - } - return Number(d[item.legendMQE]) && d.isReal ? icons.CUBEERROR : icons.CUBE; + return d.isReal ? icons.CUBEERROR : icons.CUBE; } function showNodeTip(event: MouseEvent, data: Node) { const dashboard = @@ -262,7 +246,6 @@ limitations under the License. --> function handleNodeClick(event: MouseEvent, d: Node & { x: number; y: number }) { event.stopPropagation(); hideTip(); - // topologyStore.setHierarchyServiceNode(d); const dashboard = getDashboard( { @@ -280,7 +263,6 @@ limitations under the License. --> } function svgEvent() { - topologyStore.setHierarchyServiceNode(null); dashboardStore.selectWidget(props.config); }