backend.ai-webui icon indicating copy to clipboard operation
backend.ai-webui copied to clipboard

fix: apply decimal place rounding

Open ironAiken2 opened this issue 1 year ago • 3 comments

This PR resolves #2412 issue

Featue

  • add prefixFormat function
    • Set default values ("0") to resolve cases where no value was received from the request
    • Adds decimals only when they're needed, replacing less readable text like 00.00 or 0.00
  • Fixed decimalization not being applied.

[modified]

  • backend-ai-resource-monitor , backend-ai-resource-panel , AgentList
before after
image.pngimage.png image.pngimage.png
image.png image.png

Checklist: (if applicable)

  • [ ] Mention to the original issue
  • [ ] Documentation
  • [ ] Minium required manager version
  • [ ] Specific setting for review (eg., KB link, endpoint or how to setup)
  • [ ] Minimum requirements to check during review
  • [ ] Test case(s) to demonstrate the difference of before/after

ironAiken2 avatar Jul 05 '24 08:07 ironAiken2

Your org requires the Graphite merge queue for merging into main

Add the label “flow:merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “flow:hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

graphite-app[bot] avatar Jul 05 '24 08:07 graphite-app[bot]

  • #2518 Graphite 👈
  • main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @ironAiken2 and the rest of your teammates on Graphite Graphite

ironAiken2 avatar Jul 05 '24 08:07 ironAiken2

Coverage report for ./react

St.:grey_question:
Category Percentage Covered / Total
🔴 Statements
2.69% (+0.01% 🔼)
142/5273
🔴 Branches
2.88% (-0.01% 🔻)
101/3504
🔴 Functions
1.54% (-0% 🔻)
27/1751
🔴 Lines
2.57% (+0.02% 🔼)
133/5171
Show files with reduced coverage 🔻
St.:grey_question:
File Statements Branches Functions Lines
🔴 helper/index.tsx
54.61% (-2.53% 🔻)
45.52% (-2.66% 🔻)
42.42% (-1.33% 🔻)
56.67% (-2.11% 🔻)

Test suite run success

51 tests passing in 5 suites.

Report generated by 🧪jest coverage report action from 946f465de61b69e80f0edc4456e84732b0096752

github-actions[bot] avatar Jul 05 '24 08:07 github-actions[bot]

Coverage report for ./react

St.:grey_question:
Category Percentage Covered / Total
🔴 Statements
3.13% (-0.02% 🔻)
178/5682
🔴 Branches
3.23% (-0.02% 🔻)
123/3805
🔴 Functions
1.92% (-0% 🔻)
36/1871
🔴 Lines
3% (-0.02% 🔻)
167/5565
Show files with reduced coverage 🔻
St.:grey_question:
File Statements Branches Functions Lines
🔴 helper/index.tsx
52.41% (-0.69% 🔻)
46.43% (-0.71% 🔻)
40% (-1.18% 🔻)
54.03% (-0.81% 🔻)

Test suite run success

64 tests passing in 6 suites.

Report generated by 🧪jest coverage report action from e19ce31e2c66ebc20d45c79f6b7df9c056ed25a3

github-actions[bot] avatar Jul 19 '24 05:07 github-actions[bot]

From the backend.ai writing rules, let's modify the fixed unit. For example, the unit/capacity of RAM is expressed up to the second decimal place.

Applied! 🙂

ironAiken2 avatar Aug 02 '24 08:08 ironAiken2

image Can you widen progress bar too?

On the sesson list page, when backend-ai-resource-monitor is used, the progress bar width was changing to narrow, I changed it to keep the existing width.

I think that would require a design change to handle that. The resource monitor part will be getting a redesign soon, so why not use a different stack to handle it? @agatha197

ironAiken2 avatar Aug 05 '24 08:08 ironAiken2

image Can you widen progress bar too?

On the sesson list page, when backend-ai-resource-monitor is used, the progress bar width was changing to narrow, I changed it to keep the existing width.

I think that would require a design change to handle that. The resource monitor part will be getting a redesign soon, so why not use a different stack to handle it? kimsujin (@agatha197)

hmm.. okay.

agatha197 avatar Aug 05 '24 10:08 agatha197

Merge activity

graphite-app[bot] avatar Aug 06 '24 03:08 graphite-app[bot]