console: add “%” to available units

This is useful to detect interfaces that are close to saturation
quickly. It would usually require to group by exporter name and
interface name and it may not make sense for some graph types (like
stacked 100%). It is useful with Lines and Grid.
This commit is contained in:
Vincent Bernat
2023-02-09 21:14:29 +01:00
parent fb4ef4aa60
commit d5cde97891
11 changed files with 38 additions and 10 deletions

View File

@@ -27,7 +27,7 @@ type graphHandlerInput struct {
Dimensions []query.Column `json:"dimensions"` // group by ...
Limit int `json:"limit" binding:"min=1"` // limit product of dimensions
Filter query.Filter `json:"filter"` // where ...
Units string `json:"units" binding:"required,oneof=pps l2bps l3bps"`
Units string `json:"units" binding:"required,oneof=pps l2bps l3bps inl2% outl2%"`
Bidirectional bool `json:"bidirectional"`
PreviousPeriod bool `json:"previous-period"`
}