mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 09:23:48 +00:00
dashboard: limit commit length on client side
This commit is contained in:
parent
9a46b5cbc4
commit
57997174f4
2 changed files with 2 additions and 6 deletions
|
|
@ -62,7 +62,7 @@ class Footer extends Component<Props> {
|
|||
render() {
|
||||
const {classes, general} = this.props; // The classes property is injected by withStyles().
|
||||
const geth = general.version ? this.info('Geth', general.version) : null;
|
||||
const commit = general.commit ? this.info('Commit', general.commit) : null;
|
||||
const commit = general.commit ? this.info('Commit', general.commit.substring(0, 7)) : null;
|
||||
|
||||
return (
|
||||
<AppBar position="static" className={classes.footer}>
|
||||
|
|
|
|||
|
|
@ -208,15 +208,11 @@ func (db *Dashboard) apiHandler(conn *websocket.Conn) {
|
|||
if len(params.VersionMeta) > 0 {
|
||||
versionMeta = fmt.Sprintf(" (%s)", params.VersionMeta)
|
||||
}
|
||||
commit := db.commit
|
||||
if len(commit) > 7 {
|
||||
commit = commit[:7]
|
||||
}
|
||||
// Send the past data.
|
||||
client.msg <- Message{
|
||||
General: &GeneralMessage{
|
||||
Version: fmt.Sprintf("v%d.%d.%d%s", params.VersionMajor, params.VersionMinor, params.VersionPatch, versionMeta),
|
||||
Commit: commit,
|
||||
Commit: db.commit,
|
||||
},
|
||||
Home: &HomeMessage{
|
||||
Memory: db.charts.Memory,
|
||||
|
|
|
|||
Loading…
Reference in a new issue