@@ -382,8 +382,8 @@ export default {
382382 ipV6Regex: / ^ ((([0-9A-Fa-f ] {1,4} :){7} [0-9A-Fa-f ] {1,4} )| (([0-9A-Fa-f ] {1,4} :){6} :[0-9A-Fa-f ] {1,4} )| (([0-9A-Fa-f ] {1,4} :){5} :([0-9A-Fa-f ] {1,4} :)? [0-9A-Fa-f ] {1,4} )| (([0-9A-Fa-f ] {1,4} :){4} :([0-9A-Fa-f ] {1,4} :){0,2} [0-9A-Fa-f ] {1,4} )| (([0-9A-Fa-f ] {1,4} :){3} :([0-9A-Fa-f ] {1,4} :){0,3} [0-9A-Fa-f ] {1,4} )| (([0-9A-Fa-f ] {1,4} :){2} :([0-9A-Fa-f ] {1,4} :){0,4} [0-9A-Fa-f ] {1,4} )| (([0-9A-Fa-f ] {1,4} :){6} ((\b ((25[0-5 ] )| (1\d {2} )| (2[0-4 ] \d )| (\d {1,2} ))\b )\. ){3} (\b ((25[0-5 ] )| (1\d {2} )| (2[0-4 ] \d )| (\d {1,2} ))\b ))| (([0-9A-Fa-f ] {1,4} :){0,5} :((\b ((25[0-5 ] )| (1\d {2} )| (2[0-4 ] \d )| (\d {1,2} ))\b )\. ){3} (\b ((25[0-5 ] )| (1\d {2} )| (2[0-4 ] \d )| (\d {1,2} ))\b ))| (::([0-9A-Fa-f ] {1,4} :){0,5} ((\b ((25[0-5 ] )| (1\d {2} )| (2[0-4 ] \d )| (\d {1,2} ))\b )\. ){3} (\b ((25[0-5 ] )| (1\d {2} )| (2[0-4 ] \d )| (\d {1,2} ))\b ))| ([0-9A-Fa-f ] {1,4} ::([0-9A-Fa-f ] {1,4} :){0,5} [0-9A-Fa-f ] {1,4} )| (::([0-9A-Fa-f ] {1,4} :){0,6} [0-9A-Fa-f ] {1,4} )| (([0-9A-Fa-f ] {1,4} :){1,7} :))$ / i
383383 }),
384384 created () {
385- this .hypervisors = this .prefillContent .hypervisors ? this . prefillContent . hypervisors : null
386- this .networkOfferings = this .prefillContent . networkOfferings ? this . prefillContent . networkOfferings : null
385+ this .hypervisors = this .prefillContent .hypervisors ? . hypervisors || null
386+ this .networkOfferings = this .prefillContent ? . networkOfferings || null
387387 this .form = this .$form .createForm (this , {
388388 onFieldsChange : (_ , changedFields ) => {
389389 if (changedFields .networkOfferingId && this .prefillContent .networkOfferingSelected ) {
@@ -433,37 +433,37 @@ export default {
433433 return this .zoneType === ' Advanced'
434434 },
435435 zoneType () {
436- return this .prefillContent .zoneType ? this . prefillContent . zoneType . value : null
436+ return this .prefillContent .zoneType ? . value || null
437437 },
438438 securityGroupsEnabled () {
439- return this .isAdvancedZone && (this .prefillContent .securityGroupsEnabled ? this . prefillContent . securityGroupsEnabled . value : false )
439+ return this .isAdvancedZone && (this .prefillContent .securityGroupsEnabled ? . value || false )
440440 },
441441 name () {
442- return this .prefillContent .name ? this . prefillContent . name . value : null
442+ return this .prefillContent .name ? . value || null
443443 },
444444 ipv4Dns1 () {
445- return this .prefillContent .ipv4Dns1 ? this . prefillContent . ipv4Dns1 . value : null
445+ return this .prefillContent .ipv4Dns1 ? . value || null
446446 },
447447 ipv4Dns2 () {
448- return this .prefillContent .ipv4Dns2 ? this . prefillContent . ipv4Dns2 . value : null
448+ return this .prefillContent .ipv4Dns2 ? . value || null
449449 },
450450 ipv6Dns1 () {
451- return this .prefillContent .ipv6Dns1 ? this . prefillContent . ipv6Dns1 . value : null
451+ return this .prefillContent .ipv6Dns1 ? . value || null
452452 },
453453 ipv6Dns2 () {
454- return this .prefillContent .ipv6Dns2 ? this . prefillContent . ipv6Dns2 . value : null
454+ return this .prefillContent .ipv6Dns2 ? . value || null
455455 },
456456 internalDns1 () {
457- return this .prefillContent .internalDns1 ? this . prefillContent . internalDns1 . value : null
457+ return this .prefillContent .internalDns1 ? . value || null
458458 },
459459 internalDns2 () {
460- return this .prefillContent .internalDns2 ? this . prefillContent . internalDns2 . value : null
460+ return this .prefillContent .internalDns2 ? . value || null
461461 },
462462 ipv6Cidr () {
463- return this .prefillContent .ipv6Cidr ? this . prefillContent . ipv6Cidr . value : null
463+ return this .prefillContent .ipv6Cidr ? . value || null
464464 },
465465 ip6gateway () {
466- return this .prefillContent .ip6gateway ? this . prefillContent . ip6gateway . value : null
466+ return this .prefillContent .ip6gateway ? . value || null
467467 },
468468 currentHypervisor () {
469469 if (this .prefillContent .hypervisor ) {
@@ -474,7 +474,7 @@ export default {
474474 return null
475475 },
476476 currentNetworkOfferingId () {
477- const lastNetworkOfferingId = this .prefillContent .networkOfferingSelected ? this . prefillContent . networkOfferingSelected . id : null
477+ const lastNetworkOfferingId = this .prefillContent .networkOfferingSelected ? . id || null
478478 if (this .networkOfferings ) {
479479 if (lastNetworkOfferingId !== null && this .networkOfferings [lastNetworkOfferingId]) {
480480 return lastNetworkOfferingId
@@ -484,29 +484,29 @@ export default {
484484 return null
485485 },
486486 networkDomain () {
487- return this .prefillContent .networkDomain ? this . prefillContent . networkDomain . value : null
487+ return this .prefillContent .networkDomain ? . value || null
488488 },
489489 guestcidraddress () {
490- return this .prefillContent .guestcidraddress ? this . prefillContent . guestcidraddress . value : ' 10.1.1.0/24'
490+ return this .prefillContent .guestcidraddress ? . value || ' 10.1.1.0/24'
491491 },
492492 isDedicated () {
493- return this .prefillContent .isDedicated ? this . prefillContent . isDedicated . value : false
493+ return this .prefillContent .isDedicated ? . value || false
494494 },
495495 domain () {
496- const lastDomainId = this .prefillContent .domainId ? this . prefillContent . domainId . value : null
496+ const lastDomainId = this .prefillContent .domainId ? . value || null
497497 if (this .domains !== null && lastDomainId !== null && this .domains [lastDomainId]) {
498498 return lastDomainId
499499 }
500500 return null
501501 },
502502 account () {
503- return this .prefillContent .account ? this . prefillContent . account . value : null
503+ return this .prefillContent .account ? . value || null
504504 },
505505 localstorageenabled () {
506- return this .prefillContent .localstorageenabled ? this . prefillContent . localstorageenabled . value : false
506+ return this .prefillContent .localstorageenabled ? . value || false
507507 },
508508 localstorageenabledforsystemvm () {
509- return this .prefillContent .localstorageenabledforsystemvm ? this . prefillContent . localstorageenabledforsystemvm . value : false
509+ return this .prefillContent .localstorageenabledforsystemvm ? . value || false
510510 }
511511 },
512512 methods: {
0 commit comments