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/11/27 18:35:21 UTC

[GitHub] [cloudstack] Damans227 opened a new pull request #5725: simplify code using object shorthand in storage views

Damans227 opened a new pull request #5725:
URL: https://github.com/apache/cloudstack/pull/5725


   ### Description
   
   - This PR is related to issue: `ui: Simplify code` #4956
   - It uses [object shorthand notation from Javascript - ES6 ](https://alligator.io/js/object-property-shorthand-es6/)to simplify the `.vue` files in storage view. 
   
   
   <!--- Describe your changes in DETAIL - And how has behaviour functionally changed. -->
   
   <!-- For new features, provide link to FS, dev ML discussion etc. -->
   <!-- In case of bug fix, the expected and actual behaviours, steps to reproduce. -->
   
   <!-- When "Fixes: #<id>" is specified, the issue/PR will automatically be closed when this PR gets merged -->
   <!-- For addressing multiple issues/PRs, use multiple "Fixes: #<id>" -->
   <!-- Fixes: # -->
   
   <!--- ********************************************************************************* -->
   <!--- NOTE: AUTOMATATION USES THE DESCRIPTIONS TO SET LABELS AND PRODUCE DOCUMENTATION. -->
   <!--- PLEASE PUT AN 'X' in only **ONE** box -->
   <!--- ********************************************************************************* -->
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [ ] Bug fix (non-breaking change which fixes an issue)
   - [ ] Enhancement (improves an existing feature and functionality)
   - [x] Cleanup (Code refactoring and cleanup, that may add test cases)
   
   ### Feature/Enhancement Scale or Bug Severity
   
   #### Feature/Enhancement Scale
   
   - [ ] Major
   - [ ] Minor
   
   #### Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [ ] Major
   - [ ] Minor
   - [ ] Trivial
   
   
   ### Screenshots (if appropriate):
   
   
   ### How Has This Been Tested?
   <!-- Please describe in detail how you tested your changes. -->
   <!-- Include details of your testing environment, and the tests you ran to -->
   <!-- see how your change affects other areas of the code, etc. -->
   
   
   <!-- Please read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md) document -->
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] Damans227 commented on pull request #5725: simplify code using object shorthand in storage views

Posted by GitBox <gi...@apache.org>.
Damans227 commented on pull request #5725:
URL: https://github.com/apache/cloudstack/pull/5725#issuecomment-987905177


   > While using object shorthand is a good idea, creating variables with empty / null / static values just to be returned a couple of lines down can actually reduce the readability. @Damans227 Can you look at other areas where doing so will make reading the code easier or simplify it ? Thanks
   
   That makes sense. I will go ahead and close this PR. 


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] utchoang commented on pull request #5725: simplify code using object shorthand in storage views

Posted by GitBox <gi...@apache.org>.
utchoang commented on pull request #5725:
URL: https://github.com/apache/cloudstack/pull/5725#issuecomment-987639800


   @davidjumani In my opinion, the shorthand object does not apply to the data() object, but only to the objects that are used in the handling functions of the method, mounted, created,...? What do you think?


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] utchoang commented on a change in pull request #5725: simplify code using object shorthand in storage views

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



##########
File path: ui/src/views/storage/AttachVolume.vue
##########
@@ -59,9 +59,11 @@ export default {
     }
   },
   data () {
+    let virtualmachines = [];

Review comment:
       Apply for the same changes




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] davidjumani commented on pull request #5725: simplify code using object shorthand in storage views

Posted by GitBox <gi...@apache.org>.
davidjumani commented on pull request #5725:
URL: https://github.com/apache/cloudstack/pull/5725#issuecomment-987842842


   While using object shorthand is a good idea, creating variables with empty / null / static values just to be returned a couple of lines down can actually reduce the readability. @Damans227 Can you look at other areas where doing so will make reading the code easier or simplify it ? Thanks


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] Damans227 commented on pull request #5725: simplify code using object shorthand in storage views

Posted by GitBox <gi...@apache.org>.
Damans227 commented on pull request #5725:
URL: https://github.com/apache/cloudstack/pull/5725#issuecomment-980782332


   @davidjumani @utchoang  Ptal, thx! 


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] blueorangutan commented on pull request #5725: simplify code using object shorthand in storage views

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5725:
URL: https://github.com/apache/cloudstack/pull/5725#issuecomment-987664414


   @sureshanaparti a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] Damans227 closed pull request #5725: simplify code using object shorthand in storage views

Posted by GitBox <gi...@apache.org>.
Damans227 closed pull request #5725:
URL: https://github.com/apache/cloudstack/pull/5725


   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] utchoang commented on a change in pull request #5725: simplify code using object shorthand in storage views

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



##########
File path: ui/src/views/storage/AttachVolume.vue
##########
@@ -59,9 +59,11 @@ export default {
     }
   },
   data () {
+    let virtualmachines = [];

Review comment:
       Please remove the ";" character




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] sureshanaparti commented on pull request #5725: simplify code using object shorthand in storage views

Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on pull request #5725:
URL: https://github.com/apache/cloudstack/pull/5725#issuecomment-987664170


   @blueorangutan ui


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] blueorangutan commented on pull request #5725: simplify code using object shorthand in storage views

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5725:
URL: https://github.com/apache/cloudstack/pull/5725#issuecomment-987672424


   UI build: :heavy_multiplication_x:
    (SL-JID-885)


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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