diff --git a/src/locales/lang/en.ts b/src/locales/lang/en.ts index fa7cf213..12267ccb 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", + defaultDepth: "Default Depth", traceTagsTip: `Only tags defined in the core/default/searchableTracesTags are searchable. Check more details on the Configuration Vocabulary page`, tagsLink: "Configuration Vocabulary page", diff --git a/src/locales/lang/zh.ts b/src/locales/lang/zh.ts index 24492caf..752649b4 100644 --- a/src/locales/lang/zh.ts +++ b/src/locales/lang/zh.ts @@ -240,6 +240,7 @@ const msg = { defaultOrder: "默认顺序", chartType: "图表类型", currentDepth: "当前深度", + defaultDepth: "默认深度", traceTagsTip: "只有core/default/searchableTracesTags中定义的标记才可搜索。查看配置词汇表页面上的更多详细信息。", tagsLink: "配置词汇页", diff --git a/src/store/data.ts b/src/store/data.ts index 7230fb11..5f72159e 100644 --- a/src/store/data.ts +++ b/src/store/data.ts @@ -105,25 +105,6 @@ export const ConfigData3: any = [ { x: 0, y: 0, - w: 4, - h: 6, - i: "1", - type: "Topology", - widget: { - title: "Topology", - tips: "Topology", - }, - graph: { - fontColor: "white", - backgroundColor: "green", - iconTheme: true, - content: "Topology", - fontSize: 18, - }, - }, - { - x: 4, - y: 0, w: 8, h: 12, i: "0", diff --git a/src/store/modules/topology.ts b/src/store/modules/topology.ts index 9de0316e..d517cd53 100644 --- a/src/store/modules/topology.ts +++ b/src/store/modules/topology.ts @@ -35,6 +35,7 @@ interface TopologyState { nodeMetrics: MetricVal; linkServerMetrics: MetricVal; linkClientMetrics: MetricVal; + defaultDepth: string; } export const topologyStore = defineStore({ @@ -47,6 +48,7 @@ export const topologyStore = defineStore({ nodeMetrics: {}, linkServerMetrics: {}, linkClientMetrics: {}, + defaultDepth: "2", }), actions: { setNode(node: Node) { @@ -112,6 +114,9 @@ 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 5f3cd251..5a2d0220 100644 --- a/src/types/dashboard.ts +++ b/src/types/dashboard.ts @@ -119,4 +119,5 @@ export interface TopologyConfig { iconTheme?: boolean; content?: string; fontSize?: number; + depth?: string; } diff --git a/src/views/dashboard/configuration/graph-styles/TopologyItem.vue b/src/views/dashboard/configuration/graph-styles/TopologyItem.vue index f22fec9e..fa0305d2 100644 --- a/src/views/dashboard/configuration/graph-styles/TopologyItem.vue +++ b/src/views/dashboard/configuration/graph-styles/TopologyItem.vue @@ -66,20 +66,34 @@ limitations under the License. --> @change="changeConfig({ content })" /> +