Detail.vue 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <template>
  2. <detail
  3. :showDesc="false"
  4. :showName="false"
  5. :hiddenKeys="['tenant', 'updated_at']"
  6. :onManager="onManager"
  7. :data="data"
  8. :base-info="baseInfo" />
  9. </template>
  10. <script>
  11. import { k8sStatusColumn } from '@K8S/utils/tableColumns'
  12. import WindowsMixin from '@/mixins/windows'
  13. export default {
  14. name: 'K8sReleaseDetail',
  15. mixins: [WindowsMixin],
  16. props: {
  17. data: {
  18. type: Object,
  19. required: true,
  20. },
  21. onManager: {
  22. type: Function,
  23. required: true,
  24. },
  25. },
  26. data () {
  27. return {
  28. baseInfo: [
  29. {
  30. field: 'name',
  31. title: this.$t('helm.text_16'),
  32. slots: {
  33. default: ({ row }) => {
  34. return [
  35. <div class='text-truncate'>
  36. <list-body-cell-wrap copy row={ this.data } onManager={ this.onManager } field='name' title={ row.name } />
  37. </div>,
  38. ]
  39. },
  40. },
  41. },
  42. {
  43. field: 'metadata',
  44. title: this.$t('helm.text_75'),
  45. formatter: ({ row }) => `${row.chart}/${row.chart_version || ''}`,
  46. },
  47. k8sStatusColumn({ statusModule: 'release' }),
  48. {
  49. field: 'cluster',
  50. title: this.$t('helm.text_31'),
  51. },
  52. {
  53. field: 'namespace',
  54. title: this.$t('helm.text_32'),
  55. },
  56. {
  57. field: 'version',
  58. title: this.$t('helm.text_76'),
  59. },
  60. ],
  61. }
  62. },
  63. }
  64. </script>