aboutsummaryrefslogtreecommitdiffstats
path: root/dashboard/message.go
diff options
context:
space:
mode:
authorKurkó Mihály <kurkomisi@users.noreply.github.com>2018-01-15 17:20:00 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-01-15 17:20:00 +0800
commit938cf4528ab5acbb6013be79a0548956713807a8 (patch)
treef7782996f31b39539d148d5daeea9171415db87c /dashboard/message.go
parent81ad8f665d3e7598273958d557c531f800eca50f (diff)
downloaddexon-938cf4528ab5acbb6013be79a0548956713807a8.tar
dexon-938cf4528ab5acbb6013be79a0548956713807a8.tar.gz
dexon-938cf4528ab5acbb6013be79a0548956713807a8.tar.bz2
dexon-938cf4528ab5acbb6013be79a0548956713807a8.tar.lz
dexon-938cf4528ab5acbb6013be79a0548956713807a8.tar.xz
dexon-938cf4528ab5acbb6013be79a0548956713807a8.tar.zst
dexon-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.go17
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"`
}