update menu data

This commit is contained in:
Fine 2022-09-20 11:42:31 +08:00
parent 4561e2e374
commit e50d283dce
16 changed files with 111 additions and 160 deletions

View File

@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
export enum TimeType { export enum TimeType {
MINUTE_TIME = "MINUTE", MINUTE_TIME = "MINUTE",
HOUR_TIME = "HOUR", HOUR_TIME = "HOUR",
@ -25,35 +26,3 @@ export const Languages = [
{ label: "Chinese", value: "zh" }, { label: "Chinese", value: "zh" },
{ label: "Spanish", value: "es" }, { label: "Spanish", value: "es" },
]; ];
export const RoutesMap: { [key: string]: string } = {
GeneralServices: "GENERAL",
GeneralServicesActiveTabIndex: "GENERAL",
VirtualDatabase: "VIRTUAL_DATABASE",
VirtualDatabaseActiveTabIndex: "VIRTUAL_DATABASE",
VirtualCache: "VIRTUAL_CACHE",
VirtualCacheActiveTabIndex: "VIRTUAL_CACHE",
MeshServices: "MESH",
MeshServicesActiveTabIndex: "MESH",
ControlPanel: "MESH_CP",
ControlPanelActiveTabIndex: "MESH_CP",
DataPanel: "MESH_DP",
DataPanelActiveTabIndex: "MESH_DP",
Linux: "OS_LINUX",
SkyWalkingServer: "SO11Y_OAP",
SkyWalkingServerActiveTabIndex: "SO11Y_OAP",
SatelliteActiveTabIndex: "SO11Y_SATELLITE",
Satellite: "SO11Y_SATELLITE",
Functions: "FAAS",
FunctionsActiveTabIndex: "FAAS",
Browser: "BROWSER",
BrowserActiveTabIndex: "BROWSER",
KubernetesCluster: "K8S",
KubernetesClusterActiveTabIndex: "K8S",
KubernetesService: "K8S_SERVICE",
KubernetesServiceActiveTabIndex: "K8S_SERVICE",
MySQL: "MYSQL",
MySQLActiveTabIndex: "MYSQL",
PostgreSQL: "POSTGRESQL",
PostgreSQLActiveTabIndex: "POSTGRESQL",
};

View File

@ -25,7 +25,6 @@ export const routesAlarm: Array<RouteRecordRaw> = [
title: "alarm", title: "alarm",
icon: "spam", icon: "spam",
hasGroup: false, hasGroup: false,
exact: true,
}, },
component: Layout, component: Layout,
children: [ children: [

View File

@ -26,7 +26,6 @@ export const routesDashboard: Array<RouteRecordRaw> = [
title: "dashboards", title: "dashboards",
icon: "dashboard_customize", icon: "dashboard_customize",
hasGroup: true, hasGroup: true,
exact: true,
}, },
children: [ children: [
{ {
@ -38,7 +37,6 @@ export const routesDashboard: Array<RouteRecordRaw> = [
name: "List", name: "List",
meta: { meta: {
title: "dashboardList", title: "dashboardList",
exact: false,
}, },
}, },
{ {
@ -50,7 +48,6 @@ export const routesDashboard: Array<RouteRecordRaw> = [
name: "New", name: "New",
meta: { meta: {
title: "dashboardNew", title: "dashboardNew",
exact: false,
}, },
}, },
{ {

View File

@ -14,10 +14,8 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import { RouteRecordRaw } from "vue-router";
import Layout from "@/layout/Index.vue";
export const routesBrowser: Array<RouteRecordRaw> = [ export default [
{ {
path: "", path: "",
name: "Browser", name: "Browser",
@ -26,26 +24,22 @@ export const routesBrowser: Array<RouteRecordRaw> = [
icon: "language", icon: "language",
}, },
redirect: "/browser", redirect: "/browser",
component: Layout,
children: [ children: [
{ {
path: "/browser", path: "/browser",
name: "Browser", name: "Browser",
meta: { meta: {
title: "browser", title: "browser",
exact: true, layer: "BROWSER",
}, },
component: () =>
import(/* webpackChunkName: "layer" */ "@/views/Layer.vue"),
}, },
{ {
path: "/browser/tab/:activeTabIndex", path: "/browser/tab/:activeTabIndex",
name: "BrowserActiveTabIndex", name: "BrowserActiveTabIndex",
meta: { meta: {
notShow: true, notShow: true,
layer: "BROWSER",
}, },
component: () =>
import(/* webpackChunkName: "layer" */ "@/views/Layer.vue"),
}, },
], ],
}, },

View File

@ -14,10 +14,8 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import { RouteRecordRaw } from "vue-router";
import Layout from "@/layout/Index.vue";
export const routesDatabase: Array<RouteRecordRaw> = [ export default [
{ {
path: "", path: "",
name: "Database", name: "Database",
@ -27,45 +25,38 @@ export const routesDatabase: Array<RouteRecordRaw> = [
hasGroup: true, hasGroup: true,
}, },
redirect: "/mySQL", redirect: "/mySQL",
component: Layout,
children: [ children: [
{ {
path: "/mySQL", path: "/mySQL",
name: "MySQL", name: "MySQL",
meta: { meta: {
title: "mySQL", title: "mySQL",
exact: true, layer: "MYSQL",
}, },
component: () =>
import(/* webpackChunkName: "layer" */ "@/views/Layer.vue"),
}, },
{ {
path: "/mySQL/tab/:activeTabIndex", path: "/mySQL/tab/:activeTabIndex",
name: "MySQLActiveTabIndex", name: "MySQLActiveTabIndex",
meta: { meta: {
notShow: true, notShow: true,
layer: "MYSQL",
}, },
component: () =>
import(/* webpackChunkName: "layer" */ "@/views/Layer.vue"),
}, },
{ {
path: "/postgreSQL", path: "/postgreSQL",
name: "PostgreSQL", name: "PostgreSQL",
meta: { meta: {
title: "postgreSQL", title: "postgreSQL",
exact: true, layer: "POSTGRESQL",
}, },
component: () =>
import(/* webpackChunkName: "layer" */ "@/views/Layer.vue"),
}, },
{ {
path: "/postgreSQL/tab/:activeTabIndex", path: "/postgreSQL/tab/:activeTabIndex",
name: "PostgreSQLActiveTabIndex", name: "PostgreSQLActiveTabIndex",
meta: { meta: {
notShow: true, notShow: true,
layer: "POSTGRESQL",
}, },
component: () =>
import(/* webpackChunkName: "layer" */ "@/views/Layer.vue"),
}, },
], ],
}, },

View File

@ -14,34 +14,25 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import { RouteRecordRaw } from "vue-router";
import Layout from "@/layout/Index.vue";
export const routesFunctions: Array<RouteRecordRaw> = [ export default [
{ {
path: "", path: "",
name: "Functions", name: "Functions",
meta: { meta: {
title: "functions", title: "functions",
icon: "cloud_queue", icon: "cloud_queue",
layer: "FAAS",
}, },
redirect: "/functions", redirect: "/functions",
component: Layout,
children: [ children: [
{ {
path: "/functions", path: "/functions",
name: "Functions", name: "Functions",
meta: {
exact: true,
},
component: () =>
import(/* webpackChunkName: "layer" */ "@/views/Layer.vue"),
}, },
{ {
path: "/functions/tab/:activeTabIndex", path: "/functions/tab/:activeTabIndex",
name: "FunctionsActiveTabIndex", name: "FunctionsActiveTabIndex",
component: () =>
import(/* webpackChunkName: "layer" */ "@/views/Layer.vue"),
}, },
], ],
}, },

View File

@ -14,10 +14,8 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import { RouteRecordRaw } from "vue-router";
import Layout from "@/layout/Index.vue";
export const routesGen: Array<RouteRecordRaw> = [ export default [
{ {
path: "", path: "",
name: "General", name: "General",
@ -25,67 +23,55 @@ export const routesGen: Array<RouteRecordRaw> = [
title: "general", title: "general",
icon: "chart", icon: "chart",
hasGroup: true, hasGroup: true,
exact: true,
}, },
component: Layout,
children: [ children: [
{ {
path: "/general", path: "/general",
name: "GeneralServices", name: "GeneralServices",
meta: { meta: {
exact: true,
title: "services", title: "services",
layer: "GENERAL",
}, },
component: () =>
import(/* webpackChunkName: "layers" */ "@/views/Layer.vue"),
}, },
{ {
path: "/general/tab/:activeTabIndex", path: "/general/tab/:activeTabIndex",
name: "GeneralServicesActiveTabIndex", name: "GeneralServicesActiveTabIndex",
meta: { meta: {
exact: true,
notShow: true, notShow: true,
layer: "GENERAL",
}, },
component: () =>
import(/* webpackChunkName: "layers" */ "@/views/Layer.vue"),
}, },
{ {
path: "/database", path: "/database",
name: "VirtualDatabase", name: "VirtualDatabase",
meta: { meta: {
title: "virtualDatabase", title: "virtualDatabase",
exact: true, layer: "VIRTUAL_DATABASE",
}, },
component: () =>
import(/* webpackChunkName: "layer" */ "@/views/Layer.vue"),
}, },
{ {
path: "/database/tab/:activeTabIndex", path: "/database/tab/:activeTabIndex",
name: "VirtualDatabaseActiveTabIndex", name: "VirtualDatabaseActiveTabIndex",
meta: { meta: {
notShow: true, notShow: true,
layer: "VIRTUAL_DATABASE",
}, },
component: () =>
import(/* webpackChunkName: "layer" */ "@/views/Layer.vue"),
}, },
{ {
path: "/cache", path: "/cache",
name: "VirtualCache", name: "VirtualCache",
meta: { meta: {
title: "virtualCache", title: "virtualCache",
exact: true, layer: "VIRTUAL_CACHE",
}, },
component: () =>
import(/* webpackChunkName: "layer" */ "@/views/Layer.vue"),
}, },
{ {
path: "/cache/tab/:activeTabIndex", path: "/cache/tab/:activeTabIndex",
name: "VirtualCacheActiveTabIndex", name: "VirtualCacheActiveTabIndex",
meta: { meta: {
notShow: true, notShow: true,
layer: "VIRTUAL_CACHE",
}, },
component: () =>
import(/* webpackChunkName: "layer" */ "@/views/Layer.vue"),
}, },
], ],
}, },

35
src/router/data/index.ts Normal file
View File

@ -0,0 +1,35 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import general from "./general";
import serviceMesh from "./serviceMesh";
import database from "./database";
import infrastructure from "./infrastructure";
import selfObservability from "./selfObservability";
import functions from "./functions";
import browser from "./browser";
import k8s from "./k8s";
export default [
...general,
...serviceMesh,
...functions,
...k8s,
...infrastructure,
...browser,
...database,
...selfObservability,
];

View File

@ -14,30 +14,25 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import { RouteRecordRaw } from "vue-router";
import Layout from "@/layout/Index.vue";
export const routesInfra: Array<RouteRecordRaw> = [ export default [
{ {
path: "", path: "",
name: "Infrastructure", name: "Infrastructure",
meta: { meta: {
title: "infrastructure", title: "infrastructure",
icon: "scatter_plot", icon: "scatter_plot",
exact: true,
hasGroup: true, hasGroup: true,
}, },
redirect: "/linux", redirect: "/linux",
component: Layout,
children: [ children: [
{ {
path: "/linux", path: "/linux",
name: "Linux", name: "Linux",
meta: { meta: {
title: "linux", title: "linux",
layer: "OS_LINUX",
}, },
component: () =>
import(/* webpackChunkName: "layer" */ "@/views/Layer.vue"),
}, },
{ {
path: "/linux/tab/:activeTabIndex", path: "/linux/tab/:activeTabIndex",
@ -45,9 +40,8 @@ export const routesInfra: Array<RouteRecordRaw> = [
meta: { meta: {
title: "linux", title: "linux",
notShow: true, notShow: true,
layer: "OS_LINUX",
}, },
component: () =>
import(/* webpackChunkName: "layer" */ "@/views/Layer.vue"),
}, },
// { // {
// path: "/infrastructure/vm", // path: "/infrastructure/vm",

View File

@ -14,10 +14,8 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import { RouteRecordRaw } from "vue-router";
import Layout from "@/layout/Index.vue";
export const routesK8s: Array<RouteRecordRaw> = [ export default [
{ {
path: "", path: "",
name: "Kubernetes", name: "Kubernetes",
@ -27,7 +25,6 @@ export const routesK8s: Array<RouteRecordRaw> = [
hasGroup: true, hasGroup: true,
}, },
redirect: "/kubernetes/cluster", redirect: "/kubernetes/cluster",
component: Layout,
children: [ children: [
{ {
path: "/kubernetes/cluster", path: "/kubernetes/cluster",
@ -35,9 +32,8 @@ export const routesK8s: Array<RouteRecordRaw> = [
meta: { meta: {
notShow: false, notShow: false,
title: "kubernetesCluster", title: "kubernetesCluster",
layer: "K8S",
}, },
component: () =>
import(/* webpackChunkName: "layer" */ "@/views/Layer.vue"),
}, },
{ {
path: "/kubernetes/cluster/tab/:activeTabIndex", path: "/kubernetes/cluster/tab/:activeTabIndex",
@ -45,9 +41,8 @@ export const routesK8s: Array<RouteRecordRaw> = [
meta: { meta: {
notShow: true, notShow: true,
title: "kubernetesClusterActiveTabIndex", title: "kubernetesClusterActiveTabIndex",
layer: "K8S",
}, },
component: () =>
import(/* webpackChunkName: "layer" */ "@/views/Layer.vue"),
}, },
{ {
path: "/kubernetes/service", path: "/kubernetes/service",
@ -55,9 +50,8 @@ export const routesK8s: Array<RouteRecordRaw> = [
meta: { meta: {
notShow: false, notShow: false,
title: "kubernetesService", title: "kubernetesService",
layer: "K8S_SERVICE",
}, },
component: () =>
import(/* webpackChunkName: "layer" */ "@/views/Layer.vue"),
}, },
{ {
path: "/kubernetes/service/tab/:activeTabIndex", path: "/kubernetes/service/tab/:activeTabIndex",
@ -65,9 +59,8 @@ export const routesK8s: Array<RouteRecordRaw> = [
meta: { meta: {
notShow: true, notShow: true,
title: "kubernetesServiceActiveTabIndex", title: "kubernetesServiceActiveTabIndex",
layer: "K8S_SERVICE",
}, },
component: () =>
import(/* webpackChunkName: "layer" */ "@/views/Layer.vue"),
}, },
], ],
}, },

View File

@ -14,10 +14,8 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import { RouteRecordRaw } from "vue-router";
import Layout from "@/layout/Index.vue";
export const routesSelf: Array<RouteRecordRaw> = [ export default [
{ {
path: "", path: "",
name: "SelfObservability", name: "SelfObservability",
@ -27,43 +25,38 @@ export const routesSelf: Array<RouteRecordRaw> = [
icon: "logo", icon: "logo",
hasGroup: true, hasGroup: true,
}, },
component: Layout,
children: [ children: [
{ {
path: "/self/skyWalkingServer", path: "/self/skyWalkingServer",
name: "SkyWalkingServer", name: "SkyWalkingServer",
meta: { meta: {
title: "skyWalkingServer", title: "skyWalkingServer",
layer: "SO11Y_OAP",
}, },
component: () =>
import(/* webpackChunkName: "layer" */ "@/views/Layer.vue"),
}, },
{ {
path: "/self/skyWalkingServer/tab/:activeTabIndex", path: "/self/skyWalkingServer/tab/:activeTabIndex",
name: "SkyWalkingServerActiveTabIndex", name: "SkyWalkingServerActiveTabIndex",
meta: { meta: {
notShow: true, notShow: true,
layer: "SO11Y_OAP",
}, },
component: () =>
import(/* webpackChunkName: "layer" */ "@/views/Layer.vue"),
}, },
{ {
path: "/self/satellite", path: "/self/satellite",
name: "Satellite", name: "Satellite",
meta: { meta: {
title: "satellite", title: "satellite",
layer: "SO11Y_SATELLITE",
}, },
component: () =>
import(/* webpackChunkName: "layer" */ "@/views/Layer.vue"),
}, },
{ {
path: "/self/satellite/tab/:activeTabIndex", path: "/self/satellite/tab/:activeTabIndex",
name: "SatelliteActiveTabIndex", name: "SatelliteActiveTabIndex",
meta: { meta: {
notShow: true, notShow: true,
layer: "SO11Y_SATELLITE",
}, },
component: () =>
import(/* webpackChunkName: "layer" */ "@/views/Layer.vue"),
}, },
], ],
}, },

View File

@ -14,10 +14,8 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import { RouteRecordRaw } from "vue-router";
import Layout from "@/layout/Index.vue";
export const routesMesh: Array<RouteRecordRaw> = [ export default [
{ {
path: "", path: "",
name: "ServiceMesh", name: "ServiceMesh",
@ -27,7 +25,6 @@ export const routesMesh: Array<RouteRecordRaw> = [
icon: "epic", icon: "epic",
hasGroup: true, hasGroup: true,
}, },
component: Layout,
children: [ children: [
{ {
path: "/mesh/services", path: "/mesh/services",
@ -35,18 +32,16 @@ export const routesMesh: Array<RouteRecordRaw> = [
meta: { meta: {
notShow: false, notShow: false,
title: "services", title: "services",
layer: "MESH",
}, },
component: () =>
import(/* webpackChunkName: "layer" */ "@/views/Layer.vue"),
}, },
{ {
path: "/mesh/services/tab/:activeTabIndex", path: "/mesh/services/tab/:activeTabIndex",
name: "MeshServicesActiveTabIndex", name: "MeshServicesActiveTabIndex",
meta: { meta: {
notShow: true, notShow: true,
layer: "MESH",
}, },
component: () =>
import(/* webpackChunkName: "layer" */ "@/views/Layer.vue"),
}, },
{ {
path: "/mesh/controlPanel", path: "/mesh/controlPanel",
@ -54,18 +49,16 @@ export const routesMesh: Array<RouteRecordRaw> = [
meta: { meta: {
notShow: false, notShow: false,
title: "controlPanel", title: "controlPanel",
layer: "MESH_CP",
}, },
component: () =>
import(/* webpackChunkName: "layer" */ "@/views/Layer.vue"),
}, },
{ {
path: "/mesh/controlPanel/tab/:activeTabIndex", path: "/mesh/controlPanel/tab/:activeTabIndex",
name: "ControlPanelActiveTabIndex", name: "ControlPanelActiveTabIndex",
meta: { meta: {
notShow: true, notShow: true,
layer: "MESH_CP",
}, },
component: () =>
import(/* webpackChunkName: "layer" */ "@/views/Layer.vue"),
}, },
{ {
path: "/mesh/dataPanel", path: "/mesh/dataPanel",
@ -73,9 +66,8 @@ export const routesMesh: Array<RouteRecordRaw> = [
meta: { meta: {
notShow: false, notShow: false,
title: "dataPanel", title: "dataPanel",
layer: "MESH_DP",
}, },
component: () =>
import(/* webpackChunkName: "layer" */ "@/views/Layer.vue"),
}, },
{ {
path: "/mesh/dataPanel/tab/:activeTabIndex", path: "/mesh/dataPanel/tab/:activeTabIndex",
@ -83,9 +75,8 @@ export const routesMesh: Array<RouteRecordRaw> = [
meta: { meta: {
notShow: true, notShow: true,
title: "dataPanelActiveTabIndex", title: "dataPanelActiveTabIndex",
layer: "MESH_DP",
}, },
component: () =>
import(/* webpackChunkName: "layer" */ "@/views/Layer.vue"),
}, },
], ],
}, },

View File

@ -15,27 +15,13 @@
* limitations under the License. * limitations under the License.
*/ */
import { createRouter, createWebHistory, RouteRecordRaw } from "vue-router"; import { createRouter, createWebHistory, RouteRecordRaw } from "vue-router";
import { routesGen } from "./general";
import { routesMesh } from "./serviceMesh";
import { routesDatabase } from "./database";
import { routesInfra } from "./infrastructure";
import { routesDashboard } from "./dashboard"; import { routesDashboard } from "./dashboard";
import { routesSetting } from "./setting"; import { routesSetting } from "./setting";
import { routesAlarm } from "./alarm"; import { routesAlarm } from "./alarm";
import { routesSelf } from "./selfObservability"; import routesLayers from "./layer";
import { routesFunctions } from "./functions";
import { routesBrowser } from "./browser";
import { routesK8s } from "./k8s";
const routes: Array<RouteRecordRaw> = [ const routes: Array<RouteRecordRaw> = [
...routesGen, ...routesLayers,
...routesMesh,
...routesFunctions,
...routesK8s,
...routesInfra,
...routesBrowser,
...routesDatabase,
...routesSelf,
...routesDashboard, ...routesDashboard,
...routesAlarm, ...routesAlarm,
...routesSetting, ...routesSetting,

35
src/router/layer.ts Normal file
View File

@ -0,0 +1,35 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import LayerJson from "./data";
import Layout from "@/layout/Index.vue";
function layerDashboards() {
const routes = LayerJson.map((item: any) => {
item.component = Layout;
if (item.meta.hasGroup) {
item.children = item.children.map((d: any) => {
d.component = () =>
import(/* webpackChunkName: "layer" */ "@/views/Layer.vue");
return d;
});
}
return item;
});
return routes;
}
export default layerDashboards();

View File

@ -25,7 +25,6 @@ export const routesSetting: Array<RouteRecordRaw> = [
title: "settings", title: "settings",
icon: "settings", icon: "settings",
hasGroup: false, hasGroup: false,
exact: false,
}, },
component: Layout, component: Layout,
children: [ children: [
@ -36,7 +35,6 @@ export const routesSetting: Array<RouteRecordRaw> = [
title: "settings", title: "settings",
icon: "settings", icon: "settings",
hasGroup: false, hasGroup: false,
exact: false,
}, },
component: () => component: () =>
import(/* webpackChunkName: "settings" */ "@/views/Settings.vue"), import(/* webpackChunkName: "settings" */ "@/views/Settings.vue"),

View File

@ -27,7 +27,6 @@ import { useDashboardStore } from "@/store/modules/dashboard";
import Dashboard from "./dashboard/Edit.vue"; import Dashboard from "./dashboard/Edit.vue";
import { useI18n } from "vue-i18n"; import { useI18n } from "vue-i18n";
import { useAppStoreWithOut } from "@/store/modules/app"; import { useAppStoreWithOut } from "@/store/modules/app";
import { RoutesMap } from "@/constants/data";
const route = useRoute(); const route = useRoute();
const { t } = useI18n(); const { t } = useI18n();
@ -38,7 +37,7 @@ const layer = ref<string>("GENERAL");
getDashboard(); getDashboard();
async function getDashboard() { async function getDashboard() {
layer.value = RoutesMap[String(route.name)]; layer.value = String(route.meta.layer);
dashboardStore.setLayer(layer.value); dashboardStore.setLayer(layer.value);
dashboardStore.setMode(false); dashboardStore.setMode(false);
await dashboardStore.setDashboards(); await dashboardStore.setDashboards();