fix: path

This commit is contained in:
Fine 2024-01-15 21:53:33 +08:00
parent 306508856b
commit 3e2cd23f16
2 changed files with 4 additions and 4 deletions

View File

@ -148,7 +148,7 @@ limitations under the License. -->
popover.value.style("visibility", "hidden");
}
function handleNodeClick(event: MouseEvent, d: Node & { x: number; y: number }) {
function handleNodeClick(event: MouseEvent, d: Node & { serviceId: string; key: string }) {
const origin = dashboardStore.entity;
event.stopPropagation();
hideTip();
@ -161,7 +161,7 @@ limitations under the License. -->
ConfigFieldTypes.ISDEFAULT,
).dashboard || {};
const name = dashboard.name;
const path = `/dashboard/${dashboardStore.layerId}/${EntityType[0].value}/${topologyStore.node.id}/${name}`;
const path = `/dashboard/${dashboardStore.layerId}/${EntityType[3].value}/${d.serviceId}/${d.key}/${name}`;
const routeUrl = router.resolve({ path });
window.open(routeUrl.href, "_blank");

View File

@ -156,7 +156,7 @@ limitations under the License. -->
popover.value.style("visibility", "hidden");
}
function handleNodeClick(event: MouseEvent, d: Node & { x: number; y: number }) {
function handleNodeClick(event: MouseEvent, d: Node & { key: string }) {
const origin = dashboardStore.entity;
event.stopPropagation();
hideTip();
@ -169,7 +169,7 @@ limitations under the License. -->
ConfigFieldTypes.ISDEFAULT,
).dashboard || {};
const name = dashboard.name;
const path = `/dashboard/${dashboardStore.layerId}/${EntityType[0].value}/${topologyStore.node.id}/${name}`;
const path = `/dashboard/${dashboardStore.layerId}/${EntityType[0].value}/${d.key}/${name}`;
const routeUrl = router.resolve({ path });
window.open(routeUrl.href, "_blank");