cloudstack icon indicating copy to clipboard operation
cloudstack copied to clipboard

ui: improve metrics api use in list views

Open shwstppr opened this issue 1 year ago • 7 comments

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?

shwstppr avatar Oct 18 '24 06:10 shwstppr

@blueorangutan ui

shwstppr avatar Oct 18 '24 07:10 shwstppr

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

blueorangutan avatar Oct 18 '24 07:10 blueorangutan

UI build failed: :heavy_multiplication_x: (SL-JID-464)

blueorangutan avatar Oct 18 '24 07:10 blueorangutan

@blueorangutan ui

shwstppr avatar Oct 18 '24 07:10 shwstppr

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

blueorangutan avatar Oct 18 '24 07:10 blueorangutan

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.

codecov[bot] avatar Oct 18 '24 07:10 codecov[bot]

UI build failed: :heavy_multiplication_x: (SL-JID-465)

blueorangutan avatar Oct 18 '24 07:10 blueorangutan

@blueorangutan ui

DaanHoogland avatar Nov 01 '24 08:11 DaanHoogland

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

blueorangutan avatar Nov 01 '24 08:11 blueorangutan

UI build: :heavy_check_mark: Live QA URL: https://qa.cloudstack.cloud/simulator/pr/9825 (QA-JID-476)

blueorangutan avatar Nov 01 '24 08:11 blueorangutan

@blueorangutan ui

shwstppr avatar Jan 29 '25 08:01 shwstppr

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

blueorangutan avatar Jan 29 '25 08:01 blueorangutan

UI build: :heavy_check_mark: Live QA URL: https://qa.cloudstack.cloud/simulator/pr/9825 (QA-JID-538)

blueorangutan avatar Jan 29 '25 08:01 blueorangutan

@shwstppr can you please rebase this to 4.20 branch? Thanks - And is it ready for review?

Pearl1594 avatar Feb 14 '25 14:02 Pearl1594

@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

shwstppr avatar Feb 14 '25 14:02 shwstppr

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

github-actions[bot] avatar Apr 16 '25 11:04 github-actions[bot]

@blueorangutan ui

shwstppr avatar Apr 16 '25 11:04 shwstppr

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

blueorangutan avatar Apr 16 '25 11:04 blueorangutan

UI build: :heavy_check_mark: Live QA URL: https://qa.cloudstack.cloud/simulator/pr/9825 (QA-JID-602)

blueorangutan avatar Apr 16 '25 11:04 blueorangutan

@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 avatar Apr 16 '25 13:04 DaanHoogland

@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 Screenshot_2025-04-16-18-56-06-48_40deb401b9ffe8e1df2f1cc5ba480b12.jpg

After Screenshot_2025-04-16-18-57-18-69_40deb401b9ffe8e1df2f1cc5ba480b12.jpg

shwstppr avatar Apr 16 '25 13:04 shwstppr

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

github-actions[bot] avatar Apr 25 '25 09:04 github-actions[bot]

Conflicts needs to be fixed @shwstppr

yadvr avatar May 09 '25 05:05 yadvr

@blueorangutan ui

shwstppr avatar May 09 '25 06:05 shwstppr

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

blueorangutan avatar May 09 '25 06:05 blueorangutan

UI build: :heavy_check_mark: Live QA URL: https://qa.cloudstack.cloud/simulator/pr/9825 (QA-JID-616)

blueorangutan avatar May 09 '25 06:05 blueorangutan