Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ui: improve metrics api use in list views #9825

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 9, 2025

Conversation

shwstppr
Copy link
Contributor

@shwstppr shwstppr commented Oct 18, 2024

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.

Following fields in the corresponding listview have been moved to metrics fields as they're not available in non-metrics response,

  • zones: clusters
  • clusters: state, hosts
  • hosts: instances, powerstates

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)
  • 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):

metrics-api-improvement.mp4

How Has This Been Tested?

How did you try to break this feature and the system with this change?

@shwstppr
Copy link
Contributor Author

@blueorangutan ui

@blueorangutan
Copy link

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

@blueorangutan
Copy link

UI build failed: ✖️
(SL-JID-464)

@shwstppr
Copy link
Contributor Author

@blueorangutan ui

@blueorangutan
Copy link

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

Copy link

codecov bot commented Oct 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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%) ⬆️
unittests 16.98% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@blueorangutan
Copy link

UI build failed: ✖️
(SL-JID-465)

Copy link
Contributor

@borisstoyanov borisstoyanov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code LGTM, did not tested it

@DaanHoogland
Copy link
Contributor

@blueorangutan ui

@blueorangutan
Copy link

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

@blueorangutan
Copy link

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

@shwstppr
Copy link
Contributor Author

@blueorangutan ui

@blueorangutan
Copy link

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

@blueorangutan
Copy link

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

@rohityadavcloud rohityadavcloud added this to the 4.20.1 milestone Jan 31, 2025
@Pearl1594
Copy link
Contributor

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

@shwstppr
Copy link
Contributor Author

@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

@Pearl1594 Pearl1594 modified the milestones: 4.20.1, 4.21.0 Feb 14, 2025
@shwstppr shwstppr marked this pull request as ready for review April 16, 2025 11:29
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.

Signed-off-by: Abhishek Kumar <[email protected]>
@shwstppr
Copy link
Contributor Author

@blueorangutan ui

@blueorangutan
Copy link

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

@blueorangutan
Copy link

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

@DaanHoogland
Copy link
Contributor

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

@shwstppr
Copy link
Contributor Author

@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

Copy link

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

@rohityadavcloud rohityadavcloud modified the milestones: 4.21.0, 4.20.1 May 9, 2025
@rohityadavcloud
Copy link
Member

Conflicts needs to be fixed @shwstppr

@shwstppr
Copy link
Contributor Author

shwstppr commented May 9, 2025

@blueorangutan ui

@blueorangutan
Copy link

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

@blueorangutan
Copy link

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

Copy link
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clgtm+tested

@DaanHoogland DaanHoogland merged commit c453aae into apache:4.20 May 9, 2025
23 of 26 checks passed
@DaanHoogland DaanHoogland deleted the ui-improve-metricsapiuse branch May 9, 2025 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants