feat: add router for dashboard

This commit is contained in:
Qiuxia Fan
2021-12-16 11:26:34 +08:00
parent f4c1c81c09
commit 54f80fddb3
7 changed files with 61 additions and 15 deletions

View File

@@ -47,6 +47,36 @@ export const routesDashboard: Array<RouteRecordRaw> = [
exact: false,
},
},
{
path: "/dashboard/edit/service/:serviceId",
component: () => import("@/views/dashboard/Edit.vue"),
name: "serviceEdit",
meta: {
title: "dashboardEdit",
exact: false,
notShow: true,
},
},
{
path: "/dashboard/edit/endpoint/:serviceId/:endpointId",
component: () => import("@/views/dashboard/Edit.vue"),
name: "endpointEdit",
meta: {
title: "dashboardEdit",
exact: false,
notShow: true,
},
},
{
path: "/dashboard/edit/instance/:serviceId/:instanceId",
component: () => import("@/views/dashboard/Edit.vue"),
name: "instanceEdit",
meta: {
title: "dashboardEdit",
exact: false,
notShow: true,
},
},
],
},
];

View File

@@ -46,7 +46,7 @@ const router = createRouter({
(window as any).axiosCancel = [];
router.beforeEach((to, from, next) => {
const token = window.localStorage.getItem("skywalking-authority");
// const token = window.localStorage.getItem("skywalking-authority");
if ((window as any).axiosCancel.length !== 0) {
for (const func of (window as any).axiosCancel) {
setTimeout(func(), 0);