fix: set config to control depth selector (#16)

This commit is contained in:
Fine0830
2022-02-21 13:16:34 +08:00
committed by GitHub
parent bd993a043d
commit 01194b0325
8 changed files with 32 additions and 20 deletions

View File

@@ -92,6 +92,7 @@ export const dashboardStore = defineStore({
iconTheme: true,
content: "Topology",
fontSize: 18,
showDepth: true,
};
}
this.layout = this.layout.map((d: LayoutConfig) => {

View File

@@ -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) {