You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

routes.ts 10 kB

2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443
  1. /**
  2. * @name umi 的路由配置
  3. * @description 只支持 path,component,routes,redirect,wrappers,name,icon 的配置
  4. * @param path path 只支持两种占位符配置,第一种是动态参数 :id 的形式,第二种是 * 通配符,通配符只能出现路由字符串的最后。
  5. * @param component 配置 location 和 path 匹配后用于渲染的 React 组件路径。可以是绝对路径,也可以是相对路径,如果是相对路径,会从 src/pages 开始找起。
  6. * @param routes 配置子路由,通常在需要为多个路径增加 layout 组件时使用。
  7. * @param redirect 配置路由跳转
  8. * @param wrappers 配置路由组件的包装组件,通过包装组件可以为当前的路由组件组合进更多的功能。 比如,可以用于路由级别的权限校验
  9. * @param name 配置路由的标题,默认读取国际化文件 menu.ts 中 menu.xxxx 的值,如配置 name 为 login,则读取 menu.ts 中 menu.login 的取值作为标题
  10. * @param icon 配置路由的图标,取值参考 https://ant.design/components/icon-cn, 注意去除风格后缀和大小写,如想要配置图标为 <StepBackwardOutlined /> 则取值应为 stepBackward 或 StepBackward,如想要配置图标为 <UserOutlined /> 则取值应为 user 或者 User
  11. * @doc https://umijs.org/docs/guides/routes
  12. */
  13. export default [
  14. {
  15. path: '/',
  16. redirect: '/workspace',
  17. },
  18. {
  19. name: '工作空间',
  20. path: '/workspace',
  21. routes: [
  22. {
  23. name: '工作空间',
  24. path: '',
  25. key: 'workspace',
  26. component: './Workspace/index',
  27. },
  28. ],
  29. },
  30. {
  31. path: '/authorize',
  32. layout: false,
  33. component: './Authorize/index',
  34. },
  35. {
  36. path: '/gitlink',
  37. layout: true,
  38. component: './GitLink/index',
  39. },
  40. {
  41. path: '/user',
  42. layout: false,
  43. routes: [
  44. {
  45. name: 'login',
  46. path: '/user/login',
  47. component: './User/Login',
  48. },
  49. ],
  50. },
  51. {
  52. path: '/account',
  53. name: '用户中心',
  54. routes: [
  55. {
  56. name: '用户中心',
  57. path: '/account/center',
  58. component: './User/Center',
  59. },
  60. {
  61. name: '用户设置',
  62. path: '/account/settings',
  63. component: './User/Settings',
  64. },
  65. ],
  66. },
  67. {
  68. name: '数据准备',
  69. path: '/datasetPreparation',
  70. routes: [
  71. {
  72. path: '',
  73. redirect: '/datasetPreparation/datasetAnnotation',
  74. },
  75. {
  76. name: '数据标注',
  77. path: 'datasetAnnotation',
  78. component: './DatasetPreparation/DatasetAnnotation/index',
  79. },
  80. ],
  81. },
  82. {
  83. name: '开发环境',
  84. path: '/developmentEnvironment',
  85. routes: [
  86. {
  87. name: '开发环境',
  88. path: '',
  89. component: './DevelopmentEnvironment/List',
  90. },
  91. {
  92. name: '创建开发环境',
  93. path: 'create',
  94. component: './DevelopmentEnvironment/Create',
  95. },
  96. {
  97. name: '开发环境详情',
  98. path: 'editor',
  99. component: './DevelopmentEnvironment/Editor',
  100. },
  101. ],
  102. },
  103. {
  104. name: '流水线',
  105. path: '/pipeline',
  106. routes: [
  107. {
  108. path: '',
  109. redirect: '/pipeline/template',
  110. },
  111. {
  112. name: '流水线模板',
  113. path: '/pipeline/template',
  114. routes: [
  115. {
  116. name: '流水线模板',
  117. path: '',
  118. component: './Pipeline/index',
  119. },
  120. {
  121. name: '流水线详情',
  122. path: 'info/:id',
  123. component: './Pipeline/Info/index',
  124. },
  125. ],
  126. },
  127. {
  128. name: '实验',
  129. path: 'experiment',
  130. routes: [
  131. {
  132. name: '实验',
  133. path: '',
  134. component: './Experiment/index',
  135. },
  136. {
  137. name: '实验实例',
  138. path: 'instance/:workflowId/:id',
  139. component: './Experiment/Info/index',
  140. },
  141. {
  142. name: '实验对比',
  143. path: 'compare',
  144. component: './Experiment/Comparison/index',
  145. },
  146. ],
  147. },
  148. {
  149. name: '自动机器学习',
  150. path: 'automl',
  151. routes: [
  152. {
  153. name: '自动机器学习',
  154. path: '',
  155. component: './AutoML/List/index',
  156. },
  157. {
  158. name: '自动机器学习详情',
  159. path: 'info/:id',
  160. component: './AutoML/Info/index',
  161. },
  162. {
  163. name: '创建实验',
  164. path: 'create',
  165. component: './AutoML/Create/index',
  166. },
  167. {
  168. name: '编辑实验',
  169. path: 'edit/:id',
  170. component: './AutoML/Create/index',
  171. },
  172. {
  173. name: '实验实例',
  174. path: 'instance/:autoMLId/:id',
  175. component: './AutoML/Instance/index',
  176. },
  177. ],
  178. },
  179. ],
  180. },
  181. {
  182. name: 'AI资产',
  183. path: '/dataset',
  184. routes: [
  185. {
  186. path: '',
  187. redirect: '/dataset/dataset',
  188. },
  189. {
  190. name: '数据集',
  191. path: 'dataset',
  192. routes: [
  193. {
  194. name: '数据集',
  195. path: '',
  196. component: './Dataset/index',
  197. },
  198. {
  199. name: '数据集简介',
  200. path: 'info/:id',
  201. component: './Dataset/intro',
  202. },
  203. ],
  204. },
  205. {
  206. name: '模型',
  207. path: 'model',
  208. routes: [
  209. {
  210. name: '模型',
  211. path: '',
  212. component: './Model/index',
  213. },
  214. {
  215. name: '模型简介',
  216. path: 'info/:id',
  217. component: './Model/intro',
  218. },
  219. ],
  220. },
  221. {
  222. name: '镜像',
  223. path: 'mirror',
  224. routes: [
  225. {
  226. name: '镜像',
  227. path: '',
  228. component: './Mirror/List',
  229. },
  230. {
  231. name: '镜像详情',
  232. path: 'info/:id',
  233. component: './Mirror/Info',
  234. },
  235. {
  236. name: '创建镜像',
  237. path: 'create',
  238. component: './Mirror/Create',
  239. },
  240. ],
  241. },
  242. {
  243. name: '代码配置',
  244. path: 'codeConfig',
  245. routes: [
  246. {
  247. name: '代码配置',
  248. path: '',
  249. component: './CodeConfig/List',
  250. },
  251. ],
  252. },
  253. ],
  254. },
  255. {
  256. name: '模型部署',
  257. path: '/modelDeployment',
  258. routes: [
  259. {
  260. name: '模型部署',
  261. path: '',
  262. component: './ModelDeployment/List',
  263. },
  264. {
  265. name: '服务详情',
  266. path: 'serviceInfo/:id',
  267. component: './ModelDeployment/ServiceInfo',
  268. },
  269. {
  270. name: '服务版本详情',
  271. path: 'versionInfo/:id',
  272. component: './ModelDeployment/VersionInfo',
  273. },
  274. {
  275. name: '创建推理服务',
  276. path: 'createService',
  277. component: './ModelDeployment/CreateService',
  278. },
  279. {
  280. name: '新增服务版本',
  281. path: 'addVersion/:id',
  282. component: './ModelDeployment/CreateVersion',
  283. },
  284. ],
  285. },
  286. {
  287. name: '应用开发',
  288. path: '/appsDeployment',
  289. routes: [
  290. {
  291. name: '应用开发',
  292. path: '',
  293. key: 'appsDeployment',
  294. component: './Application',
  295. },
  296. ],
  297. },
  298. {
  299. name: '监控运维',
  300. path: '/see',
  301. routes: [
  302. {
  303. name: '监控运维',
  304. path: '',
  305. key: 'see',
  306. component: './missingPage.jsx',
  307. },
  308. ],
  309. },
  310. {
  311. name: '资源',
  312. path: '/readad',
  313. routes: [
  314. {
  315. name: '资源',
  316. path: '',
  317. key: 'readad',
  318. component: './missingPage.jsx',
  319. },
  320. ],
  321. },
  322. {
  323. name: '组件',
  324. path: '/compent',
  325. routes: [
  326. {
  327. name: '组件',
  328. path: '',
  329. key: 'compent',
  330. component: './missingPage.jsx',
  331. },
  332. ],
  333. },
  334. {
  335. name: 'monitor',
  336. path: '/monitor',
  337. routes: [
  338. {
  339. name: '任务日志',
  340. path: '/monitor/job-log/index/:id',
  341. component: './Monitor/JobLog',
  342. },
  343. ],
  344. },
  345. {
  346. name: 'tool',
  347. path: '/tool',
  348. routes: [
  349. {
  350. name: '导入表',
  351. path: '/tool/gen/import',
  352. component: './Tool/Gen/import',
  353. },
  354. {
  355. name: '编辑表',
  356. path: '/tool/gen/edit',
  357. component: './Tool/Gen/edit',
  358. },
  359. ],
  360. },
  361. {
  362. name: '系统管理',
  363. path: '/system',
  364. routes: [
  365. {
  366. path: '',
  367. redirect: '/system/user',
  368. },
  369. {
  370. name: '用户管理',
  371. path: 'user',
  372. component: './System/User',
  373. },
  374. {
  375. name: '角色管理',
  376. path: 'role',
  377. component: './System/Role',
  378. },
  379. {
  380. name: '定时任务',
  381. path: 'job',
  382. component: './Monitor/Job',
  383. },
  384. {
  385. name: '菜单管理',
  386. path: 'menu',
  387. component: './System/Menu',
  388. },
  389. {
  390. name: '部门管理',
  391. path: 'dept',
  392. component: './System/Dept',
  393. },
  394. {
  395. name: '岗位管理',
  396. path: 'post',
  397. component: './System/Post',
  398. },
  399. {
  400. name: '字典管理',
  401. path: 'dict',
  402. component: './System/Dict',
  403. },
  404. {
  405. name: '字典数据',
  406. path: 'dict-data/index/:id',
  407. component: './System/DictData',
  408. },
  409. {
  410. name: '分配用户',
  411. path: 'role-auth/user/:id',
  412. component: './System/Role/authUser',
  413. },
  414. {
  415. name: '日志',
  416. path: 'log',
  417. routes: [
  418. {
  419. path: '',
  420. redirect: '/system/log/operlog',
  421. },
  422. ],
  423. },
  424. ],
  425. },
  426. {
  427. name: 'docs',
  428. path: '/docs',
  429. routes: [
  430. {
  431. name: '使用指南',
  432. path: '',
  433. key: 'docs',
  434. component: './Docs/index',
  435. },
  436. ],
  437. },
  438. {
  439. path: '*',
  440. layout: false,
  441. component: './404',
  442. },
  443. ];