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
This commit is contained in:
Kurkó Mihály
2018-01-15 11:20:00 +02:00
committed by Péter Szilágyi
parent 81ad8f665d
commit 938cf4528a
16 changed files with 1429 additions and 5321 deletions

View File

@@ -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"`
}