ui-primary-storage: hide provider if Linstor protocol (#5672)

* ui-primary-storage: hide provider if Linstor protocol

If Linstor protocol is selected it makes no sense to show other
providers as Linstor only works with the Linstor provider.

This was removed with the fix for #5613, that probably resulted from a
bad merge resolving from my part.

* ui-wizard: set correct provider for Linstor protocol
This commit is contained in:
Peinthor Rene 2021-11-18 09:14:52 +01:00 committed by GitHub
parent a8e7315e53
commit e93d67444d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 15 deletions

View File

@ -180,21 +180,23 @@
<a-input v-decorator="['vCenterDataStore', { rules: [{ required: true, message: `${$t('label.required')}` }] }]"/>
</a-form-item>
</div>
<a-form-item>
<tooltip-label slot="label" :title="$t('label.providername')" :tooltip="apiParams.provider.description"/>
<a-select
v-decorator="['provider', { initialValue: providerSelected, rules: [{ required: true, message: `${$t('label.required')}`}] }]"
@change="updateProviderAndProtocol"
showSearch
optionFilterProp="children"
:filterOption="(input, option) => {
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
}" >
<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="protocolSelected !== 'Linstor'">
<a-form-item>
<tooltip-label slot="label" :title="$t('label.providername')" :tooltip="apiParams.provider.description"/>
<a-select
v-decorator="['provider', { initialValue: providerSelected, rules: [{ required: true, message: `${$t('label.required')}`}] }]"
@change="updateProviderAndProtocol"
showSearch
optionFilterProp="children"
:filterOption="(input, option) => {
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
}" >
<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="this.providerSelected !== 'DefaultPrimary' && this.providerSelected !== 'PowerFlex' && this.providerSelected !== 'Linstor'">
<a-form-item>
<tooltip-label slot="label" :title="$t('label.ismanaged')" :tooltip="apiParams.managed.description"/>

View File

@ -1340,6 +1340,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.value
} else if (protocol === 'vmfs' || protocol === 'datastorecluster') {
let path = this.prefillContent.primaryStorageVmfsDatacenter.value