fix: 自定义KP%I值为最大100%

This commit is contained in:
TsMask
2025-03-26 14:12:30 +08:00
parent aaabaea668
commit 8c07b43b8a

View File

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