mirror of
https://github.com/didi/KnowStreaming.git
synced 2026-01-15 04:38:16 +08:00
初始化3.0.0版本
This commit is contained in:
138
km-console/packages/layout-clusters-fe/src/pages/pageRoutes.ts
Normal file
138
km-console/packages/layout-clusters-fe/src/pages/pageRoutes.ts
Normal file
@@ -0,0 +1,138 @@
|
||||
import HomePage from './MutliClusterPage/HomePage';
|
||||
|
||||
import { NoMatch } from '.';
|
||||
import CommonRoute from './CommonRoute';
|
||||
|
||||
import BrokerBoard from './BrokerDashboard/index';
|
||||
import BrokerList from './BrokerList';
|
||||
import BrokerControllerChangeLog from './BrokerControllerChangeLog';
|
||||
|
||||
import TopicBoard from './TopicDashboard';
|
||||
import TopicList from './TopicList';
|
||||
|
||||
import Consumers from './Consumers/index';
|
||||
|
||||
import Jobs from './Jobs';
|
||||
|
||||
import TestingConsumer from './TestingConsumer';
|
||||
import TestingProduce from './TestingProduce';
|
||||
import SingleClusterDetail from './SingleClusterDetail';
|
||||
import CommonConfig, { ClustersPermissionMap } from './CommonConfig';
|
||||
import SecurityACLs from './SecurityACLs';
|
||||
import SecurityUsers from './SecurityUsers';
|
||||
import LoadRebalance from './LoadRebalance';
|
||||
|
||||
const pageRoutes = [
|
||||
{
|
||||
path: '/',
|
||||
exact: true,
|
||||
component: HomePage,
|
||||
commonRoute: CommonConfig,
|
||||
noSider: true,
|
||||
},
|
||||
// 集群首页
|
||||
{
|
||||
path: '/cluster/:clusterId',
|
||||
component: SingleClusterDetail,
|
||||
commonRoute: CommonRoute,
|
||||
noSider: false,
|
||||
children: [
|
||||
// 负载均衡
|
||||
process.env.BUSINESS_VERSION
|
||||
? {
|
||||
path: 'cluster/balance',
|
||||
exact: true,
|
||||
component: LoadRebalance,
|
||||
noSider: false,
|
||||
}
|
||||
: undefined,
|
||||
{
|
||||
path: 'cluster',
|
||||
exact: true,
|
||||
component: SingleClusterDetail,
|
||||
noSider: false,
|
||||
},
|
||||
// broker相关页面
|
||||
{
|
||||
path: 'broker',
|
||||
exact: true,
|
||||
component: BrokerBoard,
|
||||
noSider: false,
|
||||
},
|
||||
{
|
||||
path: 'broker/list',
|
||||
exact: true,
|
||||
component: BrokerList,
|
||||
noSider: false,
|
||||
},
|
||||
{
|
||||
path: 'broker/controller-changelog',
|
||||
exact: true,
|
||||
component: BrokerControllerChangeLog,
|
||||
noSider: false,
|
||||
},
|
||||
// topic相关页面
|
||||
{
|
||||
path: 'topic',
|
||||
exact: true,
|
||||
component: TopicBoard,
|
||||
noSider: false,
|
||||
},
|
||||
{
|
||||
path: 'topic/list',
|
||||
exact: true,
|
||||
component: TopicList,
|
||||
noSider: false,
|
||||
},
|
||||
// testing 生产 消费相关页面
|
||||
process.env.BUSINESS_VERSION
|
||||
? {
|
||||
path: 'testing/consumer',
|
||||
exact: true,
|
||||
component: TestingConsumer,
|
||||
noSider: false,
|
||||
permissionNode: ClustersPermissionMap.TEST_CONSUMER,
|
||||
}
|
||||
: undefined,
|
||||
process.env.BUSINESS_VERSION
|
||||
? {
|
||||
path: 'testing/producer',
|
||||
exact: true,
|
||||
component: TestingProduce,
|
||||
permissionNode: ClustersPermissionMap.TEST_PRODUCER,
|
||||
}
|
||||
: undefined,
|
||||
// consumers消费组相关页面
|
||||
{
|
||||
path: 'consumers',
|
||||
exact: true,
|
||||
component: Consumers,
|
||||
noSider: false,
|
||||
},
|
||||
{
|
||||
path: 'security/acls',
|
||||
exact: true,
|
||||
component: SecurityACLs,
|
||||
noSider: false,
|
||||
},
|
||||
{
|
||||
path: 'security/users',
|
||||
exact: true,
|
||||
component: SecurityUsers,
|
||||
noSider: false,
|
||||
},
|
||||
{
|
||||
path: 'jobs',
|
||||
exact: true,
|
||||
component: Jobs,
|
||||
noSider: false,
|
||||
},
|
||||
{
|
||||
path: '*',
|
||||
component: () => NoMatch,
|
||||
},
|
||||
].filter((p) => p),
|
||||
},
|
||||
];
|
||||
|
||||
export { pageRoutes };
|
||||
Reference in New Issue
Block a user