index.js 5.4 KB

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