Skip to content

ui: improve sort utility for metrics#9247

Merged
yadvr merged 1 commit into
apache:4.19from
shapeblue:ui-sort-fix
Jun 14, 2024
Merged

ui: improve sort utility for metrics#9247
yadvr merged 1 commit into
apache:4.19from
shapeblue:ui-sort-fix

Conversation

@yadvr

@yadvr yadvr commented Jun 13, 2024

Copy link
Copy Markdown
Member

This improves the UI sorting utility to check for metrics data and sort after cleaning the string data.

Fixes #8663

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

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

This improves the UI sorting utility to check for metrics data and sort
after cleaning the string data.

Fixes apache#8663

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
Comment thread ui/src/utils/sort.js

function stringComparator (a, b) {
return a.toString().localeCompare(b.toString())
return a.toString().localeCompare(b.toString(), undefined, { numeric: true })

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

FYI - this would also consider for cases where there is numeric string data

@yadvr

yadvr commented Jun 13, 2024

Copy link
Copy Markdown
Member Author

@blueorangutan ui

@blueorangutan

Copy link
Copy Markdown

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

@yadvr yadvr linked an issue Jun 13, 2024 that may be closed by this pull request
@codecov

codecov Bot commented Jun 13, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 14.96%. Comparing base (19e9020) to head (2068bde).
Report is 3 commits behind head on 4.19.

Additional details and impacted files
@@             Coverage Diff              @@
##               4.19    #9247      +/-   ##
============================================
- Coverage     14.96%   14.96%   -0.01%     
+ Complexity    11015    11014       -1     
============================================
  Files          5377     5378       +1     
  Lines        469605   469812     +207     
  Branches      60258    58818    -1440     
============================================
- Hits          70296    70290       -6     
- Misses       391523   391735     +212     
- Partials       7786     7787       +1     
Flag Coverage Δ
uitests 4.29% <ø> (-0.01%) ⬇️
unittests 15.67% <ø> (-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.

@blueorangutan

Copy link
Copy Markdown

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

@DaanHoogland DaanHoogland left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

clgtm, tests ok in qa

@shwstppr shwstppr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

code lgtm

@yadvr
yadvr merged commit 6ce2a58 into apache:4.19 Jun 14, 2024
@yadvr
yadvr deleted the ui-sort-fix branch June 14, 2024 06:43
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Jun 17, 2024
This improves the UI sorting utility to check for metrics data and sort
after cleaning the string data.

Fixes apache#8663

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

No open projects
Status: No status

Development

Successfully merging this pull request may close these issues.

Web UI: incorrect sorting of colums with numerical values

4 participants