ci4sManagement-cloud/react-ui/config/routes.ts

393 lines
8.6 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* @name umi 的路由配置
* @description 只支持 path,component,routes,redirect,wrappers,name,icon 的配置
* @param path path 只支持两种占位符配置,第一种是动态参数 :id 的形式,第二种是 * 通配符,通配符只能出现路由字符串的最后。
* @param component 配置 location 和 path 匹配后用于渲染的 React 组件路径。可以是绝对路径,也可以是相对路径,如果是相对路径,会从 src/pages 开始找起。
* @param routes 配置子路由,通常在需要为多个路径增加 layout 组件时使用。
* @param redirect 配置路由跳转
* @param wrappers 配置路由组件的包装组件,通过包装组件可以为当前的路由组件组合进更多的功能。 比如,可以用于路由级别的权限校验
* @param name 配置路由的标题,默认读取国际化文件 menu.ts 中 menu.xxxx 的值,如配置 name 为 login则读取 menu.ts 中 menu.login 的取值作为标题
* @param icon 配置路由的图标,取值参考 https://ant.design/components/icon-cn 注意去除风格后缀和大小写,如想要配置图标为 <StepBackwardOutlined /> 则取值应为 stepBackward 或 StepBackward如想要配置图标为 <UserOutlined /> 则取值应为 user 或者 User
* @doc https://umijs.org/docs/guides/routes
*/
export default [
{
path: '/',
redirect: '/workspace',
},
{
name: '工作空间',
path: '/workspace',
routes: [
{
name: '工作空间',
path: '',
key: 'workspace',
component: './Workspace/index',
},
],
},
{
path: '/user',
layout: false,
routes: [
{
name: 'login',
path: '/user/login',
component: './User/Login',
},
],
},
{
path: '/account',
name: '用户中心',
routes: [
{
name: '用户中心',
path: '/account/center',
component: './User/Center',
},
{
name: '用户设置',
path: '/account/settings',
component: './User/Settings',
},
],
},
{
name: '数据准备',
path: '/datasetPreparation',
routes: [
{
path: '',
redirect: '/datasetPreparation/datasetAnnotation',
},
{
name: '数据标注',
path: 'datasetAnnotation',
component: './DatasetPreparation/DatasetAnnotation/index',
},
],
},
{
name: '开发环境',
path: '/developmentEnvironment',
routes: [
{
name: '开发环境',
path: '',
component: './DevelopmentEnvironment/List',
},
{
name: '创建开发环境',
path: 'create',
component: './DevelopmentEnvironment/Create',
},
{
name: '开发环境详情',
path: 'editor',
component: './DevelopmentEnvironment/Editor',
},
],
},
{
name: '流水线',
path: '/pipeline',
routes: [
{
path: '',
redirect: '/pipeline/template',
},
{
name: '流水线模板',
path: '/pipeline/template',
routes: [
{
name: '流水线模板',
path: '',
component: './Pipeline/index',
},
{
name: '流水线详情',
path: 'info/:id',
component: './Pipeline/Info/index',
},
],
},
{
name: '实验',
path: 'experiment',
routes: [
{
name: '实验',
path: '',
component: './Experiment/index',
},
{
name: '实验实例',
path: 'instance/:workflowId/:id',
component: './Experiment/Info/index',
},
{
name: '实验对比',
path: 'compare',
component: './Experiment/Comparison/index',
},
],
},
],
},
{
name: 'AI资产',
path: '/dataset',
routes: [
{
path: '',
redirect: '/dataset/dataset',
},
{
name: '数据集',
path: 'dataset',
routes: [
{
name: '数据集',
path: '',
component: './Dataset/index',
},
{
name: '数据集简介',
path: 'info/:id',
component: './Dataset/intro',
},
],
},
{
name: '模型',
path: 'model',
routes: [
{
name: '模型',
path: '',
component: './Model/index',
},
{
name: '模型简介',
path: 'info/:id',
component: './Model/intro',
},
],
},
{
name: '镜像',
path: 'mirror',
routes: [
{
name: '镜像',
path: '',
component: './Mirror/List',
},
{
name: '镜像详情',
path: 'info/:id',
component: './Mirror/Info',
},
{
name: '创建镜像',
path: 'create',
component: './Mirror/Create',
},
],
},
{
name: '代码配置',
path: 'codeConfig',
routes: [
{
name: '代码配置',
path: '',
component: './CodeConfig/List',
},
],
},
],
},
{
name: '模型部署',
path: '/modelDeployment',
routes: [
{
name: '模型部署',
path: '',
component: './ModelDeployment/List',
},
{
name: '模型部署详情',
path: 'info/:id',
component: './ModelDeployment/Info',
},
{
name: '创建推理服务',
path: 'create',
component: './ModelDeployment/Create',
},
],
},
{
name: '应用开发',
path: '/appsDeployment',
routes: [
{
name: '应用开发',
path: '',
key: 'appsDeployment',
component: './Application',
},
],
},
{
name: '监控运维',
path: '/see',
routes: [
{
name: '监控运维',
path: '',
key: 'see',
component: './missingPage.jsx',
},
],
},
{
name: '资源',
path: '/readad',
routes: [
{
name: '资源',
path: '',
key: 'readad',
component: './missingPage.jsx',
},
],
},
{
name: '组件',
path: '/compent',
routes: [
{
name: '组件',
path: '',
key: 'compent',
component: './missingPage.jsx',
},
],
},
{
name: 'monitor',
path: '/monitor',
routes: [
{
name: '任务日志',
path: '/monitor/job-log/index/:id',
component: './Monitor/JobLog',
},
],
},
{
name: 'tool',
path: '/tool',
routes: [
{
name: '导入表',
path: '/tool/gen/import',
component: './Tool/Gen/import',
},
{
name: '编辑表',
path: '/tool/gen/edit',
component: './Tool/Gen/edit',
},
],
},
{
name: '系统管理',
path: '/system',
routes: [
{
path: '',
redirect: '/system/user',
},
{
name: '用户管理',
path: 'user',
component: './System/User',
},
{
name: '角色管理',
path: 'role',
component: './System/Role',
},
{
name: '定时任务',
path: 'job',
component: './Monitor/Job',
},
{
name: '菜单管理',
path: 'menu',
component: './System/Menu',
},
{
name: '部门管理',
path: 'dept',
component: './System/Dept',
},
{
name: '岗位管理',
path: 'post',
component: './System/Post',
},
{
name: '字典管理',
path: 'dict',
component: './System/Dict',
},
{
name: '字典数据',
path: 'dict-data/index/:id',
component: './System/DictData',
},
{
name: '分配用户',
path: 'role-auth/user/:id',
component: './System/Role/authUser',
},
{
name: '日志',
path: 'log',
routes: [
{
path: '',
redirect: '/system/log/operlog',
},
],
},
],
},
{
name: 'docs',
path: '/docs',
routes: [
{
name: '使用指南',
path: '',
key: 'docs',
component: './Docs/index',
},
],
},
{
path: '*',
layout: false,
component: './404',
},
];