mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-02 04:24:53 +00:00
fix: set graph options(#80)
This commit is contained in:
parent
918b0551ad
commit
024a0fe44c
@ -41,7 +41,6 @@ import { useDashboardStore } from "@/store/modules/dashboard";
|
||||
|
||||
const { t } = useI18n();
|
||||
const dashboardStore = useDashboardStore();
|
||||
const { selectedGrid } = dashboardStore;
|
||||
const widget = dashboardStore.selectedGrid.widget || {};
|
||||
const title = ref<string>(widget.title || "");
|
||||
const tips = ref<string>(widget.tips || "");
|
||||
@ -51,6 +50,7 @@ function updateWidgetConfig(param: { [key: string]: string }) {
|
||||
if (!key) {
|
||||
return;
|
||||
}
|
||||
const { selectedGrid } = dashboardStore;
|
||||
const widget = {
|
||||
...dashboardStore.selectedGrid.widget,
|
||||
[key]: decodeURIComponent(param[key]),
|
||||
|
@ -277,6 +277,12 @@ function handleLinkClick(event: any, d: Call) {
|
||||
layer: dashboardStore.layerId,
|
||||
entity: `${e}Relation`,
|
||||
});
|
||||
if (!p) {
|
||||
ElMessage.error(
|
||||
`The dashboard named ${settings.value.linkDashboard} doesn't exist`
|
||||
);
|
||||
return;
|
||||
}
|
||||
dashboardStore.setEntity(p.entity);
|
||||
const path = `/dashboard/related/${p.layer}/${e}Relation/${d.source.id}/${d.target.id}/${p.name}`;
|
||||
const routeUrl = router.resolve({ path });
|
||||
|
@ -178,6 +178,12 @@ function goDashboard() {
|
||||
layer: dashboardStore.layerId,
|
||||
entity,
|
||||
});
|
||||
if (!d) {
|
||||
ElMessage.error(
|
||||
`The dashboard named ${settings.value.nodeDashboard} doesn't exist`
|
||||
);
|
||||
return;
|
||||
}
|
||||
const path = `/dashboard/${d.layer}/${entity}/${topologyStore.node.serviceId}/${topologyStore.node.id}/${d.name}`;
|
||||
const routeUrl = router.resolve({ path });
|
||||
window.open(routeUrl.href, "_blank");
|
||||
@ -216,6 +222,12 @@ function selectNodeLink(d: any) {
|
||||
layer: dashboardStore.layerId,
|
||||
entity,
|
||||
});
|
||||
if (!p) {
|
||||
ElMessage.error(
|
||||
`The dashboard named ${settings.value.linkDashboard} doesn't exist`
|
||||
);
|
||||
return;
|
||||
}
|
||||
const path = `/dashboard/${p.layer}/${entity}/${sourceObj.serviceId}/${sourceObj.id}/${targetObj.serviceId}/${targetObj.id}/${p.name}`;
|
||||
const routeUrl = router.resolve({ path });
|
||||
window.open(routeUrl.href, "_blank");
|
||||
|
Loading…
Reference in New Issue
Block a user