index.vue 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <template>
  2. <vxe-grid :data="data.conditions || []" :columns="columns" resizable />
  3. </template>
  4. <script>
  5. export default {
  6. name: 'K8SConditionSidepage',
  7. props: {
  8. data: {
  9. type: Object,
  10. required: true,
  11. },
  12. },
  13. data () {
  14. return {
  15. columns: [
  16. {
  17. field: 'type',
  18. title: this.$t('k8s.text_34'),
  19. },
  20. {
  21. field: 'status',
  22. title: this.$t('k8s.text_35'),
  23. },
  24. {
  25. field: 'lastProbeTime',
  26. title: this.$t('k8s.text_36'),
  27. formatter: ({ row }) => row.lastProbeTime ? this.$moment(row.lastProbeTime).format(this.$t('k8s.text_37')) : '-',
  28. },
  29. {
  30. field: 'lastTransitionTime',
  31. title: this.$t('k8s.text_38'),
  32. formatter: ({ row }) => row.lastTransitionTime ? this.$moment(row.lastTransitionTime).format(this.$t('k8s.text_37')) : '-',
  33. },
  34. {
  35. field: 'reason',
  36. title: this.$t('k8s.text_39'),
  37. },
  38. {
  39. field: 'message',
  40. title: this.$t('k8s.text_40'),
  41. },
  42. ],
  43. }
  44. },
  45. }
  46. </script>