@@ -144,7 +144,7 @@ export default {
144144 },
145145 computed: {
146146 zoneType () {
147- return this .prefillContent .zoneType ? this . prefillContent . zoneType . value : null
147+ return this .prefillContent .zoneType ? . value || null
148148 },
149149 isBasicZone () {
150150 return this .zoneType === BASIC_ZONE
@@ -153,25 +153,25 @@ export default {
153153 return this .zoneType === ADVANCED_ZONE
154154 },
155155 isDedicated () {
156- return this .prefillContent .isDedicated ? this . prefillContent . isDedicated . value : false
156+ return this .prefillContent .isDedicated ? . value || false
157157 },
158158 sgEnabled () {
159- return this .prefillContent .securityGroupsEnabled ? this . prefillContent . securityGroupsEnabled . value : false
159+ return this .prefillContent .securityGroupsEnabled ? . value || false
160160 },
161161 havingNetscaler () {
162- return this .prefillContent .networkOfferingSelected ? this . prefillContent . networkOfferingSelected . havingNetscaler : false
162+ return this .prefillContent .networkOfferingSelected ? . havingNetscaler || false
163163 },
164164 havingSG () {
165- return this .prefillContent .networkOfferingSelected ? this . prefillContent . networkOfferingSelected . havingSG : false
165+ return this .prefillContent .networkOfferingSelected ? . havingSG || false
166166 },
167167 havingEIP () {
168- return this .prefillContent .networkOfferingSelected ? this . prefillContent . networkOfferingSelected . havingEIP : false
168+ return this .prefillContent .networkOfferingSelected ? . havingEIP || false
169169 },
170170 havingELB () {
171- return this .prefillContent .networkOfferingSelected ? this . prefillContent . networkOfferingSelected . havingELB : false
171+ return this .prefillContent .networkOfferingSelected ? . havingELB || false
172172 },
173173 selectedBaremetalProviders () {
174- return this .prefillContent .networkOfferingSelected ? this . prefillContent . networkOfferingSelected . selectedBaremetalProviders : []
174+ return this .prefillContent .networkOfferingSelected ? . selectedBaremetalProviders || []
175175 }
176176 },
177177 mounted () {
@@ -301,7 +301,7 @@ export default {
301301 async stepAddZone () {
302302 this .addStep (' message.creating.zone' , ' stepAddZone' )
303303
304- const guestcidraddress = this .prefillContent .guestcidraddress ? this . prefillContent . guestcidraddress . value : null
304+ const guestcidraddress = this .prefillContent .guestcidraddress ? . value || null
305305 const params = {}
306306 params .networktype = this .zoneType
307307
@@ -322,14 +322,14 @@ export default {
322322 }
323323 }
324324 params .name = this .prefillContent .name .value
325- params .localstorageenabled = this .prefillContent .localstorageenabled ? this . prefillContent . localstorageenabled . value : false
325+ params .localstorageenabled = this .prefillContent .localstorageenabled ? . value || false
326326 params .dns1 = this .prefillContent .ipv4Dns1 .value
327- params .dns2 = this .prefillContent .ipv4Dns2 ? this . prefillContent . ipv4Dns2 . value : null
328- params .ip6dns1 = this .prefillContent .ipv6Dns1 ? this . prefillContent . ipv6Dns1 . value : null
329- params .ip6dns2 = this .prefillContent .ipv6Dns2 ? this . prefillContent . ipv6Dns2 . value : null
330- params .internaldns1 = this .prefillContent .internalDns1 ? this . prefillContent . internalDns1 . value : null
331- params .internaldns2 = this .prefillContent .internalDns2 ? this . prefillContent . internalDns2 . value : null
332- params .domain = this .prefillContent .networkDomain ? this . prefillContent . networkDomain . value : null
327+ params .dns2 = this .prefillContent .ipv4Dns2 ? . value || null
328+ params .ip6dns1 = this .prefillContent .ipv6Dns1 ? . value || null
329+ params .ip6dns2 = this .prefillContent .ipv6Dns2 ? . value || null
330+ params .internaldns1 = this .prefillContent .internalDns1 ? . value || null
331+ params .internaldns2 = this .prefillContent .internalDns2 ? . value || null
332+ params .domain = this .prefillContent .networkDomain ? . value || null
333333
334334 try {
335335 if (! this .stepData .stepMove .includes (' createZone' )) {
@@ -355,8 +355,8 @@ export default {
355355
356356 const params = {}
357357 params .zoneid = this .stepData .zoneReturned .id
358- params .domainid = this .prefillContent .domainId ? this . prefillContent . domainId . value : null
359- params .account = this .prefillContent .account ? this . prefillContent . account . value : null
358+ params .domainid = this .prefillContent .domainId ? . value || null
359+ params .account = this .prefillContent .account ? . value || null
360360
361361 try {
362362 await this .dedicateZone (params)
@@ -378,8 +378,8 @@ export default {
378378 if (this .isBasicZone ) {
379379 const requestedTrafficTypeCount = this .prefillContent .physicalNetworks [0 ].traffics .length
380380 this .stepData .requestedTrafficTypeCount = requestedTrafficTypeCount
381- this .stepData .returnedTrafficTypes = this .stepData . returnedTrafficTypes ? this . stepData . returnedTrafficTypes : []
382- this .stepData .physicalNetworkReturned = this .stepData . physicalNetworkReturned ? this . stepData . physicalNetworkReturned : {}
381+ this .stepData .returnedTrafficTypes = this .stepData ? . returnedTrafficTypes || []
382+ this .stepData .physicalNetworkReturned = this .stepData ? . physicalNetworkReturned || {}
383383
384384 if (this .prefillContent .physicalNetworks && this .prefillContent .physicalNetworks .length > 0 ) {
385385 params .name = this .prefillContent .physicalNetworks [0 ].name
@@ -434,8 +434,8 @@ export default {
434434 this .setStepStatus (STATUS_FAILED )
435435 }
436436 } else {
437- this .stepData .physicalNetworksReturned = this .stepData . physicalNetworksReturned ? this . stepData . physicalNetworksReturned : []
438- this .stepData .physicalNetworkItem = this .stepData . physicalNetworkItem ? this . stepData . physicalNetworkItem : {}
437+ this .stepData .physicalNetworksReturned = this .stepData ? . physicalNetworksReturned || []
438+ this .stepData .physicalNetworkItem = this .stepData ? . physicalNetworkItem || {}
439439 let physicalNetworkReturned = {}
440440
441441 if (this .stepData .physicalNetworksReturned .length === this .prefillContent .physicalNetworks .length ) {
@@ -732,18 +732,18 @@ export default {
732732
733733 const params = {}
734734 params .physicalnetworkid = this .stepData .physicalNetworkReturned .id
735- params .username = this .prefillContent .netscalerUsername ? this . prefillContent . netscalerUsername . value : null
736- params .password = this .prefillContent .netscalerPassword ? this . prefillContent . netscalerPassword . value : null
737- params .networkdevicetype = this .prefillContent .netscalerType ? this . prefillContent . netscalerType . value : null
738- params .gslbprovider = this .prefillContent .gslbprovider ? this . prefillContent . gslbprovider . value : false
739- params .gslbproviderpublicip = this .prefillContent .gslbproviderpublicip ? this . prefillContent . gslbproviderpublicip . value : null
740- params .gslbproviderprivateip = this .prefillContent .gslbproviderprivateip ? this . prefillContent . gslbproviderprivateip . value : null
735+ params .username = this .prefillContent .netscalerUsername ? . value || null
736+ params .password = this .prefillContent .netscalerPassword ? . value || null
737+ params .networkdevicetype = this .prefillContent .netscalerType ? . value || null
738+ params .gslbprovider = this .prefillContent .gslbprovider ? . value || false
739+ params .gslbproviderpublicip = this .prefillContent .gslbproviderpublicip ? . value || null
740+ params .gslbproviderprivateip = this .prefillContent .gslbproviderprivateip ? . value || null
741741
742742 const url = []
743743 const ip = this .prefillContent .netscalerIp .value
744744 url .push (' https://' + ip)
745745 let isQuestionMarkAdded = false
746- const publicInterface = this .prefillContent .publicinterface ? this . prefillContent . publicinterface . value : null
746+ const publicInterface = this .prefillContent .publicinterface ? . value || null
747747 if (publicInterface != null && publicInterface .length > 0 ) {
748748 if (! isQuestionMarkAdded) {
749749 url .push (' ?' )
@@ -754,7 +754,7 @@ export default {
754754 url .push (' publicinterface=' + publicInterface)
755755 }
756756
757- const privateInterface = this .prefillContent .privateinterface ? this . prefillContent . privateinterface . value : null
757+ const privateInterface = this .prefillContent .privateinterface ? . value || null
758758 if (privateInterface != null && privateInterface .length > 0 ) {
759759 if (! isQuestionMarkAdded) {
760760 url .push (' ?' )
@@ -765,7 +765,7 @@ export default {
765765 url .push (' privateinterface=' + publicInterface)
766766 }
767767
768- const numretries = this .prefillContent .numretries ? this . prefillContent . numretries . value : null
768+ const numretries = this .prefillContent .value || null
769769 if (numretries != null && numretries .length > 0 ) {
770770 if (! isQuestionMarkAdded) {
771771 url .push (' ?' )
@@ -776,7 +776,7 @@ export default {
776776 url .push (' numretries=' + numretries)
777777 }
778778
779- const capacity = this .prefillContent .capacity ? this . prefillContent . capacity . value : null
779+ const capacity = this .prefillContent .capacity ? . value || null
780780 if (capacity != null && capacity .length > 0 ) {
781781 if (! isQuestionMarkAdded) {
782782 url .push (' ?' )
@@ -813,11 +813,11 @@ export default {
813813
814814 const params = {}
815815 params .zoneId = this .stepData .zoneReturned .id
816- params .name = this .prefillContent .podName ? this . prefillContent . podName . value : null
817- params .gateway = this .prefillContent .podReservedGateway ? this . prefillContent . podReservedGateway . value : null
818- params .netmask = this .prefillContent .podReservedNetmask ? this . prefillContent . podReservedNetmask . value : null
819- params .startIp = this .prefillContent .podReservedStartIp ? this . prefillContent . podReservedStartIp . value : null
820- params .endIp = this .prefillContent .podReservedStopIp ? this . prefillContent . podReservedStopIp . value : null
816+ params .name = this .prefillContent .podName ? . value || null
817+ params .gateway = this .prefillContent .podReservedGateway ? . value || null
818+ params .netmask = this .prefillContent .podReservedNetmask ? . value || null
819+ params .startIp = this .prefillContent .podReservedStartIp ? . value || null
820+ params .endIp = this .prefillContent .podReservedStopIp ? . value || null
821821
822822 try {
823823 if (! this .stepData .stepMove .includes (' createPod' )) {
@@ -840,14 +840,14 @@ export default {
840840 params .zoneid = this .stepData .zoneReturned .id
841841 params .name = ' defaultGuestNetwork'
842842 params .displaytext = ' defaultGuestNetwork'
843- params .networkofferingid = this .prefillContent .networkOfferingSelected ? this . prefillContent . networkOfferingSelected . id : null
843+ params .networkofferingid = this .prefillContent .networkOfferingSelected ? . id || null
844844
845845 if (this .isAdvancedZone && this .sgEnabled ) {
846- params .gateway = this .prefillContent .guestGateway ? this . prefillContent . guestGateway . value : null
847- params .netmask = this .prefillContent .guestNetmask ? this . prefillContent . guestNetmask . value : null
848- params .startip = this .prefillContent .guestStartIp ? this . prefillContent . guestStartIp . value : null
849- params .endip = this .prefillContent .guestStopIp ? this . prefillContent . guestStopIp . value : null
850- params .vlan = this .prefillContent .guestVlan ? this . prefillContent . guestVlan . value : null
846+ params .gateway = this .prefillContent .guestGateway ? . value || null
847+ params .netmask = this .prefillContent .guestNetmask ? . value || null
848+ params .startip = this .prefillContent .guestStartIp ? . value || null
849+ params .endip = this .prefillContent .guestStopIp ? . value || null
850+ params .vlan = this .prefillContent .guestVlan ? . value || null
851851 }
852852
853853 try {
@@ -872,7 +872,7 @@ export default {
872872 this .addStep (' message.configuring.public.traffic' , ' publicTraffic' )
873873
874874 let stopNow = false
875- this .stepData .returnedPublicTraffic = this .stepData . returnedPublicTraffic ? this . stepData . returnedPublicTraffic : []
875+ this .stepData .returnedPublicTraffic = this .stepData ? . returnedPublicTraffic || []
876876 for (let index = 0 ; index < this .prefillContent [' public-ipranges' ].length ; index++ ) {
877877 const publicVlanIpRange = this .prefillContent [' public-ipranges' ][index]
878878 let isExisting = false
@@ -968,7 +968,7 @@ export default {
968968 this .currentStep ++
969969 this .addStep (' message.configuring.storage.traffic' , ' storageTraffic' )
970970
971- this .stepData .tasks = this .stepData . tasks ? this . stepData . tasks : []
971+ this .stepData .tasks = this .stepData ? . tasks || []
972972 await this .prefillContent [' storage-ipranges' ].map (async (storageIpRange , index ) => {
973973 const params = {}
974974 params .vlan = storageIpRange .vlan
@@ -1052,10 +1052,10 @@ export default {
10521052 const params = {}
10531053 params .podid = this .stepData .podReturned .id
10541054 params .networkid = this .stepData .networkReturned .id
1055- params .gateway = this .prefillContent .guestGateway ? this . prefillContent . guestGateway . value : null
1056- params .netmask = this .prefillContent .guestNetmask ? this . prefillContent . guestNetmask . value : null
1057- params .startip = this .prefillContent .guestStartIp ? this . prefillContent . guestStartIp . value : null
1058- params .endip = this .prefillContent .guestStopIp ? this . prefillContent . guestStopIp . value : null
1055+ params .gateway = this .prefillContent .guestGateway ? . value || null
1056+ params .netmask = this .prefillContent .guestNetmask ? . value || null
1057+ params .startip = this .prefillContent .guestStartIp ? . value || null
1058+ params .endip = this .prefillContent .guestStopIp ? . value || null
10591059 params .forVirtualNetwork = false
10601060
10611061 try {
@@ -1141,14 +1141,14 @@ export default {
11411141 let clusterName = this .prefillContent .clusterName .value
11421142
11431143 if (hypervisor === ' VMware' ) {
1144- params .username = this .prefillContent .vCenterUsername ? this . prefillContent . vCenterUsername . value : null
1145- params .password = this .prefillContent .vCenterPassword ? this . prefillContent . vCenterPassword . value : null
1146- params .vsmipaddress = this .prefillContent .vsmipaddress ? this . prefillContent . vsmipaddress . value : null
1147- params .vsmusername = this .prefillContent .vsmusername ? this . prefillContent . vsmusername . value : null
1148- params .vsmpassword = this .prefillContent .vsmpassword ? this . prefillContent . vsmpassword . value : null
1149-
1150- const hostname = this .prefillContent .vCenterHost ? this . prefillContent . vCenterHost . value : null
1151- const dcName = this .prefillContent .vCenterDatacenter ? this . prefillContent . vCenterDatacenter . value : null
1144+ params .username = this .prefillContent .vCenterUsername ? . value || null
1145+ params .password = this .prefillContent .vCenterPassword ? . value || null
1146+ params .vsmipaddress = this .prefillContent .vsmipaddress ? . value || null
1147+ params .vsmusername = this .prefillContent .vsmusername ? . value || null
1148+ params .vsmpassword = this .prefillContent .vsmpassword ? . value || null
1149+
1150+ const hostname = this .prefillContent .vCenterHost ? . value || null
1151+ const dcName = this .prefillContent .vCenterDatacenter ? . value || null
11521152 let url = null
11531153 if (hostname .indexOf (' http://' ) === - 1 ) {
11541154 url = [' http://' , hostname].join (' ' )
@@ -1165,10 +1165,10 @@ export default {
11651165 if (hypervisor === ' VMware' ) {
11661166 const vmwareData = {}
11671167 vmwareData .zoneId = this .stepData .zoneReturned .id
1168- vmwareData .username = this .prefillContent .vCenterUsername ? this . prefillContent . vCenterUsername . value : null
1169- vmwareData .password = this .prefillContent .vCenterPassword ? this . prefillContent . vCenterPassword . value : null
1170- vmwareData .name = this .prefillContent .vCenterDatacenter ? this . prefillContent . vCenterDatacenter . value : null
1171- vmwareData .vcenter = this .prefillContent .vCenterHost ? this . prefillContent . vCenterHost . value : null
1168+ vmwareData .username = this .prefillContent .vCenterUsername ? . value || null
1169+ vmwareData .password = this .prefillContent .vCenterPassword ? . value || null
1170+ vmwareData .name = this .prefillContent .vCenterDatacenter ? . value || null
1171+ vmwareData .vcenter = this .prefillContent .vCenterHost ? . value || null
11721172
11731173 try {
11741174 if (! this .stepData .stepMove .includes (' addVmwareDc' )) {
@@ -1213,10 +1213,10 @@ export default {
12131213 hostData .clusterid = this .stepData .clusterReturned .id
12141214 hostData .hypervisor = this .stepData .clusterReturned .hypervisortype
12151215 hostData .clustertype = this .stepData .clusterReturned .clustertype
1216- hostData .hosttags = this .prefillContent .hostTags ? this . prefillContent . hostTags . value : null
1217- hostData .username = this .prefillContent .hostUserName ? this . prefillContent . hostUserName . value : null
1218- hostData .password = this .prefillContent .hostPassword ? this . prefillContent . hostPassword . value : null
1219- const hostname = this .prefillContent .hostName ? this . prefillContent . hostName . value : null
1216+ hostData .hosttags = this .prefillContent .hostTags ? . value || null
1217+ hostData .username = this .prefillContent .hostUserName ? . value || null
1218+ hostData .password = this .prefillContent .hostPassword ? . value || null
1219+ const hostname = this .prefillContent .hostName ? . value || null
12201220 let url = null
12211221 if (hostname .indexOf (' http://' ) === - 1 ) {
12221222 url = [' http://' , hostname].join (' ' )
@@ -1227,8 +1227,8 @@ export default {
12271227 const hypervisor = this .prefillContent .hypervisor .value
12281228
12291229 if (hypervisor === ' Ovm' ) {
1230- hostData .agentusername = this .prefillContent .agentUserName ? this . prefillContent . agentUserName . value : null
1231- hostData .agentpassword = this .prefillContent .agentPassword ? this . prefillContent . agentPassword . value : null
1230+ hostData .agentusername = this .prefillContent .agentUserName ? . value || null
1231+ hostData .agentpassword = this .prefillContent .agentPassword ? . value || null
12321232 }
12331233
12341234 if (this .prefillContent .localstorageenabledforsystemvm .value ) {
@@ -1389,7 +1389,7 @@ export default {
13891389 this .addStep (' message.creating.secondary.storage' , ' secondaryResource' )
13901390
13911391 const params = {}
1392- params .name = this .prefillContent .secondaryStorageName ? this . prefillContent . secondaryStorageName . value : null
1392+ params .name = this .prefillContent .secondaryStorageName ? . value || null
13931393 if (this .prefillContent .secondaryStorageProvider .value === ' NFS' ) {
13941394 const nfsServer = this .prefillContent .secondaryStorageServer .value
13951395 const path = this .prefillContent .secondaryStoragePath .value
@@ -1421,7 +1421,7 @@ export default {
14211421 params[' details[2].key' ] = ' bucket'
14221422 params[' details[2].value' ] = this .prefillContent .secondaryStorageBucket .value
14231423 params[' details[3].key' ] = ' usehttps'
1424- params[' details[3].value' ] = this .prefillContent .secondaryStorageHttps ? this . prefillContent . secondaryStorageHttps . value : false
1424+ params[' details[3].value' ] = this .prefillContent .secondaryStorageHttps ? . value || false
14251425
14261426 let index = 4
14271427 if (this .prefillContent .secondaryStorageEndpoint &&
0 commit comments