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 /cmd/geth/config.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 'cmd/geth/config.go')
-rw-r--r-- | cmd/geth/config.go | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/cmd/geth/config.go b/cmd/geth/config.go index d55a5e08d..27490c404 100644 --- a/cmd/geth/config.go +++ b/cmd/geth/config.go @@ -30,6 +30,7 @@ import ( "github.com/ethereum/go-ethereum/cmd/utils" "github.com/ethereum/go-ethereum/contracts/release" + "github.com/ethereum/go-ethereum/dashboard" "github.com/ethereum/go-ethereum/eth" "github.com/ethereum/go-ethereum/node" "github.com/ethereum/go-ethereum/params" @@ -76,10 +77,11 @@ type ethstatsConfig struct { } type gethConfig struct { - Eth eth.Config - Shh whisper.Config - Node node.Config - Ethstats ethstatsConfig + Eth eth.Config + Shh whisper.Config + Node node.Config + Ethstats ethstatsConfig + Dashboard dashboard.Config } func loadConfig(file string, cfg *gethConfig) error { @@ -110,9 +112,10 @@ func defaultNodeConfig() node.Config { func makeConfigNode(ctx *cli.Context) (*node.Node, gethConfig) { // Load defaults. cfg := gethConfig{ - Eth: eth.DefaultConfig, - Shh: whisper.DefaultConfig, - Node: defaultNodeConfig(), + Eth: eth.DefaultConfig, + Shh: whisper.DefaultConfig, + Node: defaultNodeConfig(), + Dashboard: dashboard.DefaultConfig, } // Load config file. @@ -134,6 +137,7 @@ func makeConfigNode(ctx *cli.Context) (*node.Node, gethConfig) { } utils.SetShhConfig(ctx, stack, &cfg.Shh) + utils.SetDashboardConfig(ctx, &cfg.Dashboard) return stack, cfg } @@ -153,6 +157,9 @@ func makeFullNode(ctx *cli.Context) *node.Node { utils.RegisterEthService(stack, &cfg.Eth) + if ctx.GlobalBool(utils.DashboardEnabledFlag.Name) { + utils.RegisterDashboardService(stack, &cfg.Dashboard) + } // Whisper must be explicitly enabled by specifying at least 1 whisper flag or in dev mode shhEnabled := enableWhisper(ctx) shhAutoEnabled := !ctx.GlobalIsSet(utils.WhisperEnabledFlag.Name) && ctx.GlobalIsSet(utils.DeveloperFlag.Name) |