Detail.vue 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <template>
  2. <detail
  3. :on-manager="onManager"
  4. :data="data"
  5. :base-info="baseInfo"
  6. :extra-info="extraInfo" />
  7. </template>
  8. <script>
  9. import { getCopyWithContentTableColumn, getBrandTableColumn } from '@/utils/common/tableColumn'
  10. import WindowsMixin from '@/mixins/windows'
  11. export default {
  12. name: 'LoadbalancerbackendDetail',
  13. mixins: [WindowsMixin],
  14. props: {
  15. data: {
  16. type: Object,
  17. required: true,
  18. },
  19. onManager: {
  20. type: Function,
  21. required: true,
  22. },
  23. },
  24. data () {
  25. return {
  26. baseInfo: [
  27. getBrandTableColumn(),
  28. ],
  29. extraInfo: [
  30. {
  31. title: this.$t('network.text_38'),
  32. items: [
  33. getCopyWithContentTableColumn({
  34. field: 'loadbalancer',
  35. title: this.$t('network.text_137'),
  36. hideField: true,
  37. slotCallback: row => {
  38. if (!row.loadbalancer) return '-'
  39. return [
  40. <side-page-trigger permission='lb_loadbalancers_get' name='LbSidePage' id={row.loadbalancer_id} vm={this}>{ row.loadbalancer }</side-page-trigger>,
  41. ]
  42. },
  43. }),
  44. {
  45. field: 'address',
  46. title: this.$t('network.text_213'),
  47. },
  48. {
  49. field: 'port',
  50. title: this.$t('network.text_165'),
  51. },
  52. {
  53. field: 'weight',
  54. title: this.$t('network.text_166'),
  55. },
  56. {
  57. field: 'vpc',
  58. title: 'VPC',
  59. },
  60. {
  61. field: 'zone',
  62. title: this.$t('network.text_24'),
  63. },
  64. {
  65. field: 'ssl',
  66. title: this.$t('network.text_143'),
  67. },
  68. ],
  69. },
  70. ],
  71. }
  72. },
  73. }
  74. </script>