UI workaround for the inconsistent formatting of listVirtualMachinesUsageHistory#10824
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## 4.19 #10824 +/- ##
============================================
+ Coverage 15.17% 16.40% +1.23%
- Complexity 11332 13589 +2257
============================================
Files 5415 5692 +277
Lines 474893 501976 +27083
Branches 57920 60795 +2875
============================================
+ Hits 72046 82365 +10319
- Misses 394792 410453 +15661
- Partials 8055 9158 +1103
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull Request Overview
This PR fixes the UI issue of incorrect CPU utilization graph display by addressing decimal formatting discrepancies in the response data. Key changes include:
- Replacing commas with dots in the cpuused field value to ensure proper number formatting.
- Updating the data extraction line in the StatsTab.vue component to support the required transformation.
|
@DaanHoogland a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress. |
|
UI build: ✔️ |
|
I’m going to (half) trust the author as I could verify the end result but not reproduce the original issue and three reviews say the code is good. |
Description
Depending on the Management Server's Locale,
listVirtualMachinesUsageHistorymay return decimal values separated by a comma in thecpuusedfield; however, the UI currently expects that this decimal is separated by a dot. In this situation, the metrics page will not show the CPU utilization graph properly (see #10672).This PR makes the UI work around the issue by replacing commas with a dot in order to properly display the metrics page. The response formatting issue will be addressed by #10699 for the next major.
Types of changes
Feature/Enhancement Scale or Bug Severity
Bug Severity
Screenshots (if appropriate):
Without the patch:
With the patch:
How Has This Been Tested?
Before the patch, the CPU utilization graph would not be displayed properly in step 4. After the patch, the graph is displayed properly.