Modify the monitoring table to return field types

This commit is contained in:
Liujian
2025-05-06 10:43:09 +08:00
parent 9572c4157e
commit ef1c48e395
4 changed files with 75 additions and 130 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ func FormatCountInt64(count int64) string {
func FormatCountFloat64(count float64) string {
switch {
case count < 1000:
return strconv.FormatFloat(count, 'f', -1, 64)
return fmt.Sprintf("%.1f", count)
case count < 1000000:
return fmt.Sprintf("%.1fK", count/1000)
case count < 1000000000: