mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-02 22:43:09 +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;
|
y?: number;
|
||||||
level?: number;
|
level?: number;
|
||||||
l?: number;
|
l?: number;
|
||||||
|
key?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ServiceHierarchy {
|
export interface ServiceHierarchy {
|
||||||
|
@ -148,7 +148,7 @@ limitations under the License. -->
|
|||||||
popover.value.style("visibility", "hidden");
|
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;
|
const origin = dashboardStore.entity;
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
hideTip();
|
hideTip();
|
||||||
@ -161,7 +161,7 @@ limitations under the License. -->
|
|||||||
ConfigFieldTypes.ISDEFAULT,
|
ConfigFieldTypes.ISDEFAULT,
|
||||||
).dashboard || {};
|
).dashboard || {};
|
||||||
const name = dashboard.name;
|
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 });
|
const routeUrl = router.resolve({ path });
|
||||||
|
|
||||||
window.open(routeUrl.href, "_blank");
|
window.open(routeUrl.href, "_blank");
|
||||||
|
@ -156,7 +156,7 @@ limitations under the License. -->
|
|||||||
popover.value.style("visibility", "hidden");
|
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;
|
const origin = dashboardStore.entity;
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
hideTip();
|
hideTip();
|
||||||
@ -169,7 +169,7 @@ limitations under the License. -->
|
|||||||
ConfigFieldTypes.ISDEFAULT,
|
ConfigFieldTypes.ISDEFAULT,
|
||||||
).dashboard || {};
|
).dashboard || {};
|
||||||
const name = dashboard.name;
|
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 });
|
const routeUrl = router.resolve({ path });
|
||||||
|
|
||||||
window.open(routeUrl.href, "_blank");
|
window.open(routeUrl.href, "_blank");
|
||||||
|
Loading…
Reference in New Issue
Block a user