mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-02 17:34:51 +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 { t } = useI18n();
|
||||||
const dashboardStore = useDashboardStore();
|
const dashboardStore = useDashboardStore();
|
||||||
const { selectedGrid } = dashboardStore;
|
|
||||||
const widget = dashboardStore.selectedGrid.widget || {};
|
const widget = dashboardStore.selectedGrid.widget || {};
|
||||||
const title = ref<string>(widget.title || "");
|
const title = ref<string>(widget.title || "");
|
||||||
const tips = ref<string>(widget.tips || "");
|
const tips = ref<string>(widget.tips || "");
|
||||||
@ -51,6 +50,7 @@ function updateWidgetConfig(param: { [key: string]: string }) {
|
|||||||
if (!key) {
|
if (!key) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
const { selectedGrid } = dashboardStore;
|
||||||
const widget = {
|
const widget = {
|
||||||
...dashboardStore.selectedGrid.widget,
|
...dashboardStore.selectedGrid.widget,
|
||||||
[key]: decodeURIComponent(param[key]),
|
[key]: decodeURIComponent(param[key]),
|
||||||
|
@ -277,6 +277,12 @@ function handleLinkClick(event: any, d: Call) {
|
|||||||
layer: dashboardStore.layerId,
|
layer: dashboardStore.layerId,
|
||||||
entity: `${e}Relation`,
|
entity: `${e}Relation`,
|
||||||
});
|
});
|
||||||
|
if (!p) {
|
||||||
|
ElMessage.error(
|
||||||
|
`The dashboard named ${settings.value.linkDashboard} doesn't exist`
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
dashboardStore.setEntity(p.entity);
|
dashboardStore.setEntity(p.entity);
|
||||||
const path = `/dashboard/related/${p.layer}/${e}Relation/${d.source.id}/${d.target.id}/${p.name}`;
|
const path = `/dashboard/related/${p.layer}/${e}Relation/${d.source.id}/${d.target.id}/${p.name}`;
|
||||||
const routeUrl = router.resolve({ path });
|
const routeUrl = router.resolve({ path });
|
||||||
|
@ -178,6 +178,12 @@ function goDashboard() {
|
|||||||
layer: dashboardStore.layerId,
|
layer: dashboardStore.layerId,
|
||||||
entity,
|
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 path = `/dashboard/${d.layer}/${entity}/${topologyStore.node.serviceId}/${topologyStore.node.id}/${d.name}`;
|
||||||
const routeUrl = router.resolve({ path });
|
const routeUrl = router.resolve({ path });
|
||||||
window.open(routeUrl.href, "_blank");
|
window.open(routeUrl.href, "_blank");
|
||||||
@ -216,6 +222,12 @@ function selectNodeLink(d: any) {
|
|||||||
layer: dashboardStore.layerId,
|
layer: dashboardStore.layerId,
|
||||||
entity,
|
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 path = `/dashboard/${p.layer}/${entity}/${sourceObj.serviceId}/${sourceObj.id}/${targetObj.serviceId}/${targetObj.id}/${p.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