Copilot commented on code in PR #10824:
URL: https://github.com/apache/cloudstack/pull/10824#discussion_r2076888472
##########
ui/src/components/view/StatsTab.vue:
##########
@@ -521,7 +521,7 @@ export default {
this.chartLabels.push(currentLabel)
if (this.resourceIsVirtualMachine) {
- cpuLine.data.push({ timestamp: currentLabel, stat:
element.cpuused.split('%')[0] })
+ cpuLine.data.push({ timestamp: currentLabel, stat:
element.cpuused.replace(',', '.').split('%')[0] })
Review Comment:
[nitpick] While replacing ',' with '.' is a valid quick fix for this bug,
note that String.replace only replaces the first occurrence. If there's any
chance of multiple commas in the cpuused string, consider using a global
replacement like replaceAll for clarity.
```suggestion
cpuLine.data.push({ timestamp: currentLabel, stat:
element.cpuused.replaceAll(',', '.').split('%')[0] })
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]