222222 :cpuNumberInputDecorator =" cpuNumberKey"
223223 :cpuSpeedInputDecorator =" cpuSpeedKey"
224224 :memoryInputDecorator =" memoryKey"
225- :computeOfferingId =" computeOffering.id"
225+ :serviceofferingId =" computeOffering.id"
226226 :preFillContent =" dataPreFill"
227227 :isConstrained =" 'serviceofferingdetails' in computeOffering"
228228 :minCpu =" getMinCpu()"
@@ -715,6 +715,7 @@ export default {
715715 this .rules = reactive ({
716716 displayname: [{ required: true , message: this .$t (' message.error.input.value' ) }],
717717 templateid: [{ required: this .templateType !== ' auto' , message: this .$t (' message.error.input.value' ) }],
718+ serviceofferingid: [{ required: true , message: this .$t (' message.error.input.value' ) }],
718719 rootdiskid: [{ required: this .templateType !== ' auto' , message: this .$t (' message.error.input.value' ) }]
719720 })
720721 },
@@ -852,7 +853,7 @@ export default {
852853 this .form [name] = value
853854 },
854855 updateComputeOffering (id ) {
855- this .updateFieldValue (' computeofferingid ' , id)
856+ this .updateFieldValue (' serviceofferingid ' , id)
856857 this .computeOffering = this .computeOfferings .filter (x => x .id === id)[0 ]
857858 if (this .computeOffering && ! this .computeOffering .iscustomizediops ) {
858859 this .updateFieldValue (this .minIopsKey , undefined )
@@ -879,6 +880,7 @@ export default {
879880 this .rules = reactive ({
880881 displayname: [{ required: true , message: this .$t (' message.error.input.value' ) }],
881882 templateid: [{ required: this .templateType !== ' auto' , message: this .$t (' message.error.input.value' ) }],
883+ serviceofferingid: [{ required: true , message: this .$t (' message.error.input.value' ) }],
882884 rootdiskid: [{ required: this .templateType !== ' auto' , message: this .$t (' message.error.input.value' ) }]
883885 })
884886 },
@@ -1040,7 +1042,7 @@ export default {
10401042 })
10411043 return
10421044 }
1043- params .serviceofferingid = values .computeofferingid
1045+ params .serviceofferingid = values .serviceofferingid
10441046 if (this .computeOffering .iscustomized ) {
10451047 var details = [this .cpuNumberKey , this .cpuSpeedKey , this .memoryKey ]
10461048 for (var detail of details) {
@@ -1188,6 +1190,7 @@ export default {
11881190 successMethod : result => {
11891191 this .$emit (' refresh-data' )
11901192 resolve (result)
1193+ this .closeAction ()
11911194 },
11921195 errorMethod : (result ) => {
11931196 this .updateLoading (false )
@@ -1198,7 +1201,7 @@ export default {
11981201 this .updateLoading (false )
11991202 this .$notifyError (error)
12001203 }).finally (() => {
1201- this .closeAction ()
1204+ // this.closeAction()
12021205 this .updateLoading (false )
12031206 })
12041207 })
@@ -1211,7 +1214,7 @@ export default {
12111214 this .$emit (' loading-changed' , value)
12121215 },
12131216 resetForm () {
1214- var fields = [' displayname' , ' hostname' , ' domainid' , ' account' , ' projectid' , ' computeofferingid ' ]
1217+ var fields = [' displayname' , ' hostname' , ' domainid' , ' account' , ' projectid' , ' serviceofferingid ' ]
12151218 for (var field of fields) {
12161219 this .updateFieldValue (field, undefined )
12171220 }
0 commit comments