diff --git a/ui/src/locales/en.json b/ui/src/locales/en.json
index 5530fbd4f80..fa54ea1c4c4 100644
--- a/ui/src/locales/en.json
+++ b/ui/src/locales/en.json
@@ -1466,6 +1466,7 @@
"label.no.grouping": "(no grouping)",
"label.no.isos": "No available ISOs",
"label.no.items": "No Available Items",
+"label.no.matching.offering": "No matching offering found",
"label.no.security.groups": "No Available Security Groups",
"label.noderootdisksize": "Node root disk size (in GB)",
"label.nodiskcache": "No disk cache",
diff --git a/ui/src/views/compute/DeployVM.vue b/ui/src/views/compute/DeployVM.vue
index a4b42bfaa60..6ad55aab91d 100644
--- a/ui/src/views/compute/DeployVM.vue
+++ b/ui/src/views/compute/DeployVM.vue
@@ -226,6 +226,21 @@
+
+
+
+
+
+
+
@@ -607,6 +622,7 @@ import ComputeOfferingSelection from '@views/compute/wizard/ComputeOfferingSelec
import ComputeSelection from '@views/compute/wizard/ComputeSelection'
import DiskOfferingSelection from '@views/compute/wizard/DiskOfferingSelection'
import DiskSizeSelection from '@views/compute/wizard/DiskSizeSelection'
+import MultiDiskSelection from '@views/compute/wizard/MultiDiskSelection'
import TemplateIsoSelection from '@views/compute/wizard/TemplateIsoSelection'
import AffinityGroupSelection from '@views/compute/wizard/AffinityGroupSelection'
import NetworkSelection from '@views/compute/wizard/NetworkSelection'
@@ -623,6 +639,7 @@ export default {
AffinityGroupSelection,
TemplateIsoSelection,
DiskSizeSelection,
+ MultiDiskSelection,
DiskOfferingSelection,
InfoCard,
ComputeOfferingSelection,
@@ -1040,7 +1057,11 @@ export default {
}
}
- if (this.diskOffering) {
+ if (!this.template.deployasis && this.template.childtemplates && this.template.childtemplates.length > 0) {
+ this.vm.diskofferingid = ''
+ this.vm.diskofferingname = ''
+ this.vm.diskofferingsize = ''
+ } else if (this.diskOffering) {
this.vm.diskofferingid = this.diskOffering.id
this.vm.diskofferingname = this.diskOffering.displaytext
this.vm.diskofferingsize = this.diskOffering.disksize
@@ -1072,6 +1093,7 @@ export default {
})
this.form.getFieldDecorator('computeofferingid', { initialValue: undefined, preserve: true })
this.form.getFieldDecorator('diskofferingid', { initialValue: undefined, preserve: true })
+ this.form.getFieldDecorator('multidiskoffering', { initialValue: undefined, preserve: true })
this.form.getFieldDecorator('affinitygroupids', { initialValue: [], preserve: true })
this.form.getFieldDecorator('networkids', { initialValue: [], preserve: true })
this.form.getFieldDecorator('keypair', { initialValue: undefined, preserve: true })
@@ -1286,6 +1308,11 @@ export default {
diskofferingid: id
})
},
+ updateMultiDiskOffering (value) {
+ this.form.setFieldsValue({
+ multidiskoffering: value
+ })
+ },
updateAffinityGroups (ids) {
this.form.setFieldsValue({
affinitygroupids: ids
@@ -1408,9 +1435,22 @@ export default {
deployVmData['details[0].configurationId'] = this.selectedTemplateConfiguration.id
}
// step 4: select disk offering
- deployVmData.diskofferingid = values.diskofferingid
- if (values.size) {
- deployVmData.size = values.size
+ if (!this.template.deployasis && this.template.childtemplates && this.template.childtemplates.length > 0) {
+ if (values.multidiskoffering) {
+ let i = 0
+ Object.entries(values.multidiskoffering).forEach(([disk, offering]) => {
+ const diskKey = `datadiskofferinglist[${i}].datadisktemplateid`
+ const offeringKey = `datadiskofferinglist[${i}].diskofferingid`
+ deployVmData[diskKey] = disk
+ deployVmData[offeringKey] = offering
+ i++
+ })
+ }
+ } else {
+ deployVmData.diskofferingid = values.diskofferingid
+ if (values.size) {
+ deployVmData.size = values.size
+ }
}
// step 5: select an affinity group
deployVmData.affinitygroupids = (values.affinitygroupids || []).join(',')
diff --git a/ui/src/views/compute/wizard/DiskOfferingSelection.vue b/ui/src/views/compute/wizard/DiskOfferingSelection.vue
index 45783634ea8..aff96a28737 100644
--- a/ui/src/views/compute/wizard/DiskOfferingSelection.vue
+++ b/ui/src/views/compute/wizard/DiskOfferingSelection.vue
@@ -133,6 +133,9 @@ export default {
},
created () {
this.initDataItem()
+ if (this.items) {
+ this.dataItems = this.dataItems.concat(this.items)
+ }
},
computed: {
tableSource () {
diff --git a/ui/src/views/compute/wizard/MultiDiskSelection.vue b/ui/src/views/compute/wizard/MultiDiskSelection.vue
new file mode 100644
index 00000000000..998fdbe7d3b
--- /dev/null
+++ b/ui/src/views/compute/wizard/MultiDiskSelection.vue
@@ -0,0 +1,170 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+
+
+
+
+
+
+
+ {{ offering.displaytext }}
+
+
+
+ {{ $t('label.no.matching.offering') }}
+
+
+
+
+
+
+
+
+