index.js 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. import Layout from '@/layouts/RouterView'
  2. import i18n from '@/locales'
  3. import { isScopedPolicyMenuHidden } from '@/utils/scopedPolicy'
  4. import { hasSetupKey } from '@/utils/auth'
  5. const Llm = () => import(/* webpackChunkName: "k8s" */ /* webpackPrefetch: true */ '@Ai/views/llm')
  6. const AppLlm = () => import(/* webpackChunkName: "k8s" */ /* webpackPrefetch: true */ '@Ai/views/app-llm')
  7. const AppLlmSku = () => import(/* webpackChunkName: "k8s" */ /* webpackPrefetch: true */ '@Ai/views/app-llm-sku')
  8. const LlmSku = () => import(/* webpackChunkName: "k8s" */ /* webpackPrefetch: true */ '@Ai/views/llm-sku')
  9. const LlmSkuCreate = () => import(/* webpackChunkName: "k8s" */ /* webpackPrefetch: true */ '@Ai/views/llm-sku/create/index')
  10. const LlmInstantmodel = () => import(/* webpackChunkName: "k8s" */ /* webpackPrefetch: true */ '@Ai/views/llm-instantmodel')
  11. const LlmImage = () => import(/* webpackChunkName: "k8s" */ /* webpackPrefetch: true */ '@Ai/views/llm-image')
  12. const LlmInstantmodelImportCommunity = () => import(/* webpackChunkName: "k8s" */ /* webpackPrefetch: true */ '@Ai/views/llm-instantmodel/import-community')
  13. const LlmImageImportCommunity = () => import(/* webpackChunkName: "k8s" */ /* webpackPrefetch: true */ '@Ai/views/llm-image/import-community')
  14. const LlmCreate = () => import(/* webpackChunkName: "k8s" */ /* webpackPrefetch: true */ '@Ai/views/llm/create')
  15. export default {
  16. index: 61,
  17. meta: {
  18. label: i18n.t('aice.ai'),
  19. icon: 'menu-ai',
  20. },
  21. menus: [
  22. // 人工智能-应用
  23. {
  24. meta: {
  25. label: i18n.t('common.application'),
  26. },
  27. submenus: [
  28. {
  29. path: '/app-llm',
  30. meta: {
  31. label: i18n.t('aice.app_llm'),
  32. hidden: () => {
  33. if (isScopedPolicyMenuHidden('sub_hidden_menus.app_llm')) {
  34. return true
  35. }
  36. return !hasSetupKey(['pod'])
  37. },
  38. },
  39. component: Layout,
  40. children: [
  41. {
  42. name: 'AppLlmList',
  43. path: '',
  44. component: AppLlm,
  45. },
  46. {
  47. name: 'LlmCreate',
  48. path: 'create',
  49. component: LlmCreate,
  50. },
  51. ],
  52. },
  53. {
  54. path: '/app-llm-sku',
  55. meta: {
  56. label: i18n.t('aice.app_llm_sku'),
  57. hidden: () => {
  58. if (isScopedPolicyMenuHidden('sub_hidden_menus.app_llm_sku')) {
  59. return true
  60. }
  61. return !hasSetupKey(['pod'])
  62. },
  63. },
  64. component: Layout,
  65. children: [
  66. {
  67. name: 'AppLlmSkuList',
  68. path: '',
  69. component: AppLlmSku,
  70. },
  71. {
  72. name: 'LlmSkuCreate',
  73. path: 'create',
  74. component: LlmSkuCreate,
  75. },
  76. ],
  77. },
  78. ],
  79. },
  80. // 人工智能-推理
  81. {
  82. meta: {
  83. label: i18n.t('common.inference'),
  84. },
  85. submenus: [
  86. {
  87. path: '/llm',
  88. meta: {
  89. label: i18n.t('aice.llm'),
  90. hidden: () => {
  91. if (isScopedPolicyMenuHidden('sub_hidden_menus.llm')) {
  92. return true
  93. }
  94. return !hasSetupKey(['pod'])
  95. },
  96. },
  97. component: Layout,
  98. children: [
  99. {
  100. name: 'LlmList',
  101. path: '',
  102. component: Llm,
  103. },
  104. {
  105. name: 'LlmCreate',
  106. path: 'create',
  107. component: LlmCreate,
  108. },
  109. ],
  110. },
  111. {
  112. path: '/llm-sku',
  113. meta: {
  114. label: i18n.t('aice.llm_sku'),
  115. hidden: () => {
  116. if (isScopedPolicyMenuHidden('sub_hidden_menus.llm_sku')) {
  117. return true
  118. }
  119. return !hasSetupKey(['pod'])
  120. },
  121. },
  122. component: Layout,
  123. children: [
  124. {
  125. name: 'LlmSkuList',
  126. path: '',
  127. component: LlmSku,
  128. },
  129. {
  130. name: 'LlmSkuCreate',
  131. path: 'create',
  132. component: LlmSkuCreate,
  133. },
  134. ],
  135. },
  136. {
  137. path: '/llm-instantmodel',
  138. meta: {
  139. label: i18n.t('aice.llm_instantapp'),
  140. hidden: () => {
  141. if (isScopedPolicyMenuHidden('sub_hidden_menus.llm_instantmodel')) {
  142. return true
  143. }
  144. return !hasSetupKey(['pod'])
  145. },
  146. },
  147. component: Layout,
  148. children: [
  149. {
  150. name: 'LlmInstantmodelList',
  151. path: '',
  152. component: LlmInstantmodel,
  153. },
  154. {
  155. name: 'LlmInstantmodelImportCommunity',
  156. path: 'import-community',
  157. component: LlmInstantmodelImportCommunity,
  158. },
  159. ],
  160. },
  161. ],
  162. },
  163. // 人工智能-镜像
  164. {
  165. meta: {
  166. label: i18n.t('common.image'),
  167. },
  168. submenus: [
  169. {
  170. path: '/llm-image',
  171. meta: {
  172. label: i18n.t('aice.llm_image'),
  173. hidden: () => {
  174. if (isScopedPolicyMenuHidden('sub_hidden_menus.llm_image')) {
  175. return true
  176. }
  177. return !hasSetupKey(['pod'])
  178. },
  179. },
  180. component: Layout,
  181. children: [
  182. {
  183. name: 'LlmImageList',
  184. path: '',
  185. component: LlmImage,
  186. },
  187. {
  188. name: 'LlmImageImportCommunity',
  189. path: 'import-community',
  190. component: LlmImageImportCommunity,
  191. },
  192. ],
  193. },
  194. ],
  195. },
  196. ],
  197. }