Use unit for sorting topX instead of always using bytes

This commit is contained in:
netixx
2024-07-16 18:03:20 +02:00
committed by Vincent Bernat
parent b8368501d7
commit a312bc307e
4 changed files with 16 additions and 3 deletions

View File

@@ -32,3 +32,13 @@ func (c *Component) fixQueryColumnName(name string) string {
}
return ""
}
func metricForTopSort(inputUnit string) string {
switch inputUnit {
case "pps":
return "Packets"
default:
return "Bytes"
}
}