mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 09:23:48 +00:00
dashboard: gitCommit renamed to commit
This commit is contained in:
parent
cbdb465003
commit
e9e7e5c30a
6 changed files with 22 additions and 22 deletions
|
|
@ -26828,7 +26828,7 @@ var _bundleJs = []byte((((((((((`!function(modules) {
|
|||
}), updated;
|
||||
}, shouldUpdate = function shouldUpdate(msg, updater) {
|
||||
var su = {};
|
||||
return Object.keys(msg).forEach(function(key) {
|
||||
return console.log(msg), Object.keys(msg).forEach(function(key) {
|
||||
su[key] = "function" == typeof updater[key] || shouldUpdate(msg[key], updater[key]);
|
||||
}), su;
|
||||
}, appender = function(limit) {
|
||||
|
|
@ -26840,7 +26840,7 @@ var _bundleJs = []byte((((((((((`!function(modules) {
|
|||
}, defaultContent = {
|
||||
general: {
|
||||
version: "-",
|
||||
gitCommit: "-"
|
||||
commit: "-"
|
||||
},
|
||||
home: {
|
||||
memory: [],
|
||||
|
|
@ -26856,7 +26856,7 @@ var _bundleJs = []byte((((((((((`!function(modules) {
|
|||
}, updaters = {
|
||||
general: {
|
||||
version: replacer,
|
||||
gitCommit: replacer
|
||||
commit: replacer
|
||||
},
|
||||
home: {
|
||||
memory: appender(200),
|
||||
|
|
@ -26895,7 +26895,7 @@ var _bundleJs = []byte((((((((((`!function(modules) {
|
|||
}, server.onmessage = function(event) {
|
||||
var msg = JSON.parse(event.data);
|
||||
if (!msg) return void console.error("Incoming message is " + msg);
|
||||
console.log(msg), _this.update(msg);
|
||||
_this.update(msg);
|
||||
}, server.onclose = function() {
|
||||
setTimeout(_this.reconnect, 3e3);
|
||||
};
|
||||
|
|
@ -38194,7 +38194,7 @@ var _bundleJs = []byte((((((((((`!function(modules) {
|
|||
type: "title",
|
||||
color: "inherit",
|
||||
className: classes.mainText
|
||||
}, this.props.general.gitCommit)));
|
||||
}, this.props.general.commit)));
|
||||
}
|
||||
} ]), Footer;
|
||||
}(_react.Component);
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ const replacer = <T>(prev: T, update: T) => update;
|
|||
const defaultContent: Content = {
|
||||
general: {
|
||||
version: '-',
|
||||
gitCommit: '-',
|
||||
commit: '-',
|
||||
},
|
||||
home: {
|
||||
memory: [],
|
||||
|
|
@ -97,7 +97,7 @@ const defaultContent: Content = {
|
|||
const updaters = {
|
||||
general: {
|
||||
version: replacer,
|
||||
gitCommit: replacer,
|
||||
commit: replacer,
|
||||
},
|
||||
home: {
|
||||
memory: appender(200),
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ class Footer extends Component<Props> {
|
|||
{this.props.general.version}
|
||||
</Typography>
|
||||
<Typography type="title" color="inherit" className={classes.mainText}>
|
||||
{this.props.general.gitCommit}
|
||||
{this.props.general.commit}
|
||||
</Typography>
|
||||
</Toolbar>
|
||||
</AppBar>
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ export type Content = {
|
|||
|
||||
export type General = {
|
||||
version: string,
|
||||
gitCommit: string,
|
||||
commit: string,
|
||||
};
|
||||
|
||||
export type Home = {
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ type Dashboard struct {
|
|||
listener net.Listener
|
||||
conns map[uint32]*client // Currently live websocket connections
|
||||
charts *HomeMessage
|
||||
gitCommit string
|
||||
commit string
|
||||
lock sync.RWMutex // Lock protecting the dashboard's internals
|
||||
|
||||
quit chan chan error // Channel used for graceful exit
|
||||
|
|
@ -70,7 +70,7 @@ type client struct {
|
|||
}
|
||||
|
||||
// New creates a new dashboard instance with the given configuration.
|
||||
func New(config *Config, gitCommit string) (*Dashboard, error) {
|
||||
func New(config *Config, commit string) (*Dashboard, error) {
|
||||
return &Dashboard{
|
||||
conns: make(map[uint32]*client),
|
||||
config: config,
|
||||
|
|
@ -79,7 +79,7 @@ func New(config *Config, gitCommit string) (*Dashboard, error) {
|
|||
Memory: ChartEntries{},
|
||||
Traffic: ChartEntries{},
|
||||
},
|
||||
gitCommit: gitCommit,
|
||||
commit: commit,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
|
@ -212,7 +212,7 @@ func (db *Dashboard) apiHandler(conn *websocket.Conn) {
|
|||
client.msg <- Message{
|
||||
General: &GeneralMessage{
|
||||
Version: fmt.Sprintf("Geth v%d.%d.%d%s", params.VersionMajor, params.VersionMinor, params.VersionPatch, versionMeta),
|
||||
GitCommit: fmt.Sprintf("Commit %s", db.gitCommit),
|
||||
Commit: fmt.Sprintf("Commit %s", db.commit),
|
||||
},
|
||||
Home: &HomeMessage{
|
||||
Memory: db.charts.Memory,
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ type Message struct {
|
|||
|
||||
type GeneralMessage struct {
|
||||
Version string `json:"version,omitempty"`
|
||||
GitCommit string `json:"gitCommit,omitempty"`
|
||||
Commit string `json:"commit,omitempty"`
|
||||
}
|
||||
|
||||
type HomeMessage struct {
|
||||
|
|
|
|||
Loading…
Reference in a new issue