feat: Implement an association between widgets(line, bar, area graphs) with time (#115)

This commit is contained in:
Fine0830
2022-07-08 16:17:17 +08:00
committed by GitHub
parent 3ff3d5d1cd
commit 7fbd6170de
26 changed files with 452 additions and 120 deletions

View File

@@ -180,19 +180,19 @@ async function queryInstanceMetrics(currentInstances: Instance[]) {
}
function clickInstance(scope: any) {
const d = getDashboard({
const { dashboard } = getDashboard({
name: props.config.dashboardName,
layer: dashboardStore.layerId,
entity: EntityType[3].value,
});
if (!d) {
if (!dashboard) {
ElMessage.error("No this dashboard");
return;
}
router.push(
`/dashboard/${d.layer}/${d.entity}/${selectorStore.currentService.id}/${
scope.row.id
}/${d.name.split(" ").join("-")}`
`/dashboard/${dashboard.layer}/${dashboard.entity}/${
selectorStore.currentService.id
}/${scope.row.id}/${dashboard.name.split(" ").join("-")}`
);
}