diff --git a/ui/src/components/view/InfoCard.vue b/ui/src/components/view/InfoCard.vue index 794f4e6af59..71741662135 100644 --- a/ui/src/components/view/InfoCard.vue +++ b/ui/src/components/view/InfoCard.vue @@ -32,7 +32,7 @@
{{ $t(resource.name.toLowerCase()) }}

- {{ resource.displayname || resource.displaytext || resource.name || resource.hostname || resource.username || resource.ipaddress || resource.virtualmachinename || resource.templatetype }} + {{ resource.displayname || resource.displaytext || resource.name || resource.username || resource.ipaddress || resource.virtualmachinename || resource.templatetype }}

@@ -121,12 +121,12 @@ {{ resource.ostypename }} -
+
{{ $t('label.cpu') }}
- {{ resource.cpunumber }} CPU x {{ parseFloat(resource.cpuspeed / 1000.0).toFixed(2) }} Ghz - {{ resource.cputotal }} + {{ resource.cputotal }} + {{ resource.cpunumber }} CPU x {{ parseFloat(resource.cpuspeed / 1000.0).toFixed(2) }} Ghz
@@ -149,7 +149,7 @@
-
+
{{ $t('label.memory') }}
{{ resource.memory + ' ' + $t('label.mb.memory') }} @@ -280,6 +280,19 @@
+
+
{{ $t('label.networks') }}
+
+
+
+ {{ network.name }} +
+
+
+
{{ $t('label.ip') }}
diff --git a/ui/src/views/compute/DeployVM.vue b/ui/src/views/compute/DeployVM.vue index e8dc32cd232..3bcffba7726 100644 --- a/ui/src/views/compute/DeployVM.vue +++ b/ui/src/views/compute/DeployVM.vue @@ -570,19 +570,7 @@ - - -
- - {{ diskSize }} -
-
-
- - {{ network.name }} -
-
-
+
@@ -983,6 +971,32 @@ export default { this.vm.zonename = this.zone.name } + const pod = _.find(this.options.pods, (option) => option.id === instanceConfig.podid) + if (pod) { + this.vm.podid = pod.id + this.vm.podname = pod.name + } + + const cluster = _.find(this.options.clusters, (option) => option.id === instanceConfig.clusterid) + if (cluster) { + this.vm.clusterid = cluster.id + this.vm.clustername = cluster.name + } + + const host = _.find(this.options.hosts, (option) => option.id === instanceConfig.hostid) + if (host) { + this.vm.hostid = host.id + this.vm.hostname = host.name + } + + if (this.diskSize) { + this.vm.disksizetotalgb = this.diskSize + } + + if (this.networks) { + this.vm.networks = this.networks + } + if (this.template) { this.vm.templateid = this.template.id this.vm.templatename = this.template.displaytext @@ -1003,6 +1017,15 @@ export default { if (this.serviceOffering) { this.vm.serviceofferingid = this.serviceOffering.id this.vm.serviceofferingname = this.serviceOffering.displaytext + if (this.serviceOffering.cpunumber) { + this.vm.cpunumber = this.serviceOffering.cpunumber + } + if (this.serviceOffering.cpuspeed) { + this.vm.cpuspeed = this.serviceOffering.cpuspeed + } + if (this.serviceOffering.memory) { + this.vm.memory = this.serviceOffering.memory + } } if (this.diskOffering) { @@ -1216,6 +1239,11 @@ export default { isoid: value, templateid: null }) + } else if (['cpuspeed', 'cpunumber', 'memory'].includes(name)) { + this.vm[name] = value + this.form.setFieldsValue({ + [name]: value + }) } else { this.form.setFieldsValue({ [name]: value @@ -1419,8 +1447,10 @@ export default { } // step 7: select ssh key pair deployVmData.keypair = values.keypair - deployVmData.name = values.name - deployVmData.displayname = values.name + if (values.name) { + deployVmData.name = values.name + deployVmData.displayname = values.name + } // step 8: enter setup if ('properties' in values) { const keys = Object.keys(values.properties)