diff options
author | Maximilian Hils <git@maximilianhils.com> | 2014-09-16 00:56:43 +0200 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2014-09-16 00:56:43 +0200 |
commit | 674bc4273e9a2f1a2e41ef977a80219423c7cb51 (patch) | |
tree | b343902da8a0de10f075c46c75f8ad135bc23192 /web/src/js/components/EventLog.react.js | |
parent | acdd182754625fabcfc2c6ed4bdad8a63bce8ad6 (diff) | |
download | mitmproxy-674bc4273e9a2f1a2e41ef977a80219423c7cb51.tar.gz mitmproxy-674bc4273e9a2f1a2e41ef977a80219423c7cb51.tar.bz2 mitmproxy-674bc4273e9a2f1a2e41ef977a80219423c7cb51.zip |
format javascript
Diffstat (limited to 'web/src/js/components/EventLog.react.js')
-rw-r--r-- | web/src/js/components/EventLog.react.js | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/web/src/js/components/EventLog.react.js b/web/src/js/components/EventLog.react.js index 3a7dedc8..6c7a7c58 100644 --- a/web/src/js/components/EventLog.react.js +++ b/web/src/js/components/EventLog.react.js @@ -1,37 +1,37 @@ /** @jsx React.DOM */ var EventLog = React.createClass({ - getInitialState(){ - return { - log: [] - }; - }, - componentDidMount(){ - this.log = EventLogStore.getView(); - this.log.addListener("change",this.onEventLogChange); - }, - componentWillUnmount(){ - this.log.removeListener("change",this.onEventLogChange); - this.log.close(); - }, - onEventLogChange(){ - this.setState({ - log: this.log.getAll() - }); - }, - close(){ - SettingsActions.update({ - showEventLog: false - }); - }, - render(){ - var messages = this.state.log.map(row => <div key={row.id}>{row.message}</div>); + getInitialState() { + return { + log: [] + }; + }, + componentDidMount() { + this.log = EventLogStore.getView(); + this.log.addListener("change", this.onEventLogChange); + }, + componentWillUnmount() { + this.log.removeListener("change", this.onEventLogChange); + this.log.close(); + }, + onEventLogChange() { + this.setState({ + log: this.log.getAll() + }); + }, + close() { + SettingsActions.update({ + showEventLog: false + }); + }, + render() { + var messages = this.state.log.map(row => (<div key={row.id}>{row.message}</div>)); return ( <div className="eventlog"> - <pre> - <i className="fa fa-close close-button" onClick={this.close}></i> - {messages} - </pre> + <pre> + <i className="fa fa-close close-button" onClick={this.close}></i> + {messages} + </pre> </div> ); } |