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 >
@@ -267,6 +267,9 @@ export default {
267267 return sourcenatService && sourcenatService .length === 1
268268 }
269269 return false
270+ },
271+ selectedVpcOfferingHavingRoutedNetworkMode () {
272+ return this .selectedVpcOffering && this .selectedVpcOffering .networkmode === ' ROUTED'
270273 }
271274 },
272275 methods: {
@@ -388,6 +391,7 @@ export default {
388391 handleVpcOfferingChange (value ) {
389392 this .selectedVpcOffering = {}
390393 if (! value) {
394+ this .updateCidrRule ()
391395 return
392396 }
393397 for (var offering of this .vpcOfferings ) {
@@ -397,9 +401,17 @@ export default {
397401 if (this .isASNumberRequired ()) {
398402 this .fetchZoneASNumbers ()
399403 }
400- return
404+ break
401405 }
402406 }
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+ }
403415 },
404416 handleASNumberChange (selectedIndex ) {
405417 this .selectedAsNumber = this .asNumbersZone [selectedIndex].asnumber
You can’t perform that action at this time.
0 commit comments