This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch 4.17
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/4.17 by this push:
     new 355fdaa821 ui: primarystorage linstor fixes (#6481)
355fdaa821 is described below

commit 355fdaa82128beed32f8584434165ff943e31ca3
Author: Peinthor Rene <[email protected]>
AuthorDate: Wed Jun 22 15:24:02 2022 +0200

    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
---
 ui/src/views/infra/AddPrimaryStorage.vue         | 38 +++++++++++++-----------
 ui/src/views/infra/zone/ZoneWizardLaunchZone.vue |  1 +
 2 files changed, 21 insertions(+), 18 deletions(-)

diff --git a/ui/src/views/infra/AddPrimaryStorage.vue 
b/ui/src/views/infra/AddPrimaryStorage.vue
index 3c2e34e113..02dd30baed 100644
--- a/ui/src/views/infra/AddPrimaryStorage.vue
+++ b/ui/src/views/infra/AddPrimaryStorage.vue
@@ -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>
diff --git a/ui/src/views/infra/zone/ZoneWizardLaunchZone.vue 
b/ui/src/views/infra/zone/ZoneWizardLaunchZone.vue
index 377afe7005..432523c901 100644
--- a/ui/src/views/infra/zone/ZoneWizardLaunchZone.vue
+++ b/ui/src/views/infra/zone/ZoneWizardLaunchZone.vue
@@ -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

Reply via email to