ui: Refresh Usage dashboard when swapping between Project and Default view#5447
ui: Refresh Usage dashboard when swapping between Project and Default view#5447yadvr merged 1 commit intoapache:mainfrom
Conversation
|
@Pearl1594 a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress. |
|
UI build: ✔️ |
yadvr
left a comment
There was a problem hiding this comment.
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. |
|
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. |
| (state, getters) => getters.project, | ||
| (newValue, oldValue) => { | ||
| if (newValue && newValue.id) { | ||
| if (newValue && newValue !== oldValue) { |
There was a problem hiding this comment.
@Pearl1594 why not compare ids itself? This condition might be as good as if (newValue) {
There was a problem hiding this comment.
there is no id for default view @shwstppr
Description
This PR fixes #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
Types of changes
Feature/Enhancement Scale or Bug Severity
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
Followed the steps mentioned in #5440 - and observed the usage dashboard properly updated.