Skip to content

Commit 355fdaa

Browse files
authored
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
1 parent f818ecc commit 355fdaa

2 files changed

Lines changed: 21 additions & 18 deletions

File tree

ui/src/views/infra/AddPrimaryStorage.vue

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -209,24 +209,26 @@
209209
<a-input v-model:value="form.vCenterDataStore" :placeholder="$t('message.datastore.description')"/>
210210
</a-form-item>
211211
</div>
212-
<a-form-item name="provider" ref="provider">
213-
<template #label>
214-
<tooltip-label :title="$t('label.providername')" :tooltip="apiParams.provider.description"/>
215-
</template>
216-
<a-select
217-
v-model:value="form.provider"
218-
@change="updateProviderAndProtocol"
219-
showSearch
220-
optionFilterProp="label"
221-
:filterOption="(input, option) => {
222-
return option.children[0].children.toLowerCase().indexOf(input.toLowerCase()) >= 0
223-
}"
224-
:placeholder="apiParams.provider.description">
225-
<a-select-option :value="provider" v-for="(provider,idx) in providers" :key="idx">
226-
{{ provider }}
227-
</a-select-option>
228-
</a-select>
229-
</a-form-item>
212+
<div v-if="form.protocol !== 'Linstor'">
213+
<a-form-item name="provider" ref="provider">
214+
<template #label>
215+
<tooltip-label :title="$t('label.providername')" :tooltip="apiParams.provider.description"/>
216+
</template>
217+
<a-select
218+
v-model:value="form.provider"
219+
@change="updateProviderAndProtocol"
220+
showSearch
221+
optionFilterProp="label"
222+
:filterOption="(input, option) => {
223+
return option.children[0].children.toLowerCase().indexOf(input.toLowerCase()) >= 0
224+
}"
225+
:placeholder="apiParams.provider.description">
226+
<a-select-option :value="provider" v-for="(provider,idx) in providers" :key="idx">
227+
{{ provider }}
228+
</a-select-option>
229+
</a-select>
230+
</a-form-item>
231+
</div>
230232
<div v-if="form.provider !== 'DefaultPrimary' && form.provider !== 'PowerFlex' && form.provider !== 'Linstor'">
231233
<a-form-item name="managed" ref="managed">
232234
<template #label>

ui/src/views/infra/zone/ZoneWizardLaunchZone.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1343,6 +1343,7 @@ export default {
13431343
url = this.rbdURL(rbdmonitor, rbdpool, rbdid, rbdsecret)
13441344
} else if (protocol === 'Linstor') {
13451345
url = this.linstorURL(server)
1346+
params.provider = 'Linstor'
13461347
params['details[0].resourceGroup'] = this.prefillContent.primaryStorageLinstorResourceGroup
13471348
} else if (protocol === 'vmfs' || protocol === 'datastorecluster') {
13481349
let path = this.prefillContent.primaryStorageVmfsDatacenter

0 commit comments

Comments
 (0)