index.vue 848 B

123456789101112131415161718192021222324252627282930313233
  1. <template>
  2. <div>
  3. <page-header :title="$t('compute.text_109')" :tabs="cloudEnvOptions" :current-tab.sync="cloudEnv" />
  4. <page-body>
  5. <sku-list :id="listId" :getParams="getParams" :cloud-env="cloudEnv" />
  6. </page-body>
  7. </div>
  8. </template>
  9. <script>
  10. import _ from 'lodash'
  11. import { getCloudEnvOptions } from '@/utils/common/hypervisor'
  12. import SkuList from './components/List'
  13. export default {
  14. name: 'SKUIndex',
  15. components: {
  16. SkuList,
  17. },
  18. data () {
  19. const cloudEnvOptions = getCloudEnvOptions('compute_engine_brands').filter(val => ['onpremise', 'public', 'private'].includes(val.key))
  20. return {
  21. listId: 'SkuList',
  22. getParams: {
  23. details: true,
  24. 'filter.0': 'disk_type.notin(volume)',
  25. },
  26. cloudEnvOptions,
  27. cloudEnv: _.get(cloudEnvOptions, '[0].key'),
  28. }
  29. },
  30. }
  31. </script>