forked from cerc-io/plugeth
cmd/geth: limit the maximum chart colums to 6
This commit is contained in:
parent
3ea6b5ae32
commit
c6e2af14c0
@ -85,7 +85,9 @@ func monitor(ctx *cli.Context) {
|
|||||||
utils.Fatalf("No metrics specified.\n\nAvailable:\n - %s", strings.Join(list, "\n - "))
|
utils.Fatalf("No metrics specified.\n\nAvailable:\n - %s", strings.Join(list, "\n - "))
|
||||||
}
|
}
|
||||||
sort.Strings(monitored)
|
sort.Strings(monitored)
|
||||||
|
if cols := len(monitored) / ctx.Int(monitorCommandRowsFlag.Name); cols > 6 {
|
||||||
|
utils.Fatalf("Requested metrics (%d) spans more that 6 columns:\n - %s", len(monitored), strings.Join(monitored, "\n - "))
|
||||||
|
}
|
||||||
// Create and configure the chart UI defaults
|
// Create and configure the chart UI defaults
|
||||||
if err := termui.Init(); err != nil {
|
if err := termui.Init(); err != nil {
|
||||||
utils.Fatalf("Unable to initialize terminal UI: %v", err)
|
utils.Fatalf("Unable to initialize terminal UI: %v", err)
|
||||||
|
Loading…
Reference in New Issue
Block a user