UI: Fix projects metrics on dashboard#10651
Conversation
|
@bernardodemarco a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress. |
|
UI build: ✔️ |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## 4.19 #10651 +/- ##
============================================
+ Coverage 15.16% 15.89% +0.72%
- Complexity 11328 11329 +1
============================================
Files 5415 5046 -369
Lines 474824 445155 -29669
Branches 57912 52704 -5208
============================================
- Hits 72014 70758 -1256
+ Misses 394757 366490 -28267
+ Partials 8053 7907 -146
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@bernardodemarco , I see no difference in qa. Is there some reason why no difference would be shown there? It is 4.20 , so does that mean the bug is non-existent above 4.19? |
|
@DaanHoogland, to reproduce the bug, the project must not be in the same domain as the account accessing the dashboard is. I've recorded a video showcasing it: 2025-04-05.16-00-17.mp4 |
* 4.20: xenserver: do not destroy halted hypervisor vm (#9175) define the limit of projects through the UI (#10652) fix projects metrics on dashboard (#10651) systemvm: Bump systemvm template version to debian 12.10 (#10628) Enhance VPC Network Tier form to auto-populate Gateway, and Netmask (#10617)


Description
Currently, the dashboard for projects faces some inconsistencies for the amount of resources consumed by the project. They can be noticed when accessing the project's view, with an account that is not in the same domain as the project is.
Therefore, in scenarios in which a
RootAdminaccesses the dashboard of a project that belongs to any subdomain of theROOTdomain (e.g.ROOT/d1), the dashboard will display the project's storage metrics asNaNandundefinedand the compute metrics will be omitted:The root cause of the bug is that, when the project's attributes are fetched from the
listProjectsAPI, the parameterlistallis not specified:cloudstack/ui/src/views/dashboard/UsageDashboard.vue
Lines 461 to 469 in ee94ae5
As a consequence of that, the UI is not able to render the projects metrics. This PR fixes this bug.
Types of changes
Feature/Enhancement Scale or Bug Severity
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
d1), and an account (d1) and a project (project-d1) within itproject-d1view with aRootAdminaccount