From 5b63b9ce670a12de62b5796df2d11cf69aa0a67a Mon Sep 17 00:00:00 2001 From: GraceWalk Date: Tue, 13 Sep 2022 14:12:34 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=B7=A6=E4=BE=A7=E6=A0=8F=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../layout-clusters-fe/src/constants/menu.ts | 38 +++++++++---------- .../layout-clusters-fe/src/locales/zh.tsx | 4 ++ .../src/pages/pageRoutes.ts | 34 ++++++++--------- 3 files changed, 40 insertions(+), 36 deletions(-) diff --git a/km-console/packages/layout-clusters-fe/src/constants/menu.ts b/km-console/packages/layout-clusters-fe/src/constants/menu.ts index 3feb2d9a..8891be10 100755 --- a/km-console/packages/layout-clusters-fe/src/constants/menu.ts +++ b/km-console/packages/layout-clusters-fe/src/constants/menu.ts @@ -12,20 +12,6 @@ export const leftMenus = (clusterId?: string) => ({ name: 'cluster', path: 'cluster', icon: 'icon-Cluster', - children: [ - { - name: 'overview', - path: '', - icon: '#icon-luoji', - }, - process.env.BUSINESS_VERSION - ? { - name: 'balance', - path: 'balance', - icon: '#icon-luoji', - } - : undefined, - ].filter((m) => m), }, { name: 'broker', @@ -83,6 +69,25 @@ export const leftMenus = (clusterId?: string) => ({ // }, // ], }, + { + name: 'operation', + path: 'operation', + icon: 'icon-Jobs', + children: [ + process.env.BUSINESS_VERSION + ? { + name: 'balance', + path: 'balance', + icon: '#icon-luoji', + } + : undefined, + { + name: 'jobs', + path: 'jobs', + icon: 'icon-Jobs', + }, + ].filter((m) => m), + }, process.env.BUSINESS_VERSION ? { name: 'produce-consume', @@ -127,11 +132,6 @@ export const leftMenus = (clusterId?: string) => ({ // path: 'acls', // icon: 'icon-wodegongzuotai', // }, - { - name: 'jobs', - path: 'jobs', - icon: 'icon-Jobs', - }, ].filter((m) => m), }); diff --git a/km-console/packages/layout-clusters-fe/src/locales/zh.tsx b/km-console/packages/layout-clusters-fe/src/locales/zh.tsx index 04c3d705..db190ffc 100755 --- a/km-console/packages/layout-clusters-fe/src/locales/zh.tsx +++ b/km-console/packages/layout-clusters-fe/src/locales/zh.tsx @@ -44,6 +44,10 @@ export default { [`menu.${systemKey}.consumer-group.operating-state`]: 'Operating State', [`menu.${systemKey}.consumer-group.group-list`]: 'GroupList', + [`menu.${systemKey}.operation`]: 'Operation', + [`menu.${systemKey}.operation.balance`]: 'Load Rebalance', + [`menu.${systemKey}.operation.jobs`]: 'Job', + [`menu.${systemKey}.acls`]: 'ACLs', [`menu.${systemKey}.jobs`]: 'Job', diff --git a/km-console/packages/layout-clusters-fe/src/pages/pageRoutes.ts b/km-console/packages/layout-clusters-fe/src/pages/pageRoutes.ts index 71f2d747..13422a46 100644 --- a/km-console/packages/layout-clusters-fe/src/pages/pageRoutes.ts +++ b/km-console/packages/layout-clusters-fe/src/pages/pageRoutes.ts @@ -1,4 +1,4 @@ -import HomePage from './MutliClusterPage/HomePage'; +import ClusterManage from './MutliClusterPage/HomePage'; import { NoMatch } from '.'; import CommonRoute from './CommonRoute'; @@ -26,7 +26,7 @@ const pageRoutes = [ { path: '/', exact: true, - component: HomePage, + component: ClusterManage, commonRoute: CommonConfig, noSider: true, }, @@ -37,15 +37,6 @@ const pageRoutes = [ commonRoute: CommonRoute, noSider: false, children: [ - // 负载均衡 - process.env.BUSINESS_VERSION - ? { - path: 'cluster/balance', - exact: true, - component: LoadRebalance, - noSider: false, - } - : undefined, { path: 'cluster', exact: true, @@ -109,6 +100,21 @@ const pageRoutes = [ component: Consumers, noSider: false, }, + // 负载均衡 + process.env.BUSINESS_VERSION + ? { + path: 'operation/balance', + exact: true, + component: LoadRebalance, + noSider: false, + } + : undefined, + { + path: 'operation/jobs', + exact: true, + component: Jobs, + noSider: false, + }, { path: 'security/acls', exact: true, @@ -121,12 +127,6 @@ const pageRoutes = [ component: SecurityUsers, noSider: false, }, - { - path: 'jobs', - exact: true, - component: Jobs, - noSider: false, - }, { path: '*', component: () => NoMatch,