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 >
@@ -267,6 +267,9 @@ export default {
267
267
return sourcenatService && sourcenatService .length === 1
268
268
}
269
269
return false
270
+ },
271
+ selectedVpcOfferingHavingRoutedNetworkMode () {
272
+ return this .selectedVpcOffering && this .selectedVpcOffering .networkmode === ' ROUTED'
270
273
}
271
274
},
272
275
methods: {
@@ -388,6 +391,7 @@ export default {
388
391
handleVpcOfferingChange (value ) {
389
392
this .selectedVpcOffering = {}
390
393
if (! value) {
394
+ this .updateCidrRule ()
391
395
return
392
396
}
393
397
for (var offering of this .vpcOfferings ) {
@@ -397,9 +401,17 @@ export default {
397
401
if (this .isASNumberRequired ()) {
398
402
this .fetchZoneASNumbers ()
399
403
}
400
- return
404
+ break
401
405
}
402
406
}
407
+ this .updateCidrRule ()
408
+ },
409
+ updateCidrRule () {
410
+ if (! this .selectedVpcOfferingHavingRoutedNetworkMode ) {
411
+ this .rules .cidr = [{ required: true , message: this .$t (' message.error.required.input' ) }]
412
+ } else {
413
+ delete this .rules .cidr
414
+ }
403
415
},
404
416
handleASNumberChange (selectedIndex ) {
405
417
this .selectedAsNumber = this .asNumbersZone [selectedIndex].asnumber
You can’t perform that action at this time.
0 commit comments