You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ro...@apache.org on 2021/09/10 12:02:56 UTC

[cloudstack] branch 4.15 updated: ui: show nicAdapter selection for VMware non-readfromova template (#5429)

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

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


The following commit(s) were added to refs/heads/4.15 by this push:
     new eba577c  ui: show nicAdapter selection for VMware non-readfromova template (#5429)
eba577c is described below

commit eba577c0a96d5758abbc3d616656906956e57217
Author: Abhishek Kumar <ab...@gmail.com>
AuthorDate: Fri Sep 10 17:32:36 2021 +0530

    ui: show nicAdapter selection for VMware non-readfromova template (#5429)
    
    * ui: show nicAdapter selection for non-readfromova template
    
    Signed-off-by: Abhishek Kumar <ab...@gmail.com>
    
    * show keyboardcontroller and ostype elements in different rows
    
    Signed-off-by: Abhishek Kumar <ab...@gmail.com>
---
 ui/src/views/image/RegisterOrUploadTemplate.vue | 78 ++++++++++++++-----------
 1 file changed, 45 insertions(+), 33 deletions(-)

diff --git a/ui/src/views/image/RegisterOrUploadTemplate.vue b/ui/src/views/image/RegisterOrUploadTemplate.vue
index 4e3ed43..0dececc 100644
--- a/ui/src/views/image/RegisterOrUploadTemplate.vue
+++ b/ui/src/views/image/RegisterOrUploadTemplate.vue
@@ -220,7 +220,7 @@
         </a-form-item>
 
         <a-row :gutter="12" v-if="hyperKVMShow || hyperVMWShow">
-          <a-col :md="24" :lg="24" v-if="hyperKVMShow || (hyperVMWShow && !deployasis)">
+          <a-col :md="24" :lg="hyperKVMShow ? 24 : 12" v-if="hyperKVMShow || (hyperVMWShow && !deployasis)">
             <a-form-item :label="$t('label.rootdiskcontrollertype')">
               <a-select
                 v-decorator="['rootDiskControllerType', {
@@ -240,10 +240,10 @@
               </a-select>
             </a-form-item>
           </a-col>
-          <a-col :md="24" :lg="24">
-            <a-form-item v-if="hyperVMWShow && !deployasis" :label="$t('label.keyboardtype')">
+          <a-col :md="24" :lg="12" v-if="hyperVMWShow && !deployasis">
+            <a-form-item :label="$t('label.nicadaptertype')">
               <a-select
-                v-decorator="['keyboardType', {
+                v-decorator="['nicAdapterType', {
                   rules: [
                     {
                       required: false,
@@ -251,41 +251,53 @@
                     }
                   ]
                 }]"
-                :placeholder="$t('label.keyboard')">
-                <a-select-option v-for="opt in keyboardType.opts" :key="opt.id">
-                  {{ opt.name || opt.description }}
-                </a-select-option>
-              </a-select>
-            </a-form-item>
-          </a-col>
-        </a-row>
-        <a-row :gutter="12" v-if="!hyperVMWShow || (hyperVMWShow && !deployasis)">
-          <a-col :md="24" :lg="24">
-            <a-form-item :label="$t('label.ostypeid')">
-              <a-select
-                showSearch
-                optionFilterProp="children"
-                :filterOption="(input, option) => {
-                  return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-                }"
-                v-decorator="['ostypeid', {
-                  initialValue: defaultOsId,
-                  rules: [
-                    {
-                      required: true,
-                      message: `${this.$t('message.error.select')}`
-                    }
-                  ]
-                }]"
-                :loading="osTypes.loading"
-                :placeholder="apiParams.ostypeid.description">
-                <a-select-option v-for="opt in osTypes.opts" :key="opt.id">
+                :placeholder="$t('label.nicadaptertype')">
+                <a-select-option v-for="opt in nicAdapterType.opts" :key="opt.id">
                   {{ opt.name || opt.description }}
                 </a-select-option>
               </a-select>
             </a-form-item>
           </a-col>
         </a-row>
+        <a-form-item :label="$t('label.keyboardtype')" :lg="12" v-if="hyperVMWShow && !deployasis">
+          <a-select
+            v-decorator="['keyboardType', {
+              rules: [
+                {
+                  required: false,
+                  message: `${this.$t('message.error.select')}`
+                }
+              ]
+            }]"
+            :placeholder="$t('label.keyboard')">
+            <a-select-option v-for="opt in keyboardType.opts" :key="opt.id">
+              {{ opt.name || opt.description }}
+            </a-select-option>
+          </a-select>
+        </a-form-item>
+        <a-form-item :label="$t('label.ostypeid')" v-if="!hyperVMWShow || (hyperVMWShow && !deployasis)">
+          <a-select
+            showSearch
+            optionFilterProp="children"
+            :filterOption="(input, option) => {
+              return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+            }"
+            v-decorator="['ostypeid', {
+              initialValue: defaultOsId,
+              rules: [
+                {
+                  required: true,
+                  message: `${this.$t('message.error.select')}`
+                }
+              ]
+            }]"
+            :loading="osTypes.loading"
+            :placeholder="apiParams.ostypeid.description">
+            <a-select-option v-for="opt in osTypes.opts" :key="opt.id">
+              {{ opt.name || opt.description }}
+            </a-select-option>
+          </a-select>
+        </a-form-item>
         <a-row :gutter="12">
           <a-col :md="24" :lg="24">
             <a-form-item>