fix: link

This commit is contained in:
Fine 2024-01-16 16:47:40 +08:00
parent f1dd89cfa4
commit 9c2e8508f0
2 changed files with 21 additions and 16 deletions

View File

@ -152,14 +152,16 @@ limitations under the License. -->
const origin = dashboardStore.entity;
event.stopPropagation();
hideTip();
const dashboard =
getDashboard(
const { dashboard } = getDashboard(
{
layer: d.layer || "",
entity: EntityType[3].value,
},
ConfigFieldTypes.ISDEFAULT,
).dashboard || {};
);
if (!dashboard) {
return;
}
const name = dashboard.name;
const path = `/dashboard/${dashboard.layer}/${EntityType[3].value}/${d.serviceId}/${d.key}/${name}`;
const routeUrl = router.resolve({ path });

View File

@ -160,14 +160,17 @@ limitations under the License. -->
const origin = dashboardStore.entity;
event.stopPropagation();
hideTip();
const dashboard =
getDashboard(
const { dashboard } = getDashboard(
{
layer: d.layer || "",
entity: EntityType[0].value,
},
ConfigFieldTypes.ISDEFAULT,
).dashboard || {};
);
if (!dashboard) {
return;
}
const name = dashboard.name;
const path = `/dashboard/${dashboard.layer}/${EntityType[0].value}/${d.key}/${name}`;
const routeUrl = router.resolve({ path });