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

dahn 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 e1fb2be835 Add check for update only name and/or description of disk 
offering (#6410)
e1fb2be835 is described below

commit e1fb2be835fc2e9da877c89a5414ecca6b260db3
Author: Bryan Lima <[email protected]>
AuthorDate: Mon Jun 27 08:24:37 2022 -0300

    Add check for update only name and/or description of disk offering (#6410)
    
    * Add check for update only name and/or description of disk offering
    
    * Add check to update only name and/or description of service offerings as 
well
---
 ui/src/views/AutogenView.vue | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/ui/src/views/AutogenView.vue b/ui/src/views/AutogenView.vue
index ff75a6d269..8d2d1353c3 100644
--- a/ui/src/views/AutogenView.vue
+++ b/ui/src/views/AutogenView.vue
@@ -1358,6 +1358,20 @@ export default {
         if ('id' in this.resource && action.params.map(i => { return i.name 
}).includes('id')) {
           params.id = this.resource.id
         }
+
+        if (['updateDiskOffering'].includes(action.api) && values.tags === 
this.resource.tags) {
+          delete values.tags
+        }
+
+        if (['updateServiceOffering'].includes(action.api)) {
+          if (values.hosttags === this.resource.hosttags) {
+            delete values.hosttags
+          }
+          if (values.storagetags === this.resource.storagetags) {
+            delete values.tags
+          }
+        }
+
         for (const key in values) {
           const input = values[key]
           for (const param of action.params) {

Reply via email to