fix: 限制KPI结果不超过100%

This commit is contained in:
TsMask committed 2025-03-25 18:39:37 +08:00
1 parent 67bb04acbe
commit 4bc6aab6a1
1 file changed
+3
+3
View File
@@ -318,6 +318,9 @@ func PostKPIReportFromNF(w http.ResponseWriter, r *http.Request) {
kpiCVal.Value = 0.0
kpiCVal.Err = err.Error()
} else {
if *k.Unit == "%" && result > 100 {
result = 100
}
kpiCVal.Value = result
}