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 14 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
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586
  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: process.env.NO_SSO ? './User/Login/login' : './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. name: '实验可视化对比',
  148. path: 'compare-visual',
  149. component: './Experiment/Aim/index',
  150. },
  151. {
  152. name: '可视化',
  153. path: 'visual',
  154. component: './Experiment/Tensorboard/index',
  155. },
  156. ],
  157. },
  158. {
  159. name: '自动机器学习',
  160. path: 'automl',
  161. routes: [
  162. {
  163. name: '自动机器学习',
  164. path: '',
  165. component: './AutoML/List/index',
  166. },
  167. {
  168. name: '实验详情',
  169. path: 'info/:id',
  170. component: './AutoML/Info/index',
  171. },
  172. {
  173. name: '创建实验',
  174. path: 'create',
  175. component: './AutoML/Create/index',
  176. },
  177. {
  178. name: '编辑实验',
  179. path: 'edit/:id',
  180. component: './AutoML/Create/index',
  181. },
  182. {
  183. name: '复制实验',
  184. path: 'copy/:id',
  185. component: './AutoML/Create/index',
  186. },
  187. {
  188. name: '实验实例详情',
  189. path: 'instance/:experimentId/:id',
  190. component: './AutoML/Instance/index',
  191. },
  192. ],
  193. },
  194. {
  195. name: '超参数自动寻优',
  196. path: 'hyperparameter',
  197. routes: [
  198. {
  199. name: '超参数寻优',
  200. path: '',
  201. component: './HyperParameter/List/index',
  202. },
  203. {
  204. name: '实验详情',
  205. path: 'info/:id',
  206. component: './HyperParameter/Info/index',
  207. },
  208. {
  209. name: '创建实验',
  210. path: 'create',
  211. component: './HyperParameter/Create/index',
  212. },
  213. {
  214. name: '编辑实验',
  215. path: 'edit/:id',
  216. component: './HyperParameter/Create/index',
  217. },
  218. {
  219. name: '复制实验',
  220. path: 'copy/:id',
  221. component: './HyperParameter/Create/index',
  222. },
  223. {
  224. name: '实验实例详情',
  225. path: 'instance/:experimentId/:id',
  226. component: './HyperParameter/Instance/index',
  227. },
  228. ],
  229. },
  230. {
  231. name: '主动学习',
  232. path: 'active-learn',
  233. routes: [
  234. {
  235. name: '超参数寻优',
  236. path: '',
  237. component: './ActiveLearn/List/index',
  238. },
  239. {
  240. name: '实验详情',
  241. path: 'info/:id',
  242. component: './ActiveLearn/Info/index',
  243. },
  244. {
  245. name: '创建实验',
  246. path: 'create',
  247. component: './ActiveLearn/Create/index',
  248. },
  249. {
  250. name: '编辑实验',
  251. path: 'edit/:id',
  252. component: './ActiveLearn/Create/index',
  253. },
  254. {
  255. name: '复制实验',
  256. path: 'copy/:id',
  257. component: './ActiveLearn/Create/index',
  258. },
  259. {
  260. name: '实验实例详情',
  261. path: 'instance/:experimentId/:id',
  262. component: './ActiveLearn/Instance/index',
  263. },
  264. ],
  265. },
  266. ],
  267. },
  268. {
  269. name: 'AI资产',
  270. path: '/dataset',
  271. routes: [
  272. {
  273. path: '',
  274. redirect: '/dataset/dataset',
  275. },
  276. {
  277. name: '数据集',
  278. path: 'dataset',
  279. routes: [
  280. {
  281. name: '数据集',
  282. path: '',
  283. component: './Dataset/index',
  284. },
  285. {
  286. name: '数据集简介',
  287. path: 'info/:id',
  288. component: './Dataset/intro',
  289. },
  290. ],
  291. },
  292. {
  293. name: '模型',
  294. path: 'model',
  295. routes: [
  296. {
  297. name: '模型',
  298. path: '',
  299. component: './Model/index',
  300. },
  301. {
  302. name: '模型简介',
  303. path: 'info/:id',
  304. component: './Model/intro',
  305. },
  306. ],
  307. },
  308. {
  309. name: '镜像',
  310. path: 'mirror',
  311. routes: [
  312. {
  313. name: '镜像',
  314. path: '',
  315. component: './Mirror/List',
  316. },
  317. {
  318. name: '镜像详情',
  319. path: 'info/:id',
  320. routes: [
  321. {
  322. name: '镜像详情',
  323. path: '',
  324. component: './Mirror/Info',
  325. },
  326. {
  327. name: '新增镜像版本',
  328. path: 'add-version',
  329. component: './Mirror/Create',
  330. },
  331. ],
  332. },
  333. {
  334. name: '创建镜像',
  335. path: 'create',
  336. component: './Mirror/Create',
  337. },
  338. ],
  339. },
  340. {
  341. name: '代码配置',
  342. path: 'codeConfig',
  343. routes: [
  344. {
  345. name: '代码配置',
  346. path: '',
  347. component: './CodeConfig/List',
  348. },
  349. ],
  350. },
  351. {
  352. name: '模型部署',
  353. path: 'modelDeployment',
  354. routes: [
  355. {
  356. name: '模型部署',
  357. path: '',
  358. component: './ModelDeployment/List',
  359. },
  360. {
  361. name: '创建推理服务',
  362. path: 'createService',
  363. component: './ModelDeployment/CreateService',
  364. },
  365. {
  366. name: '编辑推理服务',
  367. path: 'editService/:serviceId',
  368. component: './ModelDeployment/CreateService',
  369. },
  370. {
  371. name: '服务详情',
  372. path: 'serviceInfo/:serviceId',
  373. routes: [
  374. {
  375. name: '服务详情',
  376. path: '',
  377. component: './ModelDeployment/ServiceInfo',
  378. },
  379. {
  380. name: '新增服务版本',
  381. path: 'createVersion',
  382. component: './ModelDeployment/CreateVersion',
  383. },
  384. {
  385. name: '更新服务版本',
  386. path: 'updateVersion',
  387. component: './ModelDeployment/CreateVersion',
  388. },
  389. {
  390. name: '重启服务版本',
  391. path: 'restartVersion',
  392. component: './ModelDeployment/CreateVersion',
  393. },
  394. {
  395. name: '服务版本详情',
  396. path: 'versionInfo/:id',
  397. component: './ModelDeployment/VersionInfo',
  398. },
  399. ],
  400. },
  401. ],
  402. },
  403. ],
  404. },
  405. {
  406. name: '应用开发',
  407. path: '/appsDeployment',
  408. routes: [
  409. {
  410. name: '应用开发',
  411. path: '',
  412. key: 'appsDeployment',
  413. component: './Application',
  414. },
  415. ],
  416. },
  417. {
  418. name: '监控运维',
  419. path: '/see',
  420. routes: [
  421. {
  422. name: '监控运维',
  423. path: '',
  424. key: 'see',
  425. component: './missingPage.jsx',
  426. },
  427. ],
  428. },
  429. {
  430. name: '资源',
  431. path: '/readad',
  432. routes: [
  433. {
  434. name: '资源',
  435. path: '',
  436. key: 'readad',
  437. component: './missingPage.jsx',
  438. },
  439. ],
  440. },
  441. {
  442. name: '组件',
  443. path: '/compent',
  444. routes: [
  445. {
  446. name: '组件',
  447. path: '',
  448. key: 'compent',
  449. component: './missingPage.jsx',
  450. },
  451. ],
  452. },
  453. {
  454. name: 'monitor',
  455. path: '/monitor',
  456. routes: [
  457. {
  458. name: '任务日志',
  459. path: '/monitor/job-log/index/:id',
  460. component: './Monitor/JobLog',
  461. },
  462. ],
  463. },
  464. {
  465. name: 'tool',
  466. path: '/tool',
  467. routes: [
  468. {
  469. name: '导入表',
  470. path: '/tool/gen/import',
  471. component: './Tool/Gen/import',
  472. },
  473. {
  474. name: '编辑表',
  475. path: '/tool/gen/edit',
  476. component: './Tool/Gen/edit',
  477. },
  478. ],
  479. },
  480. {
  481. name: '系统管理',
  482. path: '/system',
  483. routes: [
  484. {
  485. path: '',
  486. redirect: '/system/user',
  487. },
  488. {
  489. name: '用户管理',
  490. path: 'user',
  491. component: './System/User',
  492. },
  493. {
  494. name: '角色管理',
  495. path: 'role',
  496. component: './System/Role',
  497. },
  498. {
  499. name: '定时任务',
  500. path: 'job',
  501. component: './Monitor/Job',
  502. },
  503. {
  504. name: '菜单管理',
  505. path: 'menu',
  506. component: './System/Menu',
  507. },
  508. {
  509. name: '部门管理',
  510. path: 'dept',
  511. component: './System/Dept',
  512. },
  513. {
  514. name: '岗位管理',
  515. path: 'post',
  516. component: './System/Post',
  517. },
  518. {
  519. name: '字典管理',
  520. path: 'dict',
  521. component: './System/Dict',
  522. },
  523. {
  524. name: '字典数据',
  525. path: 'dict-data/index/:id',
  526. component: './System/DictData',
  527. },
  528. {
  529. name: '分配用户',
  530. path: 'role-auth/user/:id',
  531. component: './System/Role/authUser',
  532. },
  533. {
  534. name: '日志',
  535. path: 'log',
  536. routes: [
  537. {
  538. path: '',
  539. redirect: '/system/log/operlog',
  540. },
  541. ],
  542. },
  543. ],
  544. },
  545. {
  546. name: 'docs',
  547. path: '/docs',
  548. routes: [
  549. {
  550. name: '使用指南',
  551. path: '',
  552. key: 'docs',
  553. component: './Docs/index',
  554. },
  555. ],
  556. },
  557. {
  558. name: '算力积分',
  559. path: '/points',
  560. routes: [
  561. {
  562. name: '算力积分',
  563. path: '',
  564. key: 'points',
  565. component: './Points/index',
  566. },
  567. ],
  568. },
  569. {
  570. name: '知识图谱',
  571. path: '/knowledge',
  572. routes: [
  573. {
  574. name: '知识图谱',
  575. path: '',
  576. key: 'knowledge',
  577. component: './Knowledge/index',
  578. },
  579. ],
  580. },
  581. {
  582. path: '*',
  583. layout: false,
  584. component: './404',
  585. },
  586. ];