You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by nv...@apache.org on 2022/04/19 11:49:48 UTC

[cloudstack] branch main updated: ui: remove mandatory rule on root disk controller field while registering / updating a template (#6279)

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

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


The following commit(s) were added to refs/heads/main by this push:
     new 8a1b1250e89 ui: remove mandatory rule on root disk controller field while registering / updating a template (#6279)
8a1b1250e89 is described below

commit 8a1b1250e8971d08f6fec4818b4bbea1e76e153d
Author: Pearl Dsilva <pe...@gmail.com>
AuthorDate: Tue Apr 19 17:19:38 2022 +0530

    ui: remove mandatory rule on root disk controller field while registering / updating a template (#6279)
---
 ui/src/views/image/RegisterOrUploadTemplate.vue | 5 +++--
 ui/src/views/image/UpdateTemplate.vue           | 1 -
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/ui/src/views/image/RegisterOrUploadTemplate.vue b/ui/src/views/image/RegisterOrUploadTemplate.vue
index 64965a12af0..8eb7418a5a7 100644
--- a/ui/src/views/image/RegisterOrUploadTemplate.vue
+++ b/ui/src/views/image/RegisterOrUploadTemplate.vue
@@ -398,7 +398,6 @@ export default {
         hypervisor: [{ type: 'number', required: true, message: this.$t('message.error.select') }],
         format: [{ required: true, message: this.$t('message.error.select') }],
         checksum: [{ required: true, message: this.$t('message.error.required.input') }],
-        rootDiskControllerType: [{ required: true, message: this.$t('message.error.select') }],
         ostypeid: [{ required: true, message: this.$t('message.error.select') }],
         groupenabled: [{ type: 'array' }]
       })
@@ -809,7 +808,9 @@ export default {
             const formattedDetailData = {}
             switch (key) {
               case 'rootDiskControllerType':
-                formattedDetailData['details[0].rootDiskController'] = input
+                if (input) {
+                  formattedDetailData['details[0].rootDiskController'] = input
+                }
                 break
               case 'nicAdapterType':
                 formattedDetailData['details[0].nicAdapter'] = input
diff --git a/ui/src/views/image/UpdateTemplate.vue b/ui/src/views/image/UpdateTemplate.vue
index 2e4e9faddce..8ecbee60b30 100644
--- a/ui/src/views/image/UpdateTemplate.vue
+++ b/ui/src/views/image/UpdateTemplate.vue
@@ -196,7 +196,6 @@ export default {
       this.rules = reactive({
         name: [{ required: true, message: this.$t('message.error.required.input') }],
         displaytext: [{ required: true, message: this.$t('message.error.required.input') }],
-        rootDiskController: [{ required: true, message: this.$t('message.error.select') }],
         ostypeid: [{ required: true, message: this.$t('message.error.select') }]
       })
       const resourceFields = ['name', 'displaytext', 'passwordenabled', 'ostypeid', 'isdynamicallyscalable']