diff --git a/src/locales/lang/en.ts b/src/locales/lang/en.ts index 12267ccb..92dd7754 100644 --- a/src/locales/lang/en.ts +++ b/src/locales/lang/en.ts @@ -239,6 +239,7 @@ const msg = { defaultOrder: "Default Order", chartType: "Chart Type", currentDepth: "Current Depth", + showDepth: "Show Depth Selector", defaultDepth: "Default Depth", traceTagsTip: `Only tags defined in the core/default/searchableTracesTags are searchable. Check more details on the Configuration Vocabulary page`, diff --git a/src/locales/lang/zh.ts b/src/locales/lang/zh.ts index 752649b4..19fd397e 100644 --- a/src/locales/lang/zh.ts +++ b/src/locales/lang/zh.ts @@ -89,6 +89,7 @@ const msg = { backgroundColors: "背景颜色", fontColors: "字体颜色", iconTheme: "图标主题", + showDepth: "展示深度选择器", hourTip: "选择小时", minuteTip: "选择分钟", secondTip: "选择秒数", diff --git a/src/store/modules/dashboard.ts b/src/store/modules/dashboard.ts index d19ee349..178e504a 100644 --- a/src/store/modules/dashboard.ts +++ b/src/store/modules/dashboard.ts @@ -92,6 +92,7 @@ export const dashboardStore = defineStore({ iconTheme: true, content: "Topology", fontSize: 18, + showDepth: true, }; } this.layout = this.layout.map((d: LayoutConfig) => { diff --git a/src/store/modules/topology.ts b/src/store/modules/topology.ts index d517cd53..9de0316e 100644 --- a/src/store/modules/topology.ts +++ b/src/store/modules/topology.ts @@ -35,7 +35,6 @@ interface TopologyState { nodeMetrics: MetricVal; linkServerMetrics: MetricVal; linkClientMetrics: MetricVal; - defaultDepth: string; } export const topologyStore = defineStore({ @@ -48,7 +47,6 @@ export const topologyStore = defineStore({ nodeMetrics: {}, linkServerMetrics: {}, linkClientMetrics: {}, - defaultDepth: "2", }), actions: { setNode(node: Node) { @@ -114,9 +112,6 @@ export const topologyStore = defineStore({ setLinkClientMetrics(m: { id: string; value: unknown }[]) { this.linkClientMetrics = m; }, - setDefaultDepth(val: number) { - this.defaultDepth = val; - }, async getDepthServiceTopology(serviceIds: string[], depth: number) { const res = await this.getServicesTopology(serviceIds); if (depth > 1) { diff --git a/src/types/dashboard.ts b/src/types/dashboard.ts index 5a2d0220..b8c0544e 100644 --- a/src/types/dashboard.ts +++ b/src/types/dashboard.ts @@ -120,4 +120,5 @@ export interface TopologyConfig { content?: string; fontSize?: number; depth?: string; + showDepth?: boolean; } diff --git a/src/views/dashboard/configuration/graph-styles/TopologyItem.vue b/src/views/dashboard/configuration/graph-styles/TopologyItem.vue index 2563ecc3..52f73ea9 100644 --- a/src/views/dashboard/configuration/graph-styles/TopologyItem.vue +++ b/src/views/dashboard/configuration/graph-styles/TopologyItem.vue @@ -67,6 +67,15 @@ limitations under the License. --> />