index.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <template>
  2. <div>
  3. <page-header
  4. :title="$t('compute.text_91')"
  5. :tabs="cloudEnvOptions"
  6. :current-tab.sync="cloudEnv"
  7. isShowResStatusTab
  8. :status-opts="statusOpts"
  9. :status-click-handle="statusClickHandle" />
  10. <page-body>
  11. <vm-instance-list
  12. ref="list"
  13. :id="listId"
  14. :cloud-env="cloudEnv"
  15. :cloudEnvOptions="cloudEnvOptions"
  16. :filterParams="filterParams"
  17. :tableOverviewIndexs="tableOverviewIndexs"
  18. statusResKey="server"
  19. @updateCloudEnvOptions="updateCloudEnvOptions"
  20. @resStatisticsChange="resStatisticsChange" />
  21. </page-body>
  22. </div>
  23. </template>
  24. <script>
  25. import { getCloudEnvOptions } from '@/utils/common/hypervisor'
  26. import ResStatisticsV2Mixin from '@/mixins/resStatisticsV2Mixin'
  27. import KeepAliveMixin from '@/mixins/keepAlive'
  28. import VmInstanceList from './components/List'
  29. export default {
  30. name: 'VMInstanceIndex',
  31. components: {
  32. VmInstanceList,
  33. },
  34. mixins: [ResStatisticsV2Mixin, KeepAliveMixin],
  35. data () {
  36. return {
  37. listId: 'VMInstanceList',
  38. cloudEnv: '',
  39. statusModule: 'server',
  40. }
  41. },
  42. computed: {
  43. cloudEnvOptions: () => {
  44. return getCloudEnvOptions('compute_engine_brands')
  45. },
  46. },
  47. }
  48. </script>