Monitor.vue 764 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <template>
  2. <base-monitor :data="data" :constants="monitorConstants" :resId="serverId" idKey="cluster_id" />
  3. </template>
  4. <script>
  5. import { NODE_MONITOR_MAP } from '@K8S/constants'
  6. import BaseMonitor from '@Compute/sections/monitor/BaseMonitor'
  7. export default {
  8. name: 'K8sClusterMonitor',
  9. components: { BaseMonitor },
  10. props: {
  11. data: { // listItemData
  12. type: Object,
  13. required: true,
  14. },
  15. },
  16. data () {
  17. return {
  18. }
  19. },
  20. computed: {
  21. hypervisor () {
  22. return this.data.hypervisor
  23. },
  24. monitorConstants () {
  25. return NODE_MONITOR_MAP.aliyun.map(item => {
  26. return {
  27. ...item,
  28. groupBy: ['node'],
  29. }
  30. })
  31. },
  32. serverId () {
  33. return this.data.id
  34. },
  35. },
  36. }
  37. </script>