Detail.vue 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <template>
  2. <detail
  3. :showDesc="false"
  4. :showName="false"
  5. :hiddenKeys="['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. k8sStatusColumn({ statusModule: 'release' }),
  43. {
  44. field: 'metadata',
  45. title: this.$t('helm.text_75'),
  46. formatter: ({ row }) => `${row.chart}/${row.chart_version || ''}`,
  47. },
  48. ],
  49. }
  50. },
  51. }
  52. </script>