ui: improve metrics api use in list views
Description
In UI for the list views it is regular API view by default and *Metrics API response may not be needed. *Metrics APIs will take more time to return response so this PR tries to improve the behaviour and enables calling regular API without metrics when metrics toggle is not enabled.
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)
- [x] Enhancement (improves an existing feature and functionality)
- [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
- [ ] build/CI
- [ ] test (unit or integration test code)
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
- [ ] Major
- [ ] Minor
Bug Severity
- [ ] BLOCKER
- [ ] Critical
- [ ] Major
- [ ] Minor
- [ ] Trivial
Screenshots (if appropriate):
https://github.com/user-attachments/assets/1806a6e5-a9d1-4a93-962f-ac0e41711c9f
How Has This Been Tested?
How did you try to break this feature and the system with this change?
@blueorangutan ui
@shwstppr a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.
UI build failed: :heavy_multiplication_x: (SL-JID-464)
@blueorangutan ui
@shwstppr a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 16.13%. Comparing base (
f4ca706) to head (f80f08b). Report is 2 commits behind head on 4.20.
Additional details and impacted files
@@ Coverage Diff @@
## 4.20 #9825 +/- ##
============================================
- Coverage 16.13% 16.13% -0.01%
+ Complexity 13219 13216 -3
============================================
Files 5651 5651
Lines 496748 496749 +1
Branches 60184 60184
============================================
- Hits 80139 80138 -1
- Misses 407686 407687 +1
- Partials 8923 8924 +1
| Flag | Coverage Δ | |
|---|---|---|
| uitests | 4.00% <ø> (+<0.01%) |
:arrow_up: |
| unittests | 16.98% <ø> (-0.01%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
UI build failed: :heavy_multiplication_x: (SL-JID-465)
@blueorangutan ui
@DaanHoogland a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.
UI build: :heavy_check_mark: Live QA URL: https://qa.cloudstack.cloud/simulator/pr/9825 (QA-JID-476)
@blueorangutan ui
@shwstppr a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.
UI build: :heavy_check_mark: Live QA URL: https://qa.cloudstack.cloud/simulator/pr/9825 (QA-JID-538)
@shwstppr can you please rebase this to 4.20 branch? Thanks - And is it ready for review?
@Pearl1594 this is ready but I would like to know other people's opinions on this. And I feel it would be better to keep this in 4.21 as it would affect almost all major table views
cc @rohityadavcloud @NuxRo @andrijapanicsb @weizhouapache @rajujith @borisstoyanov @vladimirpetrov @kiranchavala
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.
@blueorangutan ui
@shwstppr a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.
UI build: :heavy_check_mark: Live QA URL: https://qa.cloudstack.cloud/simulator/pr/9825 (QA-JID-602)
@shwstppr you said this should go in v21 but it is still based on the 4.20 branch.
I tested in qa and the cluster and host view changes look good. I do not see the zone change though. The clusters field seem to be already only in the metrics view; see https://qa.cloudstack.cloud/simulator/#/zone Did you mean something else?
@DaanHoogland @Pearl1594 I've rebased it to 4.20.today to get some more attention. Tagging some fellow contributors didn't get much interest 😄
I'm okay to move it back to main if you feel this might break things for a dot release.
@DaanHoogland for zone, Clusters column has been moved to metrics view now,
Before
After
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.
Conflicts needs to be fixed @shwstppr
@blueorangutan ui
@shwstppr a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.
UI build: :heavy_check_mark: Live QA URL: https://qa.cloudstack.cloud/simulator/pr/9825 (QA-JID-616)