Merge branch 'main-v2' into lichang

This commit is contained in:
TsMask
2025-07-01 10:14:29 +08:00
10 changed files with 281 additions and 189 deletions

View File

@@ -239,6 +239,12 @@ func saveKPIDataC(kpiReport KpiReport, index int64) int64 {
item["value"] = 0
item["err"] = err.Error()
} else {
if *v.Unit == "%" && result > 100 {
result = 100
}
if *v.Unit == "%" && result < 0 {
result = 0
}
item["value"] = result
}
KpiValues = append(KpiValues, item)