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/09/14 04:34:30 UTC

[GitHub] [cloudstack] Pearl1594 opened a new pull request #5447: ui: Refresh Usage dashboard when swapping between Project and Default view

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


   ### Description
   
   This PR fixes https://github.com/apache/cloudstack/issues/5440 - where we notice that when logged in with a User role, and on swapping between project and default view, the resource count details on the Usage dashboard isn't properly updated
   <!--- 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)
   - [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
   
   #### Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [ ] Major
   - [X] Minor
   - [ ] Trivial
   
   
   ### Screenshots (if appropriate):
   
   
   ### How Has This Been Tested?
   Followed the steps mentioned in https://github.com/apache/cloudstack/issues/5440 - and observed the usage dashboard properly updated.
   
   
   <!-- 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] Pearl1594 commented on pull request #5447: ui: Refresh Usage dashboard when swapping between Project and Default view

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


   > LGTM but instead of comparing objects should we compare the ID of new and old values?
   
   @rhtyd There isn't an id (project ID) for default view - which was the reason for not refreshing in the earlier case.
   
   


-- 
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] Pearl1594 commented on pull request #5447: ui: Refresh Usage dashboard when swapping between Project and Default view

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


   @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] rhtyd merged pull request #5447: ui: Refresh Usage dashboard when swapping between Project and Default view

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


   


-- 
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] Pearl1594 commented on a change in pull request #5447: ui: Refresh Usage dashboard when swapping between Project and Default view

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



##########
File path: ui/src/views/dashboard/UsageDashboard.vue
##########
@@ -137,7 +137,7 @@ export default {
     this.$store.watch(
       (state, getters) => getters.project,
       (newValue, oldValue) => {
-        if (newValue && newValue.id) {
+        if (newValue && newValue !== oldValue) {

Review comment:
       there is no id for default view @shwstppr 




-- 
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 #5447: ui: Refresh Usage dashboard when swapping between Project and Default view

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


   @Pearl1594 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] rhtyd commented on pull request #5447: ui: Refresh Usage dashboard when swapping between Project and Default view

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


   Ah okay that makes sense, maybe we can add a dummy ID of 0 for default view? But this change also LGTM if it works. 


-- 
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 #5447: ui: Refresh Usage dashboard when swapping between Project and Default view

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


   UI build: :heavy_check_mark:
   Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/5447 (SL-JID-647)


-- 
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] shwstppr commented on a change in pull request #5447: ui: Refresh Usage dashboard when swapping between Project and Default view

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



##########
File path: ui/src/views/dashboard/UsageDashboard.vue
##########
@@ -137,7 +137,7 @@ export default {
     this.$store.watch(
       (state, getters) => getters.project,
       (newValue, oldValue) => {
-        if (newValue && newValue.id) {
+        if (newValue && newValue !== oldValue) {

Review comment:
       @Pearl1594 why not compare ids itself? This condition might be as good as `if (newValue) {`




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