diff options
author | Kurkó Mihály <kurkomisi@users.noreply.github.com> | 2018-01-15 17:20:00 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2018-01-15 17:20:00 +0800 |
commit | 938cf4528ab5acbb6013be79a0548956713807a8 (patch) | |
tree | f7782996f31b39539d148d5daeea9171415db87c /dashboard/message.go | |
parent | 81ad8f665d3e7598273958d557c531f800eca50f (diff) | |
download | go-tangerine-938cf4528ab5acbb6013be79a0548956713807a8.tar go-tangerine-938cf4528ab5acbb6013be79a0548956713807a8.tar.gz go-tangerine-938cf4528ab5acbb6013be79a0548956713807a8.tar.bz2 go-tangerine-938cf4528ab5acbb6013be79a0548956713807a8.tar.lz go-tangerine-938cf4528ab5acbb6013be79a0548956713807a8.tar.xz go-tangerine-938cf4528ab5acbb6013be79a0548956713807a8.tar.zst go-tangerine-938cf4528ab5acbb6013be79a0548956713807a8.zip |
dashboard: deep state update, version in footer (#15837)
* dashboard: footer, deep state update
* dashboard: resolve asset path
* dashboard: remove bundle.js
* dashboard: prevent state update on every reconnection
* dashboard: fix linter issue
* dashboard, cmd: minor UI fix, include commit hash
* remove geth binary
* dashboard: gitCommit renamed to commit
* dashboard: move the geth version to the right, make commit optional
* dashboard: commit limited to 7 characters
* dashboard: limit commit length on client side
* dashboard: run go generate
Diffstat (limited to 'dashboard/message.go')
-rw-r--r-- | dashboard/message.go | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/dashboard/message.go b/dashboard/message.go index 240de0c34..41a42c55f 100644 --- a/dashboard/message.go +++ b/dashboard/message.go @@ -19,6 +19,7 @@ package dashboard import "time" type Message struct { + General *GeneralMessage `json:"general,omitempty"` Home *HomeMessage `json:"home,omitempty"` Chain *ChainMessage `json:"chain,omitempty"` TxPool *TxPoolMessage `json:"txpool,omitempty"` @@ -27,16 +28,18 @@ type Message struct { Logs *LogsMessage `json:"logs,omitempty"` } -type HomeMessage struct { - Memory *Chart `json:"memory,omitempty"` - Traffic *Chart `json:"traffic,omitempty"` +type GeneralMessage struct { + Version string `json:"version,omitempty"` + Commit string `json:"commit,omitempty"` } -type Chart struct { - History []*ChartEntry `json:"history,omitempty"` - New *ChartEntry `json:"new,omitempty"` +type HomeMessage struct { + Memory ChartEntries `json:"memory,omitempty"` + Traffic ChartEntries `json:"traffic,omitempty"` } +type ChartEntries []*ChartEntry + type ChartEntry struct { Time time.Time `json:"time,omitempty"` Value float64 `json:"value,omitempty"` @@ -59,5 +62,5 @@ type SystemMessage struct { } type LogsMessage struct { - Log string `json:"log,omitempty"` + Log []string `json:"log,omitempty"` } |