You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2021/01/22 12:45:41 UTC

[GitHub] [cloudstack] Pearl1594 opened a new pull request #4611: UI Storage Pool Tags: unable to delete last tag

Pearl1594 opened a new pull request #4611:
URL: https://github.com/apache/cloudstack/pull/4611


   ### Description
   
   This PR attempts to fix https://github.com/apache/cloudstack/issues/4610 - wherein the last tag added to a host/storage pool doesn't get deleted
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [X] Bug fix (non-breaking change which fixes an issue)
   - [ ] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
   
   ### Feature/Enhancement Scale or Bug Severity
   
   #### Feature/Enhancement Scale
   
   - [ ] Major
   - [X] Minor
   
   #### Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [ ] Major
   - [X] Minor
   - [ ] Trivial
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] Pearl1594 commented on a change in pull request #4611: UI Storage Pool Tags: unable to delete last tag

Posted by GitBox <gi...@apache.org>.
Pearl1594 commented on a change in pull request #4611:
URL: https://github.com/apache/cloudstack/pull/4611#discussion_r563468761



##########
File path: ui/src/views/AutogenView.vue
##########
@@ -957,7 +957,8 @@ export default {
             if (param.name !== key) {
               continue
             }
-            if (input === undefined || input === null || input === '') {
+            if (input === undefined || input === null || (input === '' &&

Review comment:
       @utchoang doing so would lead to the second condition not being evaluated when the input param is empty('') and the api is one among - update physicalnetwork/storagepool/host as the first condition evaluates to true - because (!input) = string not being undefined, null or empty.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] harikrishna-patnala commented on a change in pull request #4611: UI Storage Pool Tags: unable to delete last tag

Posted by GitBox <gi...@apache.org>.
harikrishna-patnala commented on a change in pull request #4611:
URL: https://github.com/apache/cloudstack/pull/4611#discussion_r563441872



##########
File path: ui/src/views/AutogenView.vue
##########
@@ -957,7 +957,8 @@ export default {
             if (param.name !== key) {
               continue
             }
-            if (input === undefined || input === null || input === '') {
+            if (input === undefined || input === null || (input === '' &&
+              !['updateStoragePool', 'updateHost'].includes(action.api))) {

Review comment:
       @Pearl1594 we have physical networks tags also, I just checked we could not delete the tag on physical network too, can you please add that here.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] Pearl1594 commented on a change in pull request #4611: UI Storage Pool Tags: unable to delete last tag

Posted by GitBox <gi...@apache.org>.
Pearl1594 commented on a change in pull request #4611:
URL: https://github.com/apache/cloudstack/pull/4611#discussion_r563468761



##########
File path: ui/src/views/AutogenView.vue
##########
@@ -957,7 +957,8 @@ export default {
             if (param.name !== key) {
               continue
             }
-            if (input === undefined || input === null || input === '') {
+            if (input === undefined || input === null || (input === '' &&

Review comment:
       @utchoang doing so would lead to the second condition not being evaluated when the input param is empty('') and the api is one among - update physicalnetwork/storagepool/host as the first condition evaluates to true - because (!input) = string not being undefined, null or empty.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] utchoang commented on a change in pull request #4611: UI Storage Pool Tags: unable to delete last tag

Posted by GitBox <gi...@apache.org>.
utchoang commented on a change in pull request #4611:
URL: https://github.com/apache/cloudstack/pull/4611#discussion_r563460413



##########
File path: ui/src/views/AutogenView.vue
##########
@@ -957,7 +957,8 @@ export default {
             if (param.name !== key) {
               continue
             }
-            if (input === undefined || input === null || input === '') {
+            if (input === undefined || input === null || (input === '' &&

Review comment:
       @Pearl1594 In my opinion it will be cleaner like this
   `if (!input || (input === '' && !['updateStoragePool', 'updateHost'].includes(action.api)))` {

##########
File path: ui/src/views/AutogenView.vue
##########
@@ -957,7 +957,8 @@ export default {
             if (param.name !== key) {
               continue
             }
-            if (input === undefined || input === null || input === '') {
+            if (input === undefined || input === null || (input === '' &&

Review comment:
       I understood! Thanks @Pearl1594




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] utchoang commented on a change in pull request #4611: UI Storage Pool Tags: unable to delete last tag

Posted by GitBox <gi...@apache.org>.
utchoang commented on a change in pull request #4611:
URL: https://github.com/apache/cloudstack/pull/4611#discussion_r563480419



##########
File path: ui/src/views/AutogenView.vue
##########
@@ -957,7 +957,8 @@ export default {
             if (param.name !== key) {
               continue
             }
-            if (input === undefined || input === null || input === '') {
+            if (input === undefined || input === null || (input === '' &&

Review comment:
       I understood! Thanks @Pearl1594




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] utchoang commented on a change in pull request #4611: UI Storage Pool Tags: unable to delete last tag

Posted by GitBox <gi...@apache.org>.
utchoang commented on a change in pull request #4611:
URL: https://github.com/apache/cloudstack/pull/4611#discussion_r563460413



##########
File path: ui/src/views/AutogenView.vue
##########
@@ -957,7 +957,8 @@ export default {
             if (param.name !== key) {
               continue
             }
-            if (input === undefined || input === null || input === '') {
+            if (input === undefined || input === null || (input === '' &&

Review comment:
       @Pearl1594 In my opinion it will be cleaner like this
   `if (!input || (input === '' && !['updateStoragePool', 'updateHost'].includes(action.api)))` {




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] rhtyd merged pull request #4611: UI Storage Pool Tags: unable to delete last tag

Posted by GitBox <gi...@apache.org>.
rhtyd merged pull request #4611:
URL: https://github.com/apache/cloudstack/pull/4611


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] harikrishna-patnala commented on a change in pull request #4611: UI Storage Pool Tags: unable to delete last tag

Posted by GitBox <gi...@apache.org>.
harikrishna-patnala commented on a change in pull request #4611:
URL: https://github.com/apache/cloudstack/pull/4611#discussion_r563441872



##########
File path: ui/src/views/AutogenView.vue
##########
@@ -957,7 +957,8 @@ export default {
             if (param.name !== key) {
               continue
             }
-            if (input === undefined || input === null || input === '') {
+            if (input === undefined || input === null || (input === '' &&
+              !['updateStoragePool', 'updateHost'].includes(action.api))) {

Review comment:
       @Pearl1594 we have physical networks tags also, I just checked we could not delete the tag on physical network too, can you please add that here.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] rhtyd merged pull request #4611: UI Storage Pool Tags: unable to delete last tag

Posted by GitBox <gi...@apache.org>.
rhtyd merged pull request #4611:
URL: https://github.com/apache/cloudstack/pull/4611


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org