You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2022/08/07 09:16:48 UTC

[skywalking-booster-ui] branch main updated: feat: add the MYSQL layer and update layer routers (#134)

This is an automated email from the ASF dual-hosted git repository.

wusheng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-booster-ui.git


The following commit(s) were added to refs/heads/main by this push:
     new 732b834  feat: add the MYSQL layer and update layer routers (#134)
732b834 is described below

commit 732b834749a1c8c21edf2d1a519ff1e46aa8e0b8
Author: Fine0830 <fi...@outlook.com>
AuthorDate: Sun Aug 7 17:16:44 2022 +0800

    feat: add the MYSQL layer and update layer routers (#134)
---
 src/constants/data.ts  |  6 ++++--
 src/locales/lang/en.ts |  1 +
 src/locales/lang/es.ts |  1 +
 src/locales/lang/zh.ts |  1 +
 src/router/database.ts | 12 ++++++------
 src/router/general.ts  | 23 ++++++++++++++++++++++-
 src/styles/reset.scss  |  6 ++++--
 7 files changed, 39 insertions(+), 11 deletions(-)

diff --git a/src/constants/data.ts b/src/constants/data.ts
index 33779df..9fc7fce 100644
--- a/src/constants/data.ts
+++ b/src/constants/data.ts
@@ -29,8 +29,8 @@ export const Languages = [
 export const RoutesMap: { [key: string]: string } = {
   GeneralServices: "GENERAL",
   GeneralServicesActiveTabIndex: "GENERAL",
-  Database: "VIRTUAL_DATABASE",
-  DatabaseActiveTabIndex: "VIRTUAL_DATABASE",
+  VirtualDatabase: "VIRTUAL_DATABASE",
+  VirtualDatabaseActiveTabIndex: "VIRTUAL_DATABASE",
   MeshServices: "MESH",
   MeshServicesActiveTabIndex: "MESH",
   ControlPanel: "MESH_CP",
@@ -50,4 +50,6 @@ export const RoutesMap: { [key: string]: string } = {
   KubernetesClusterActiveTabIndex: "K8S",
   KubernetesService: "K8S_SERVICE",
   KubernetesServiceActiveTabIndex: "K8S_SERVICE",
+  MySQL: "MYSQL",
+  MySQLActiveTabIndex: "MYSQL",
 };
diff --git a/src/locales/lang/en.ts b/src/locales/lang/en.ts
index 3b4af09..5125601 100644
--- a/src/locales/lang/en.ts
+++ b/src/locales/lang/en.ts
@@ -32,6 +32,7 @@ const msg = {
   dashboards: "Dashboards",
   profiles: "Profiles",
   database: "Database",
+  mySQL: "MySQL",
   serviceName: "Service Name",
   technologies: "Technologies",
   generalServicePanel: "General Service Panel",
diff --git a/src/locales/lang/es.ts b/src/locales/lang/es.ts
index d65c1e4..5f54bc3 100644
--- a/src/locales/lang/es.ts
+++ b/src/locales/lang/es.ts
@@ -32,6 +32,7 @@ const msg = {
   dashboards: "Paneles",
   profiles: "Perfiles",
   database: "Base de Datos",
+  mySQL: "MySQL",
   serviceName: "Nombre Servicio",
   technologies: "Tecnologías",
   generalServicePanel: "Panel Servicio General",
diff --git a/src/locales/lang/zh.ts b/src/locales/lang/zh.ts
index 6c05e54..dc77675 100644
--- a/src/locales/lang/zh.ts
+++ b/src/locales/lang/zh.ts
@@ -32,6 +32,7 @@ const msg = {
   dashboards: "仪表盘",
   profiles: "性能剖析",
   database: "数据库",
+  mySQL: "MySQL",
   serviceName: "服务名称",
   technologies: "技术",
   health: "健康",
diff --git a/src/router/database.ts b/src/router/database.ts
index 70b82b3..5cf4c57 100644
--- a/src/router/database.ts
+++ b/src/router/database.ts
@@ -26,22 +26,22 @@ export const routesDatabase: Array<RouteRecordRaw> = [
       icon: "storage",
       hasGroup: true,
     },
-    redirect: "/database",
+    redirect: "/mySQL",
     component: Layout,
     children: [
       {
-        path: "/database",
-        name: "Database",
+        path: "/mySQL",
+        name: "MySQL",
         meta: {
-          title: "virtualDatabase",
+          title: "mySQL",
           exact: true,
         },
         component: () =>
           import(/* webpackChunkName: "layer" */ "@/views/Layer.vue"),
       },
       {
-        path: "/database/tab/:activeTabIndex",
-        name: "DatabaseActiveTabIndex",
+        path: "/mySQL/tab/:activeTabIndex",
+        name: "MySQLActiveTabIndex",
         meta: {
           notShow: true,
         },
diff --git a/src/router/general.ts b/src/router/general.ts
index e9bb7b8..a1224c4 100644
--- a/src/router/general.ts
+++ b/src/router/general.ts
@@ -24,7 +24,7 @@ export const routesGen: Array<RouteRecordRaw> = [
     meta: {
       title: "general",
       icon: "chart",
-      hasGroup: false,
+      hasGroup: true,
       exact: true,
     },
     component: Layout,
@@ -34,6 +34,7 @@ export const routesGen: Array<RouteRecordRaw> = [
         name: "GeneralServices",
         meta: {
           exact: true,
+          title: "services",
         },
         component: () =>
           import(/* webpackChunkName: "layers" */ "@/views/Layer.vue"),
@@ -43,10 +44,30 @@ export const routesGen: Array<RouteRecordRaw> = [
         name: "GeneralServicesActiveTabIndex",
         meta: {
           exact: true,
+          notShow: true,
         },
         component: () =>
           import(/* webpackChunkName: "layers" */ "@/views/Layer.vue"),
       },
+      {
+        path: "/database",
+        name: "VirtualDatabase",
+        meta: {
+          title: "virtualDatabase",
+          exact: true,
+        },
+        component: () =>
+          import(/* webpackChunkName: "layer" */ "@/views/Layer.vue"),
+      },
+      {
+        path: "/database/tab/:activeTabIndex",
+        name: "VirtualDatabaseActiveTabIndex",
+        meta: {
+          notShow: true,
+        },
+        component: () =>
+          import(/* webpackChunkName: "layer" */ "@/views/Layer.vue"),
+      },
     ],
   },
 ];
diff --git a/src/styles/reset.scss b/src/styles/reset.scss
index 5d732b3..5e88dc1 100644
--- a/src/styles/reset.scss
+++ b/src/styles/reset.scss
@@ -139,8 +139,10 @@ pre {
   padding-left: 56px !important;
 }
 
-.el-icon.menu-icons {
-  margin-top: -3px !important;
+.el-sub-menu__title {
+  .el-icon.menu-icons {
+    margin-top: -5px !important;
+  }
 }
 
 .el-switch__label--left {