From 51db9a5612f0899ed61751dbee3f4e4b19a74ea4 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Wed, 17 Sep 2014 02:13:37 +0200 Subject: formatting --- web/src/js/components/eventlog.jsx | 14 +++++++------- web/src/js/components/footer.jsx | 4 ++-- web/src/js/components/header.jsx | 22 +++++++++++----------- web/src/js/components/proxyapp.jsx | 18 +++++++++--------- web/src/js/components/traffictable.jsx | 18 +++++++++--------- 5 files changed, 38 insertions(+), 38 deletions(-) (limited to 'web/src/js/components') diff --git a/web/src/js/components/eventlog.jsx b/web/src/js/components/eventlog.jsx index 530e9f4f..340de8bd 100644 --- a/web/src/js/components/eventlog.jsx +++ b/web/src/js/components/eventlog.jsx @@ -1,30 +1,30 @@ /** @jsx React.DOM */ var EventLog = React.createClass({ - getInitialState: function() { + getInitialState: function () { return { log: [] }; }, - componentDidMount: function() { + componentDidMount: function () { this.log = EventLogStore.getView(); this.log.addListener("change", this.onEventLogChange); }, - componentWillUnmount: function() { + componentWillUnmount: function () { this.log.removeListener("change", this.onEventLogChange); this.log.close(); }, - onEventLogChange: function() { + onEventLogChange: function () { this.setState({ log: this.log.getAll() }); }, - close: function() { + close: function () { SettingsActions.update({ showEventLog: false }); }, - render: function() { + render: function () { //var messages = this.state.log.map(row => (
{row.message}
)); var messages = []; return ( @@ -34,6 +34,6 @@ var EventLog = React.createClass({ {messages} - ); + ); } }); diff --git a/web/src/js/components/footer.jsx b/web/src/js/components/footer.jsx index 6d5b75a1..9bcbbc2a 100644 --- a/web/src/js/components/footer.jsx +++ b/web/src/js/components/footer.jsx @@ -1,12 +1,12 @@ /** @jsx React.DOM */ var Footer = React.createClass({ - render: function(){ + render: function () { var mode = this.props.settings.mode; return ( - ); + ); } }); diff --git a/web/src/js/components/header.jsx b/web/src/js/components/header.jsx index e6350171..8f613ff1 100644 --- a/web/src/js/components/header.jsx +++ b/web/src/js/components/header.jsx @@ -1,28 +1,28 @@ /** @jsx React.DOM */ var MainMenu = React.createClass({ - toggleEventLog: function() { + toggleEventLog: function () { SettingsActions.update({ showEventLog: !this.props.settings.showEventLog }); }, - render: function(){ + render: function () { return (
- ); + ); } }); var ToolsMenu = React.createClass({ - render: function(){ + render: function () { return
Tools Menu
; } }); var ReportsMenu = React.createClass({ - render: function(){ + render: function () { return
Reports Menu
; } }); @@ -47,22 +47,22 @@ var _Header_Entries = { }; var Header = React.createClass({ - getInitialState: function(){ + getInitialState: function () { return { active: "main" }; }, - handleClick: function(active){ + handleClick: function (active) { this.setState({active: active}); ReactRouter.transitionTo(_Header_Entries[active].route); return false; }, - handleFileClick: function(){ + handleFileClick: function () { console.log("File click"); }, - render: function(){ + render: function () { var header = []; - for(var item in _Header_Entries){ + for (var item in _Header_Entries) { var classes = this.state.active == item ? "active" : ""; header.push({ _Header_Entries[item].title }); @@ -84,6 +84,6 @@ var Header = React.createClass({ { menu } - ); + ); } }); diff --git a/web/src/js/components/proxyapp.jsx b/web/src/js/components/proxyapp.jsx index 14c338e3..fff1d8d0 100644 --- a/web/src/js/components/proxyapp.jsx +++ b/web/src/js/components/proxyapp.jsx @@ -2,27 +2,27 @@ //TODO: Move out of here, just a stub. var Reports = React.createClass({ - render: function(){ - return
Report Editor
; + render: function () { + return
ReportEditor
; } }); var ProxyAppMain = React.createClass({ - getInitialState: function(){ + getInitialState: function () { return { settings: SettingsStore.getAll() }; }, - componentDidMount: function(){ + componentDidMount: function () { SettingsStore.addListener("change", this.onSettingsChange); }, - componentWillUnmount: function(){ + componentWillUnmount: function () { SettingsStore.removeListener("change", this.onSettingsChange); }, - onSettingsChange: function(){ + onSettingsChange: function () { console.log("onSettingsChange"); this.setState({settings: SettingsStore.getAll()}); }, - render: function() { + render: function () { return (
@@ -30,7 +30,7 @@ var ProxyAppMain = React.createClass({ {this.state.settings.showEventLog ? : null}
- ); + ); } }); @@ -43,4 +43,4 @@ var ProxyApp = ( -); + ); diff --git a/web/src/js/components/traffictable.jsx b/web/src/js/components/traffictable.jsx index 69b89a64..8071b97e 100644 --- a/web/src/js/components/traffictable.jsx +++ b/web/src/js/components/traffictable.jsx @@ -1,34 +1,34 @@ /** @jsx React.DOM */ var TrafficTable = React.createClass({ - getInitialState: function() { + getInitialState: function () { return { flows: [] }; }, - componentDidMount: function() { + componentDidMount: function () { //this.flowStore = FlowStore.getView(); //this.flowStore.addListener("change",this.onFlowChange); }, - componentWillUnmount: function() { + componentWillUnmount: function () { //this.flowStore.removeListener("change",this.onFlowChange); //this.flowStore.close(); }, - onFlowChange: function() { + onFlowChange: function () { this.setState({ //flows: this.flowStore.getAll() }); }, - render: function() { + render: function () { /*var flows = this.state.flows.map(function(flow){ - return
{flow.request.method} {flow.request.scheme}://{flow.request.host}{flow.request.path}
; - }); */ + return
{flow.request.method} {flow.request.scheme}://{flow.request.host}{flow.request.path}
; + }); */ //Dummy Text for layout testing x = "Flow"; i = 12; while (i--) x += x; - return ( + return (
Flow
- ); + ); } }); -- cgit v1.2.3