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