diff options
author | Kurkó Mihály <kurkomisi@users.noreply.github.com> | 2017-11-15 01:34:00 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2017-11-15 01:34:00 +0800 |
commit | ba62215d9ef8655743ce7b1380056755943e3d72 (patch) | |
tree | ca74e2d737759f44930469f5c285443efe5f99cc /metrics/metrics.go | |
parent | 984c25ac406e86255b289a3d7fec4cd91a17707f (diff) | |
download | go-tangerine-ba62215d9ef8655743ce7b1380056755943e3d72.tar go-tangerine-ba62215d9ef8655743ce7b1380056755943e3d72.tar.gz go-tangerine-ba62215d9ef8655743ce7b1380056755943e3d72.tar.bz2 go-tangerine-ba62215d9ef8655743ce7b1380056755943e3d72.tar.lz go-tangerine-ba62215d9ef8655743ce7b1380056755943e3d72.tar.xz go-tangerine-ba62215d9ef8655743ce7b1380056755943e3d72.tar.zst go-tangerine-ba62215d9ef8655743ce7b1380056755943e3d72.zip |
cmd, dashboard: dashboard using React, Material-UI, Recharts (#15393)
* cmd, dashboard: dashboard using React, Material-UI, Recharts
* cmd, dashboard, metrics: initial proof of concept dashboard
* dashboard: delete blobs
* dashboard: gofmt -s -w .
* dashboard: minor text and code polishes
Diffstat (limited to 'metrics/metrics.go')
-rw-r--r-- | metrics/metrics.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/metrics/metrics.go b/metrics/metrics.go index afdfd89fa..c82661d80 100644 --- a/metrics/metrics.go +++ b/metrics/metrics.go @@ -30,6 +30,7 @@ import ( // MetricsEnabledFlag is the CLI flag name to use to enable metrics collections. const MetricsEnabledFlag = "metrics" +const DashboardEnabledFlag = "dashboard" // Enabled is the flag specifying if metrics are enable or not. var Enabled = false @@ -39,7 +40,7 @@ var Enabled = false // and peek into the command line args for the metrics flag. func init() { for _, arg := range os.Args { - if strings.TrimLeft(arg, "-") == MetricsEnabledFlag { + if flag := strings.TrimLeft(arg, "-"); flag == MetricsEnabledFlag || flag == DashboardEnabledFlag { log.Info("Enabling metrics collection") Enabled = true } |