columns.js 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. import {
  2. getNameDescriptionTableColumn,
  3. getStatusTableColumn,
  4. getTagTableColumn,
  5. getProjectTableColumn,
  6. getTimeTableColumn,
  7. } from '@/utils/common/tableColumn'
  8. import {
  9. getLlmIpColumn,
  10. getLlmSkuColumn,
  11. getLlmImageColumn,
  12. getLlmTypeTableColumn,
  13. getCpuTableColumn,
  14. getMemoryTableColumn,
  15. getDiskTableColumn,
  16. getBandwidthTableColumn,
  17. getNetworkTypeTableColumn,
  18. getNetworkTableColumn,
  19. } from '../utils/columns'
  20. export default {
  21. computed: {
  22. isApplyType () {
  23. return this.$route.path.includes('app-llm')
  24. },
  25. },
  26. created () {
  27. this.columns = [
  28. getNameDescriptionTableColumn({
  29. onManager: this.onManager,
  30. hideField: true,
  31. slotCallback: row => {
  32. return (
  33. <side-page-trigger onTrigger={() => this.handleOpenSidepage(row)}>{row.name}</side-page-trigger>
  34. )
  35. },
  36. }),
  37. getStatusTableColumn({ statusModule: 'server' }),
  38. getStatusTableColumn({ field: 'llm_status', statusModule: 'container', title: this.$t('aice.container_status') }),
  39. getLlmIpColumn(),
  40. getLlmSkuColumn({ vm: this, isApplyType: this.isApplyType }),
  41. getLlmImageColumn({ vm: this }),
  42. getLlmTypeTableColumn(this.isApplyType),
  43. getTagTableColumn({
  44. onManager: this.onManager,
  45. resource: 'llms',
  46. columns: () => this.columns,
  47. tipName: this.$t('aice.llm'),
  48. }),
  49. getCpuTableColumn(),
  50. getMemoryTableColumn(),
  51. getDiskTableColumn(),
  52. getBandwidthTableColumn(),
  53. getNetworkTypeTableColumn(),
  54. getNetworkTableColumn(),
  55. getProjectTableColumn(),
  56. getTimeTableColumn(),
  57. ]
  58. },
  59. }