FlexIp.vue 1021 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <template>
  2. <page-list
  3. :list="list"
  4. :columns="columns" />
  5. </template>
  6. <script>
  7. export default {
  8. name: 'FlexIp',
  9. props: {
  10. data: {
  11. type: Object,
  12. required: true,
  13. },
  14. },
  15. data () {
  16. return {
  17. list: this.$list.createList(this, {
  18. id: 'FlexIpForNetworkSidePage',
  19. resource: 'networkinterfacenetworks',
  20. getParams: {
  21. details: true,
  22. with_meta: true,
  23. network_id: this.data.id,
  24. system: true,
  25. },
  26. }),
  27. columns: [
  28. {
  29. field: 'ip_addr',
  30. title: 'IP',
  31. },
  32. {
  33. field: 'networkinterface_id',
  34. title: this.$t('network.text_656'),
  35. },
  36. {
  37. field: 'primary',
  38. title: this.$t('network.text_237'),
  39. formatter: ({ cellValue }) => {
  40. return cellValue ? this.$t('network.text_238') : this.$t('network.text_239')
  41. },
  42. },
  43. ],
  44. }
  45. },
  46. created () {
  47. this.list.fetchData()
  48. },
  49. }
  50. </script>