diff --git a/src/store/modules/topology.ts b/src/store/modules/topology.ts
index a4390aa3..b14e09fd 100644
--- a/src/store/modules/topology.ts
+++ b/src/store/modules/topology.ts
@@ -600,12 +600,16 @@ export const topologyStore = defineStore({
return res.data;
},
async getHierarchyServiceTopology() {
- if (!(this.node.id && this.node.layer)) {
+ const dashboardStore = useDashboardStore();
+ const { currentService } = useSelectorStore();
+ const id = this.node ? this.node.id : (currentService || {}).id;
+ const layer = this.node ? this.node.layer : dashboardStore.layerId;
+ if (!(id && layer)) {
return new Promise((resolve) => resolve({}));
}
const res: AxiosResponse = await graphql
.query("getHierarchyServiceTopology")
- .params({ serviceId: this.node.id, layer: this.node.layer });
+ .params({ serviceId: id, layer: layer });
if (res.data.errors) {
return res.data;
}
diff --git a/src/views/dashboard/panel/Tool.vue b/src/views/dashboard/panel/Tool.vue
index 45a6139a..16dab18d 100644
--- a/src/views/dashboard/panel/Tool.vue
+++ b/src/views/dashboard/panel/Tool.vue
@@ -26,6 +26,9 @@ limitations under the License. -->
@change="changeService"
class="selectors"
/>
+
+