ui: primarystorage linstor fixes (#6481)

If Linstor protocol is selected it makes no sense to show other
providers as Linstor only works with the Linstor provider.
And also the install wizard doesn't use the correct provider for linstor.

This changes were already merged for 4.16.1.0 see: #5672
But I don't know why they weren't merged to main back than, maybe I don't know how cloudstack's
merge/PR's work.
But this should be definitely merged to 4.17.* and main
This commit is contained in:
Peinthor Rene 2022-06-22 15:24:02 +02:00 committed by GitHub
parent f818ecc17d
commit 355fdaa821
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 18 deletions

View File

@ -209,24 +209,26 @@
<a-input v-model:value="form.vCenterDataStore" :placeholder="$t('message.datastore.description')"/>
</a-form-item>
</div>
<a-form-item name="provider" ref="provider">
<template #label>
<tooltip-label :title="$t('label.providername')" :tooltip="apiParams.provider.description"/>
</template>
<a-select
v-model:value="form.provider"
@change="updateProviderAndProtocol"
showSearch
optionFilterProp="label"
:filterOption="(input, option) => {
return option.children[0].children.toLowerCase().indexOf(input.toLowerCase()) >= 0
}"
:placeholder="apiParams.provider.description">
<a-select-option :value="provider" v-for="(provider,idx) in providers" :key="idx">
{{ provider }}
</a-select-option>
</a-select>
</a-form-item>
<div v-if="form.protocol !== 'Linstor'">
<a-form-item name="provider" ref="provider">
<template #label>
<tooltip-label :title="$t('label.providername')" :tooltip="apiParams.provider.description"/>
</template>
<a-select
v-model:value="form.provider"
@change="updateProviderAndProtocol"
showSearch
optionFilterProp="label"
:filterOption="(input, option) => {
return option.children[0].children.toLowerCase().indexOf(input.toLowerCase()) >= 0
}"
:placeholder="apiParams.provider.description">
<a-select-option :value="provider" v-for="(provider,idx) in providers" :key="idx">
{{ provider }}
</a-select-option>
</a-select>
</a-form-item>
</div>
<div v-if="form.provider !== 'DefaultPrimary' && form.provider !== 'PowerFlex' && form.provider !== 'Linstor'">
<a-form-item name="managed" ref="managed">
<template #label>

View File

@ -1343,6 +1343,7 @@ export default {
url = this.rbdURL(rbdmonitor, rbdpool, rbdid, rbdsecret)
} else if (protocol === 'Linstor') {
url = this.linstorURL(server)
params.provider = 'Linstor'
params['details[0].resourceGroup'] = this.prefillContent.primaryStorageLinstorResourceGroup
} else if (protocol === 'vmfs' || protocol === 'datastorecluster') {
let path = this.prefillContent.primaryStorageVmfsDatacenter