mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-13 08:17:33 +00:00
feat: update menus
This commit is contained in:
parent
f3f0a8e395
commit
c3943f317d
@ -25,8 +25,8 @@ import { routesSettings } from "./settings";
|
|||||||
const routes: Array<RouteRecordRaw> = [
|
const routes: Array<RouteRecordRaw> = [
|
||||||
...routesMarketplace,
|
...routesMarketplace,
|
||||||
...routesLayers,
|
...routesLayers,
|
||||||
...routesDashboard,
|
|
||||||
...routesAlarm,
|
...routesAlarm,
|
||||||
|
...routesDashboard,
|
||||||
...routesSettings,
|
...routesSettings,
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -37,8 +37,6 @@ const router = createRouter({
|
|||||||
|
|
||||||
(window as any).axiosCancel = [];
|
(window as any).axiosCancel = [];
|
||||||
|
|
||||||
const defaultPath = (routesLayers[0] && routesLayers[0].children[0].path) || "";
|
|
||||||
|
|
||||||
router.beforeEach((to, from, next) => {
|
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) {
|
if ((window as any).axiosCancel.length !== 0) {
|
||||||
@ -49,6 +47,7 @@ router.beforeEach((to, from, next) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (to.path === "/") {
|
if (to.path === "/") {
|
||||||
|
const defaultPath = (routesLayers[0] && routesLayers[0].children[0].path) || "";
|
||||||
next({ path: defaultPath });
|
next({ path: defaultPath });
|
||||||
} else {
|
} else {
|
||||||
next();
|
next();
|
||||||
|
Loading…
Reference in New Issue
Block a user