Merge branch 'main-v2' into lichang
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user