sureshanaparti commented on code in PR #11754:
URL: https://github.com/apache/cloudstack/pull/11754#discussion_r2416156270
##########
ui/src/views/storage/CreateVMFromBackup.vue:
##########
@@ -118,28 +118,17 @@ export default {
this.backupOffering = backupOfferings[0]
})
},
- fetchBackupRepository () {
- if (this.backupOffering.provider !== 'nas') {
- return
- }
- getAPI('listBackupRepositories', {
- id: this.backupOffering.externalid
- }).then(response => {
- const backupRepositories =
response.listbackuprepositoriesresponse.backuprepository || []
- this.backupRepository = backupRepositories[0]
- })
- },
populatePreFillData () {
this.vmdetails = this.resource.vmdetails
this.dataPreFill.zoneid = this.resource.zoneid
- this.dataPreFill.crosszoneinstancecreation =
this.backupRepository?.crosszoneinstancecreation ||
this.backupOffering.provider === 'dummy'
+ this.dataPreFill.crosszoneinstancecreation =
this.backupOffering?.crosszoneinstancecreation || this.backupOffering.provider
=== 'dummy'
this.dataPreFill.isIso = (this.vmdetails.isiso === 'true')
this.dataPreFill.backupid = this.resource.id
this.dataPreFill.computeofferingid = this.vmdetails.serviceofferingid
this.dataPreFill.templateid = this.vmdetails.templateid
this.dataPreFill.allowtemplateisoselection = true
this.dataPreFill.isoid = this.vmdetails.templateid
- this.dataPreFill.allowIpAddressesFetch = !this.resource.virtualmachineid
+ this.dataPreFill.allowIpAddressesFetch = this.resource.backupvmexpunged
Review Comment:
```suggestion
this.dataPreFill.allowIpAddressesFetch =
this.resource.isbackupvmexpunged
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]