diff --git a/ui/src/config/section/compute.js b/ui/src/config/section/compute.js index 5ebcde5602d..ba7b3d75eb8 100644 --- a/ui/src/config/section/compute.js +++ b/ui/src/config/section/compute.js @@ -100,7 +100,7 @@ export default { label: 'label.vm.add', docHelp: 'adminguide/virtual_machines.html#creating-vms', listView: true, - show: () => { isZoneCreated() }, + show: isZoneCreated, component: () => import('@/views/compute/DeployVM.vue') }, { @@ -569,7 +569,7 @@ export default { docHelp: 'plugins/cloudstack-kubernetes-service.html#creating-a-new-kubernetes-cluster', listView: true, popup: true, - show: () => { isZoneCreated() }, + show: isZoneCreated, component: shallowRef(defineAsyncComponent(() => import('@/views/compute/CreateKubernetesCluster.vue'))) }, { @@ -698,7 +698,7 @@ export default { icon: 'plus-outlined', label: 'label.new.autoscale.vmgroup', listView: true, - show: () => { isZoneCreated() }, + show: isZoneCreated, component: () => import('@/views/compute/CreateAutoScaleVmGroup.vue') }, { @@ -789,7 +789,7 @@ export default { icon: 'plus-outlined', label: 'label.new.instance.group', listView: true, - show: () => { isZoneCreated() }, + show: isZoneCreated, args: ['name'] }, { diff --git a/ui/src/config/section/image.js b/ui/src/config/section/image.js index 2b5153c5865..49967bb80ee 100644 --- a/ui/src/config/section/image.js +++ b/ui/src/config/section/image.js @@ -111,7 +111,7 @@ export default { docHelp: 'adminguide/templates.html#uploading-templates-from-a-remote-http-server', listView: true, popup: true, - show: () => { isZoneCreated() }, + show: isZoneCreated, component: shallowRef(defineAsyncComponent(() => import('@/views/image/RegisterOrUploadTemplate.vue'))) }, { @@ -272,7 +272,7 @@ export default { docHelp: 'adminguide/templates.html#id10', listView: true, popup: true, - show: () => { isZoneCreated() }, + show: isZoneCreated, component: shallowRef(defineAsyncComponent(() => import('@/views/image/RegisterOrUploadIso.vue'))) }, { @@ -392,7 +392,7 @@ export default { label: 'label.kubernetes.version.add', listView: true, popup: true, - show: () => { isZoneCreated() }, + show: isZoneCreated, component: shallowRef(defineAsyncComponent(() => import('@/views/image/AddKubernetesSupportedVersion.vue'))) }, { diff --git a/ui/src/config/section/network.js b/ui/src/config/section/network.js index f0415a783a5..6691afa247d 100644 --- a/ui/src/config/section/network.js +++ b/ui/src/config/section/network.js @@ -246,7 +246,7 @@ export default { icon: 'plus-outlined', label: 'label.add.vpc', docHelp: 'adminguide/networking_and_traffic.html#adding-a-virtual-private-cloud', - show: () => { isZoneCreated() }, + show: isZoneCreated, listView: true, popup: true, component: shallowRef(defineAsyncComponent(() => import('@/views/network/CreateVpc.vue'))) @@ -396,7 +396,7 @@ export default { label: 'label.vnf.appliance.add', docHelp: 'adminguide/networking/vnf_templates_appliances.html#deploying-vnf-appliances', listView: true, - show: () => { isZoneCreated() }, + show: isZoneCreated, component: () => import('@/views/compute/DeployVnfAppliance.vue') }, { @@ -944,7 +944,7 @@ export default { label: 'label.add.vpn.gateway', docHelp: 'adminguide/networking_and_traffic.html#creating-a-vpn-gateway-for-the-vpc', listView: true, - show: () => { isZoneCreated() }, + show: isZoneCreated, args: ['vpcid'] }, { @@ -1120,7 +1120,7 @@ export default { icon: 'plus-outlined', label: 'label.add.vpn.user', listView: true, - show: () => { isZoneCreated() }, + show: isZoneCreated, args: (record, store) => { if (store.userInfo.roletype === 'User') { return ['username', 'password'] @@ -1200,7 +1200,7 @@ export default { docHelp: 'adminguide/networking_and_traffic.html#creating-and-updating-a-vpn-customer-gateway', listView: true, popup: true, - show: () => { isZoneCreated() }, + show: isZoneCreated, component: shallowRef(defineAsyncComponent(() => import('@/views/network/CreateVpnCustomerGateway.vue'))) }, { @@ -1390,7 +1390,7 @@ export default { component: shallowRef(defineAsyncComponent(() => import('@/views/network/GuestVlanNetworksTab.vue'))), show: (record) => { return (record.allocationstate === 'Allocated') } }], - show: () => { isZoneCreated() } + show: isZoneCreated } ] } diff --git a/ui/src/config/section/storage.js b/ui/src/config/section/storage.js index 95894b33429..7e56d5c6eee 100644 --- a/ui/src/config/section/storage.js +++ b/ui/src/config/section/storage.js @@ -104,7 +104,7 @@ export default { icon: 'plus-outlined', docHelp: 'adminguide/storage.html#creating-a-new-volume', label: 'label.action.create.volume', - show: () => { isZoneCreated() }, + show: isZoneCreated, listView: true, popup: true, component: shallowRef(defineAsyncComponent(() => import('@/views/storage/CreateVolume.vue'))) @@ -124,7 +124,7 @@ export default { icon: 'link-outlined', docHelp: 'adminguide/storage.html#uploading-an-existing-volume-to-a-virtual-machine', label: 'label.upload.volume.from.url', - show: () => { isZoneCreated() }, + show: isZoneCreated, listView: true, popup: true, component: shallowRef(defineAsyncComponent(() => import('@/views/storage/UploadVolume.vue')))