4545 </div >
4646 </template >
4747 </a-step >
48- <a-step :title =" $t('label.select.deployment.infrastructure')" status =" process" >
49- <template #description >
50- <div style =" margin-top : 15px " >
51- <a-form-item
52- v-if =" !isNormalAndDomainUser"
53- :label =" $t('label.podid')"
54- name =" podid"
55- ref =" podid" >
56- <a-select
57- v-model:value =" form.podid"
58- showSearch
59- optionFilterProp =" label"
60- :filterOption =" filterOption"
61- :options =" podSelectOptions"
62- :loading =" loading.pods"
63- @change =" onSelectPodId"
64- ></a-select >
65- </a-form-item >
66- <a-form-item
67- v-if =" !isNormalAndDomainUser"
68- :label =" $t('label.clusterid')"
69- name =" clusterid"
70- ref =" clusterid" >
71- <a-select
72- v-model:value =" form.clusterid"
73- showSearch
74- optionFilterProp =" label"
75- :filterOption =" filterOption"
76- :options =" clusterSelectOptions"
77- :loading =" loading.clusters"
78- @change =" onSelectClusterId"
79- ></a-select >
80- </a-form-item >
81- <a-form-item
82- v-if =" !isNormalAndDomainUser"
83- :label =" $t('label.hostid')"
84- name =" hostid"
85- ref =" hostid" >
86- <a-select
87- v-model:value =" form.hostid"
88- showSearch
89- optionFilterProp =" label"
90- :filterOption =" filterOption"
91- :options =" hostSelectOptions"
92- :loading =" loading.hosts"
93- @change =" onSelectHostId"
94- ></a-select >
95- </a-form-item >
96- </div >
97- </template >
98- </a-step >
9948 <a-step
10049 :title =" $t('label.template')"
10150 :status =" zoneSelected ? 'process' : 'wait'" >
209158 v-if =" !template.deployasis && template.childtemplates && template.childtemplates.length > 0" >
210159 <template #description >
211160 <div v-if =" zoneSelected" >
212- <volume -disk-offering-map
161+ <multi -disk-selection
213162 :items =" template.childtemplates"
214163 :diskOfferings =" options.diskOfferings"
215164 :zoneId =" zoneId"
276225 <template #description >
277226 <div v-if =" zoneSelected" >
278227 <volume-disk-offering-map
279- :items =" dataPreFill.diskofferingids "
228+ :items =" dataPreFill.datadisksdetails "
280229 :zoneId =" zoneId"
281230 @select-volumes-disk-offering =" updateVolumesDiskOffering($event)" />
282231 </div >
679628 <a-button @click =" closeAction" :disabled =" loading.deploy" >
680629 {{ $t('label.cancel') }}
681630 </a-button >
682- <a-button @click =" restoreDefaults" :disabled =" loading.deploy" >
683- {{ $t('label.reset.to.default') }}
684- </a-button >
685631 <a-button style =" margin-left : 10px " type =" primary" ref =" submit" @click =" handleSubmit" :loading =" loading.deploy" >
686- {{ $t('label.ok ') }}
632+ {{ $t('label.create ') }}
687633 </a-button >
688634 </div >
689635 </a-form >
@@ -759,8 +705,6 @@ export default {
759705 data () {
760706 return {
761707 zoneId: ' ' ,
762- podId: null ,
763- clusterId: null ,
764708 zoneSelected: false ,
765709 isZoneSelectedMultiArch: false ,
766710 dynamicscalingenabled: true ,
@@ -799,9 +743,6 @@ export default {
799743 networks: [],
800744 sshKeyPairs: [],
801745 UserDatas: [],
802- pods: [],
803- clusters: [],
804- hosts: [],
805746 groups: [],
806747 keyboards: [],
807748 bootTypes: [],
@@ -821,9 +762,6 @@ export default {
821762 sshKeyPairs: false ,
822763 userDatas: false ,
823764 zones: false ,
824- pods: false ,
825- clusters: false ,
826- hosts: false ,
827765 groups: false
828766 },
829767 owner: {
@@ -1050,35 +988,6 @@ export default {
1050988 showIcon: true
1051989 }
1052990 },
1053- pods: {
1054- list: ' listPods' ,
1055- isLoad: ! this .isNormalAndDomainUser ,
1056- options: {
1057- zoneid: _ .get (this .zone , ' id' )
1058- },
1059- field: ' podid'
1060- },
1061- clusters: {
1062- list: ' listClusters' ,
1063- isLoad: ! this .isNormalAndDomainUser ,
1064- options: {
1065- zoneid: _ .get (this .zone , ' id' ),
1066- podid: this .podId
1067- },
1068- field: ' clusterid'
1069- },
1070- hosts: {
1071- list: ' listHosts' ,
1072- isLoad: ! this .isNormalAndDomainUser ,
1073- options: {
1074- zoneid: _ .get (this .zone , ' id' ),
1075- podid: this .podId ,
1076- clusterid: this .clusterId ,
1077- state: ' Up' ,
1078- type: ' Routing'
1079- },
1080- field: ' hostid'
1081- },
1082991 templates2: {
1083992 list: ' listTemplates' ,
1084993 isLoad: true ,
@@ -1117,45 +1026,6 @@ export default {
11171026 }
11181027 })
11191028 },
1120- podSelectOptions () {
1121- const options = this .options .pods .map ((pod ) => {
1122- return {
1123- label: pod .name ,
1124- value: pod .id
1125- }
1126- })
1127- options .unshift ({
1128- label: this .$t (' label.default' ),
1129- value: null
1130- })
1131- return options
1132- },
1133- clusterSelectOptions () {
1134- const options = this .options .clusters .map ((cluster ) => {
1135- return {
1136- label: cluster .name ,
1137- value: cluster .id
1138- }
1139- })
1140- options .unshift ({
1141- label: this .$t (' label.default' ),
1142- value: null
1143- })
1144- return options
1145- },
1146- hostSelectOptions () {
1147- const options = this .options .hosts .map ((host ) => {
1148- return {
1149- label: host .name ,
1150- value: host .id
1151- }
1152- })
1153- options .unshift ({
1154- label: this .$t (' label.default' ),
1155- value: null
1156- })
1157- return options
1158- },
11591029 keyboardSelectOptions () {
11601030 const keyboardOpts = this .$config .keyboardOptions || {}
11611031 return Object .keys (keyboardOpts).map ((keyboard ) => {
@@ -1262,24 +1132,6 @@ export default {
12621132 this .vm .zonename = this .zone .name
12631133 }
12641134
1265- const pod = _ .find (this .options .pods , (option ) => option .id === instanceConfig .podid )
1266- if (pod) {
1267- this .vm .podid = pod .id
1268- this .vm .podname = pod .name
1269- }
1270-
1271- const cluster = _ .find (this .options .clusters , (option ) => option .id === instanceConfig .clusterid )
1272- if (cluster) {
1273- this .vm .clusterid = cluster .id
1274- this .vm .clustername = cluster .name
1275- }
1276-
1277- const host = _ .find (this .options .hosts , (option ) => option .id === instanceConfig .hostid )
1278- if (host) {
1279- this .vm .hostid = host .id
1280- this .vm .hostname = host .name
1281- }
1282-
12831135 if (this .diskSize ) {
12841136 this .vm .disksizetotalgb = this .diskSize
12851137 } else {
@@ -1637,7 +1489,6 @@ export default {
16371489 this .form .multidiskoffering = value
16381490 },
16391491 updateVolumesDiskOffering (value ) {
1640- console .log (' 11 ' + JSON .stringify (value, null , 2 ))
16411492 this .form .volumesdiskoffering = value
16421493 },
16431494 updateAffinityGroups (ids ) {
@@ -1752,9 +1603,6 @@ export default {
17521603
17531604 // step 1 : select zone
17541605 deployVmData .zoneid = values .zoneid
1755- deployVmData .podid = values .podid
1756- deployVmData .clusterid = values .clusterid
1757- deployVmData .hostid = values .hostid
17581606 deployVmData .keyboard = values .keyboard
17591607 if (! this .template ? .deployasis ) {
17601608 deployVmData .boottype = values .boottype
@@ -1827,11 +1675,17 @@ export default {
18271675
18281676 if (values .volumesdiskoffering ) {
18291677 let i = 0
1830- Object .entries (values .volumesdiskoffering ).forEach (([disk , { offering, size }]) => {
1678+ Object .entries (values .volumesdiskoffering ).forEach (([disk , { offering, size, miniops, maxiops, iscustomizediops }]) => {
18311679 const offeringKey = ` datadisksdetails[${ i} ].diskofferingid`
18321680 const sizeKey = ` datadisksdetails[${ i} ].size`
1681+ const minIopsKey = ` datadisksdetails[${ i} ].miniops`
1682+ const maxIopsKey = ` datadisksdetails[${ i} ].maxiops`
18331683 deployVmData[offeringKey] = offering
18341684 deployVmData[sizeKey] = size
1685+ if (iscustomizediops) {
1686+ deployVmData[minIopsKey] = miniops
1687+ deployVmData[maxIopsKey] = maxiops
1688+ }
18351689 i++
18361690 })
18371691 }
@@ -2075,7 +1929,7 @@ export default {
20751929 param .loading = true
20761930 param .opts = []
20771931 const options = param .options || {}
2078- if (! (' listall' in options) && ! [' zones ' , ' pods ' , ' clusters ' , ' hosts ' , ' dynamicScalingVmConfig' , ' hypervisors' ].includes (name)) {
1932+ if (! (' listall' in options) && ! [' dynamicScalingVmConfig' , ' hypervisors' ].includes (name)) {
20791933 options .listall = true
20801934 }
20811935 api (param .list , options).then ((response ) => {
@@ -2181,8 +2035,6 @@ export default {
21812035 },
21822036 onSelectZoneId (value ) {
21832037 this .zoneId = value
2184- this .podId = null
2185- this .clusterId = null
21862038 this .zone = _ .find (this .options .zones , (option ) => option .id === value)
21872039 this .isZoneSelectedMultiArch = this .zone .ismultiarch
21882040 if (this .isZoneSelectedMultiArch ) {
@@ -2192,9 +2044,6 @@ export default {
21922044 this .form .startvm = true
21932045 this .selectedZone = this .zoneId
21942046 this .form .zoneid = this .zoneId
2195- this .form .clusterid = undefined
2196- this .form .podid = undefined
2197- this .form .hostid = undefined
21982047 this .form .templateid = undefined
21992048
22002049 _ .each (this .params , (param , name ) => {
@@ -2211,29 +2060,6 @@ export default {
22112060 this .updateTemplateKey ()
22122061 this .formModel = toRaw (this .form )
22132062 },
2214- onSelectPodId (value ) {
2215- this .podId = value
2216- if (this .podId === null ) {
2217- this .form .podid = undefined
2218- }
2219-
2220- this .fetchOptions (this .params .clusters , ' clusters' )
2221- this .fetchOptions (this .params .hosts , ' hosts' )
2222- },
2223- onSelectClusterId (value ) {
2224- this .clusterId = value
2225- if (this .clusterId === null ) {
2226- this .form .clusterid = undefined
2227- }
2228-
2229- this .fetchOptions (this .params .hosts , ' hosts' )
2230- },
2231- onSelectHostId (value ) {
2232- this .hostId = value
2233- if (this .hostId === null ) {
2234- this .form .hostid = undefined
2235- }
2236- },
22372063 handleSearchFilter (name , options ) {
22382064 this .params [name].options = { ... this .params [name].options , ... options }
22392065 this .fetchOptions (this .params [name], name)
0 commit comments