@@ -521,7 +521,7 @@ export default {
521521 if (this .vpc !== null ) { // from VPC section
522522 this .fetchNetworkOfferingData (true )
523523 } else { // from guest network section
524- var params = {
524+ const params = {
525525 account: this .owner .account ,
526526 projectid: this .owner .projectid ,
527527 domainid: this .owner .domainid
@@ -531,7 +531,7 @@ export default {
531531 api (' listVPCs' , params).then (json => {
532532 const listVPCs = json .listvpcsresponse .vpc
533533 this .hasVPC = this .arrayHasItems (listVPCs)
534- if (this .hasVPC === false ) {
534+ if (! this .hasVPC ) {
535535 this .fetchNetworkOfferingData (false )
536536 } else {
537537 this .fetchNetworkOfferingData ()
@@ -544,7 +544,7 @@ export default {
544544 },
545545 fetchNetworkOfferingData (forVpc ) {
546546 this .networkOfferingLoading = true
547- var params = {
547+ const params = {
548548 zoneid: this .selectedZone .id ,
549549 guestiptype: ' Isolated' ,
550550 state: ' Enabled'
@@ -587,7 +587,7 @@ export default {
587587 },
588588 fetchVpcData () {
589589 this .vpcLoading = true
590- var params = {
590+ const params = {
591591 listAll: true ,
592592 details: ' min'
593593 }
@@ -610,14 +610,14 @@ export default {
610610 const formRaw = toRaw (this .form )
611611 const values = this .handleRemoveFields (formRaw)
612612 this .actionLoading = true
613- var params = {
613+ const params = {
614614 zoneId: this .selectedZone .id ,
615615 name: values .name ,
616616 displayText: values .displaytext ,
617617 networkOfferingId: this .selectedNetworkOffering .id
618618 }
619- var usefulFields = [' gateway' , ' netmask' , ' cidrsize' , ' startip' , ' startipv4' , ' endip' , ' endipv4' , ' dns1' , ' dns2' , ' ip6dns1' , ' ip6dns2' , ' sourcenatipaddress' , ' externalid' , ' vpcid' , ' vlan' , ' networkdomain' ]
620- for (var field of usefulFields) {
619+ const usefulFields = [' gateway' , ' netmask' , ' cidrsize' , ' startip' , ' startipv4' , ' endip' , ' endipv4' , ' dns1' , ' dns2' , ' ip6dns1' , ' ip6dns2' , ' sourcenatipaddress' , ' externalid' , ' vpcid' , ' vlan' , ' networkdomain' ]
620+ for (const field of usefulFields) {
621621 if (this .isValidTextValueForKey (values, field)) {
622622 params[field] = values[field]
623623 }
0 commit comments