File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change 7272 :placeholder =" apiParams.cidr.description" />
7373 </a-form-item >
7474 <a-form-item
75- v-if =" selectedVpcOffering && selectedVpcOffering.networkmode === 'ROUTED' "
75+ v-if =" selectedVpcOfferingHavingRoutedNetworkMode "
7676 ref =" cidrsize"
7777 name =" cidrsize" >
7878 <template #label >
@@ -276,6 +276,9 @@ export default {
276276 return sourcenatService && sourcenatService .length === 1
277277 }
278278 return false
279+ },
280+ selectedVpcOfferingHavingRoutedNetworkMode () {
281+ return this .selectedVpcOffering && this .selectedVpcOffering .networkmode === ' ROUTED'
279282 }
280283 },
281284 methods: {
@@ -397,6 +400,7 @@ export default {
397400 handleVpcOfferingChange (value ) {
398401 this .selectedVpcOffering = {}
399402 if (! value) {
403+ this .updateCidrRule ()
400404 return
401405 }
402406 for (var offering of this .vpcOfferings ) {
@@ -406,9 +410,17 @@ export default {
406410 if (this .isASNumberRequired ()) {
407411 this .fetchZoneASNumbers ()
408412 }
409- return
413+ break
410414 }
411415 }
416+ this .updateCidrRule ()
417+ },
418+ updateCidrRule () {
419+ if (! this .selectedVpcOfferingHavingRoutedNetworkMode ) {
420+ this .rules .cidr = [{ required: true , message: this .$t (' message.error.required.input' ) }]
421+ } else {
422+ delete this .rules .cidr
423+ }
412424 },
413425 handleASNumberChange (selectedIndex ) {
414426 this .selectedAsNumber = this .asNumbersZone [selectedIndex].asnumber
You can’t perform that action at this time.
0 commit comments