diff options
author | Péter Szilágyi <peterke@gmail.com> | 2015-06-25 17:12:11 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2015-06-25 17:12:11 +0800 |
commit | c6e2af14c0019c43c11e03b9fd79ba4489a38bed (patch) | |
tree | de69f782142f29718a3a15489dc559b267a95140 /cmd/geth/monitorcmd.go | |
parent | 3ea6b5ae32215daa6393e02682d6946a2aa89af3 (diff) | |
download | go-tangerine-c6e2af14c0019c43c11e03b9fd79ba4489a38bed.tar go-tangerine-c6e2af14c0019c43c11e03b9fd79ba4489a38bed.tar.gz go-tangerine-c6e2af14c0019c43c11e03b9fd79ba4489a38bed.tar.bz2 go-tangerine-c6e2af14c0019c43c11e03b9fd79ba4489a38bed.tar.lz go-tangerine-c6e2af14c0019c43c11e03b9fd79ba4489a38bed.tar.xz go-tangerine-c6e2af14c0019c43c11e03b9fd79ba4489a38bed.tar.zst go-tangerine-c6e2af14c0019c43c11e03b9fd79ba4489a38bed.zip |
cmd/geth: limit the maximum chart colums to 6
Diffstat (limited to 'cmd/geth/monitorcmd.go')
-rw-r--r-- | cmd/geth/monitorcmd.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/geth/monitorcmd.go b/cmd/geth/monitorcmd.go index b51da91e6..78b67c17c 100644 --- a/cmd/geth/monitorcmd.go +++ b/cmd/geth/monitorcmd.go @@ -85,7 +85,9 @@ func monitor(ctx *cli.Context) { utils.Fatalf("No metrics specified.\n\nAvailable:\n - %s", strings.Join(list, "\n - ")) } 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 if err := termui.Init(); err != nil { utils.Fatalf("Unable to initialize terminal UI: %v", err) |