diff options
author | Kurkó Mihály <kurkomisi@users.noreply.github.com> | 2018-03-08 16:22:21 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2018-03-08 16:22:21 +0800 |
commit | 704840a8ad9e75d4a00e734f901cac21c51b7eb5 (patch) | |
tree | e2b012c052986bb40053f09394aefb5c23474a5a /dashboard/assets/components/Dashboard.jsx | |
parent | 3ec1b9a92dc09ff33f6fae2e8daa7862d4c51bb1 (diff) | |
download | go-tangerine-704840a8ad9e75d4a00e734f901cac21c51b7eb5.tar go-tangerine-704840a8ad9e75d4a00e734f901cac21c51b7eb5.tar.gz go-tangerine-704840a8ad9e75d4a00e734f901cac21c51b7eb5.tar.bz2 go-tangerine-704840a8ad9e75d4a00e734f901cac21c51b7eb5.tar.lz go-tangerine-704840a8ad9e75d4a00e734f901cac21c51b7eb5.tar.xz go-tangerine-704840a8ad9e75d4a00e734f901cac21c51b7eb5.tar.zst go-tangerine-704840a8ad9e75d4a00e734f901cac21c51b7eb5.zip |
cmd, dashboard: use webpack dev server, remove custom assets (#16263)
* cmd, dashboard: remove custom assets, webpack dev server
* dashboard: yarn commands, small fixes
Diffstat (limited to 'dashboard/assets/components/Dashboard.jsx')
-rw-r--r-- | dashboard/assets/components/Dashboard.jsx | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/dashboard/assets/components/Dashboard.jsx b/dashboard/assets/components/Dashboard.jsx index 90b1a785c..8e6bf9869 100644 --- a/dashboard/assets/components/Dashboard.jsx +++ b/dashboard/assets/components/Dashboard.jsx @@ -81,7 +81,11 @@ const defaultContent: Content = { version: null, commit: null, }, - home: { + home: {}, + chain: {}, + txpool: {}, + network: {}, + system: { activeMemory: [], virtualMemory: [], networkIngress: [], @@ -91,10 +95,6 @@ const defaultContent: Content = { diskRead: [], diskWrite: [], }, - chain: {}, - txpool: {}, - network: {}, - system: {}, logs: { log: [], }, @@ -108,7 +108,11 @@ const updaters = { version: replacer, commit: replacer, }, - home: { + home: null, + chain: null, + txpool: null, + network: null, + system: { activeMemory: appender(200), virtualMemory: appender(200), networkIngress: appender(200), @@ -118,11 +122,7 @@ const updaters = { diskRead: appender(200), diskWrite: appender(200), }, - chain: null, - txpool: null, - network: null, - system: null, - logs: { + logs: { log: appender(200), }, }; @@ -136,7 +136,7 @@ const styles = { height: '100%', zIndex: 1, overflow: 'hidden', - } + }, }; // themeStyles returns the styles generated from the theme for the component. @@ -178,7 +178,8 @@ class Dashboard extends Component<Props, State> { // reconnect establishes a websocket connection with the server, listens for incoming messages // and tries to reconnect on connection loss. reconnect = () => { - const server = new WebSocket(`${((window.location.protocol === 'https:') ? 'wss://' : 'ws://') + window.location.host}/api`); + // PROD is defined by webpack. + const server = new WebSocket(`${((window.location.protocol === 'https:') ? 'wss://' : 'ws://')}${PROD ? window.location.host : 'localhost:8080'}/api`); server.onopen = () => { this.setState({content: defaultContent, shouldUpdate: {}}); }; @@ -217,7 +218,6 @@ class Dashboard extends Component<Props, State> { return ( <div className={this.props.classes.dashboard} style={styles.dashboard}> <Header - opened={this.state.sideBar} switchSideBar={this.switchSideBar} /> <Body |