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 72
72
:placeholder =" apiParams.cidr.description" />
73
73
</a-form-item >
74
74
<a-form-item
75
- v-if =" selectedVpcOffering && selectedVpcOffering.networkmode === 'ROUTED' "
75
+ v-if =" selectedVpcOfferingHavingRoutedNetworkMode "
76
76
ref =" cidrsize"
77
77
name =" cidrsize" >
78
78
<template #label >
@@ -276,6 +276,9 @@ export default {
276
276
return sourcenatService && sourcenatService .length === 1
277
277
}
278
278
return false
279
+ },
280
+ selectedVpcOfferingHavingRoutedNetworkMode () {
281
+ return this .selectedVpcOffering && this .selectedVpcOffering .networkmode === ' ROUTED'
279
282
}
280
283
},
281
284
methods: {
@@ -397,6 +400,7 @@ export default {
397
400
handleVpcOfferingChange (value ) {
398
401
this .selectedVpcOffering = {}
399
402
if (! value) {
403
+ this .updateCidrRule ()
400
404
return
401
405
}
402
406
for (var offering of this .vpcOfferings ) {
@@ -406,9 +410,17 @@ export default {
406
410
if (this .isASNumberRequired ()) {
407
411
this .fetchZoneASNumbers ()
408
412
}
409
- return
413
+ break
410
414
}
411
415
}
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
+ }
412
424
},
413
425
handleASNumberChange (selectedIndex ) {
414
426
this .selectedAsNumber = this .asNumbersZone [selectedIndex].asnumber
You can’t perform that action at this time.
0 commit comments