mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-02 07:24:05 +00:00
fix: link addresses on hierarchy topology nodes (#361)
This commit is contained in:
parent
306508856b
commit
f809123b4f
1
src/types/topology.d.ts
vendored
1
src/types/topology.d.ts
vendored
@ -51,6 +51,7 @@ export interface Node {
|
||||
y?: number;
|
||||
level?: number;
|
||||
l?: number;
|
||||
key?: string;
|
||||
}
|
||||
|
||||
export interface ServiceHierarchy {
|
||||
|
@ -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 }) {
|
||||
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");
|
||||
|
@ -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) {
|
||||
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");
|
||||
|
Loading…
Reference in New Issue
Block a user