diff --git a/src/layout/components/SideBar.vue b/src/layout/components/SideBar.vue
index 17e4344a..99b080f3 100644
--- a/src/layout/components/SideBar.vue
+++ b/src/layout/components/SideBar.vue
@@ -29,37 +29,39 @@ limitations under the License. -->
:style="{ border: 'none' }"
>
-
-
-
-
-
- {{ menu.meta.title }}
-
-
-
-
-
-
- {{ m.meta && m.meta.title }}
+
+
+
+
+
+
+ {{ menu.meta.title }}
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+ {{ m.meta && m.meta.title }}
+
+
+
+
+
+
+
+
+
+
+
@@ -95,7 +97,7 @@ limitations under the License. -->
theme.value = ["VirtualMachine", "Kubernetes"].includes(String(menu.name)) ? "light" : "black";
};
const filterMenus = (menus: Recordable[]) => {
- return menus.filter((d) => d.meta && !d.meta.notShow);
+ return menus.filter((d) => d.meta && !d.meta.notShow && d.meta.activate);
};
function setCollapse() {
open.value = true;
diff --git a/src/router/alarm.ts b/src/router/alarm.ts
index f9e6b92f..950101e4 100644
--- a/src/router/alarm.ts
+++ b/src/router/alarm.ts
@@ -25,6 +25,7 @@ export const routesAlarm: Array = [
title: "Alerting",
icon: "spam",
hasGroup: false,
+ activate: true,
},
component: Layout,
children: [
diff --git a/src/router/dashboard.ts b/src/router/dashboard.ts
index ab7ade75..f0a46812 100644
--- a/src/router/dashboard.ts
+++ b/src/router/dashboard.ts
@@ -26,6 +26,7 @@ export const routesDashboard: Array = [
title: "Dashboards",
icon: "dashboard_customize",
hasGroup: true,
+ activate: true,
},
children: [
{
@@ -34,6 +35,7 @@ export const routesDashboard: Array = [
name: "List",
meta: {
title: "Dashboard List",
+ activate: true,
},
},
{
@@ -42,6 +44,7 @@ export const routesDashboard: Array = [
name: "New",
meta: {
title: "New Dashboard",
+ activate: true,
},
},
{
diff --git a/src/router/layer.ts b/src/router/layer.ts
index 02646d0b..e453ea73 100644
--- a/src/router/layer.ts
+++ b/src/router/layer.ts
@@ -21,7 +21,7 @@ import type { MenuOptions } from "@/types/app";
async function layerDashboards() {
const appStore = useAppStoreWithOut();
await appStore.getActivateMenus();
- const routes = appStore.activateMenus.map((item: MenuOptions) => {
+ const routes = appStore.allMenus.map((item: MenuOptions) => {
const route: any = {
path: "",
name: item.name,
@@ -30,6 +30,7 @@ async function layerDashboards() {
icon: item.icon || "cloud_queue",
title: item.title,
hasGroup: item.hasGroup,
+ activate: item.activate,
},
children: item.subItems && item.subItems.length ? [] : undefined,
};
@@ -41,6 +42,7 @@ async function layerDashboards() {
title: child.title,
layer: child.layer,
icon: child.icon || "cloud_queue",
+ activate: child.activate,
},
component: () => import("@/views/Layer.vue"),
};
@@ -65,6 +67,7 @@ async function layerDashboards() {
title: item.title,
layer: item.layer,
icon: item.icon,
+ activate: item.activate,
},
component: () => import("@/views/Layer.vue"),
},
diff --git a/src/router/marketplace.ts b/src/router/marketplace.ts
index 32f7d745..d5f75078 100644
--- a/src/router/marketplace.ts
+++ b/src/router/marketplace.ts
@@ -25,6 +25,7 @@ export const routesMarketplace: Array = [
title: "Marketplace",
icon: "marketplace",
hasGroup: true,
+ activate: true,
},
component: Layout,
children: [
@@ -33,6 +34,7 @@ export const routesMarketplace: Array = [
name: "MenusManagement",
meta: {
title: "Categories",
+ activate: true,
},
component: () => import("@/views/marketplace/Menus.vue"),
},
@@ -41,6 +43,7 @@ export const routesMarketplace: Array = [
name: "Settings",
meta: {
title: "Settings",
+ activate: true,
},
component: () => import("@/views/marketplace/Settings.vue"),
},