mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-10-14 20:01:28 +00:00
feat: Implement templates for dashboards (#28)
This commit is contained in:
@@ -36,17 +36,7 @@ export const routesDatabase: Array<RouteRecordRaw> = [
|
||||
headPath: "/database",
|
||||
exact: true,
|
||||
},
|
||||
component: () => import("@/views/service/Service.vue"),
|
||||
},
|
||||
{
|
||||
path: "/database/:id/:type",
|
||||
name: "DatabasePanel",
|
||||
meta: {
|
||||
title: "databasePanel",
|
||||
headPath: "/database",
|
||||
exact: true,
|
||||
},
|
||||
component: () => import("@/views/service/Panel.vue"),
|
||||
component: () => import("@/views/Layer.vue"),
|
||||
},
|
||||
],
|
||||
},
|
||||
|
@@ -20,9 +20,9 @@ import Layout from "@/layout/Index.vue";
|
||||
export const routesGen: Array<RouteRecordRaw> = [
|
||||
{
|
||||
path: "",
|
||||
name: "GeneralService",
|
||||
name: "General",
|
||||
meta: {
|
||||
title: "generalService",
|
||||
title: "general",
|
||||
icon: "chart",
|
||||
hasGroup: false,
|
||||
exact: true,
|
||||
@@ -30,24 +30,14 @@ export const routesGen: Array<RouteRecordRaw> = [
|
||||
component: Layout,
|
||||
children: [
|
||||
{
|
||||
path: "/generalService",
|
||||
name: "Services",
|
||||
path: "/general",
|
||||
name: "GeneralServices",
|
||||
meta: {
|
||||
title: "services",
|
||||
headPath: "/generalService/service",
|
||||
headPath: "/general/service",
|
||||
exact: true,
|
||||
},
|
||||
component: () => import("@/views/service/Service.vue"),
|
||||
},
|
||||
{
|
||||
path: "/generalService/service/:id/:type",
|
||||
name: "GeneralServicePanel",
|
||||
meta: {
|
||||
title: "generalServicePanel",
|
||||
headPath: "/generalService/service",
|
||||
exact: true,
|
||||
},
|
||||
component: () => import("@/views/service/Panel.vue"),
|
||||
component: () => import("@/views/Layer.vue"),
|
||||
},
|
||||
],
|
||||
},
|
@@ -15,8 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { createRouter, createWebHistory, RouteRecordRaw } from "vue-router";
|
||||
// import Layout from "@/layout/Index.vue";
|
||||
import { routesGen } from "./generalService";
|
||||
import { routesGen } from "./general";
|
||||
import { routesMesh } from "./serviceMesh";
|
||||
import { routesDatabase } from "./database";
|
||||
import { routesInfra } from "./infrastructure";
|
||||
@@ -52,9 +51,10 @@ router.beforeEach((to, from, next) => {
|
||||
(window as any).axiosCancel = [];
|
||||
}
|
||||
if (to.path === "/") {
|
||||
next({ path: "/generalService" });
|
||||
next({ path: "/general" });
|
||||
} else {
|
||||
next();
|
||||
}
|
||||
});
|
||||
|
||||
export default router;
|
||||
|
@@ -36,7 +36,7 @@ export const routesMesh: Array<RouteRecordRaw> = [
|
||||
title: "services",
|
||||
headPath: "/mesh/services",
|
||||
},
|
||||
component: () => import("@/views/service/Service.vue"),
|
||||
component: () => import("@/views/Layer.vue"),
|
||||
},
|
||||
{
|
||||
path: "/mesh/controlPanel",
|
||||
@@ -45,7 +45,7 @@ export const routesMesh: Array<RouteRecordRaw> = [
|
||||
title: "controlPanel",
|
||||
headPath: "/mesh/controlPanel",
|
||||
},
|
||||
component: () => import("@/views/service/Service.vue"),
|
||||
component: () => import("@/views/Layer.vue"),
|
||||
},
|
||||
{
|
||||
path: "/mesh/dataPanel",
|
||||
@@ -54,40 +54,7 @@ export const routesMesh: Array<RouteRecordRaw> = [
|
||||
title: "dataPanel",
|
||||
headPath: "/mesh/dataPanel",
|
||||
},
|
||||
component: () => import("@/views/service/Service.vue"),
|
||||
},
|
||||
{
|
||||
path: "/mesh/services/:id/:type",
|
||||
name: "MeshServicePanel",
|
||||
meta: {
|
||||
title: "meshServicePanel",
|
||||
headPath: "/mesh/services",
|
||||
exact: true,
|
||||
notShow: true,
|
||||
},
|
||||
component: () => import("@/views/service/Panel.vue"),
|
||||
},
|
||||
{
|
||||
path: "/mesh/controlPanel/:id/:type",
|
||||
name: "MeshControlPanel",
|
||||
meta: {
|
||||
title: "controlPanel",
|
||||
headPath: "/mesh/controlPanel",
|
||||
exact: true,
|
||||
notShow: true,
|
||||
},
|
||||
component: () => import("@/views/service/Panel.vue"),
|
||||
},
|
||||
{
|
||||
path: "/mesh/dataPanel/:id/:type",
|
||||
name: "MeshDataPanel",
|
||||
meta: {
|
||||
title: "dataPanel",
|
||||
headPath: "/mesh/dataPanel",
|
||||
exact: true,
|
||||
notShow: true,
|
||||
},
|
||||
component: () => import("@/views/service/Panel.vue"),
|
||||
component: () => import("@/views/Layer.vue"),
|
||||
},
|
||||
],
|
||||
},
|
||||
|
Reference in New Issue
Block a user