ui: Fix add primary store during Zone Deployment for PreSetup protocol (#4845)

Co-authored-by: Pearl Dsilva <pearl.dsilva@shapeblue.com>
This commit is contained in:
Pearl Dsilva 2021-03-22 12:13:21 +05:30 committed by GitHub
parent 58954354fd
commit 6262366d85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 3 deletions

View File

@ -351,7 +351,7 @@ export default {
}
},
{
title: 'label.SR.name',
title: 'label.sr.name',
key: 'primaryStorageSRLabel',
placeHolder: 'message.error.sr.namelabel',
required: true,

View File

@ -1283,7 +1283,7 @@ export default {
}
}
const server = this.prefillContent.primaryStorageServer ? this.prefillContent.primaryStorageServer.value : null
var server = this.prefillContent.primaryStorageServer ? this.prefillContent.primaryStorageServer.value : null
let url = ''
const protocol = this.prefillContent.primaryStorageProtocol.value
@ -1303,7 +1303,13 @@ export default {
params['details[0].password'] = this.prefillContent.primaryStorageSMBPassword.value
params['details[0].domain'] = this.prefillContent.primaryStorageSMBDomain.value
} else if (protocol === 'PreSetup') {
let path = this.prefillContent.primaryStoragePath.value
let path = ''
if (this.stepData.clusterReturned.hypervisortype === 'XenServer') {
path = this.prefillContent.primaryStorageSRLabel.value
server = 'localhost'
} else {
path = this.prefillContent.primaryStoragePath.value
}
if (path.substring(0, 1) !== '/') {
path = '/' + path
}