diff options
author | Maximilian Hils <git@maximilianhils.com> | 2014-11-27 01:38:30 +0100 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2014-11-27 01:38:30 +0100 |
commit | 38bf34ebd9826c6f69d97906282632fbd5cff06b (patch) | |
tree | 1616a6918c4b1a939a810a441a033ea5cf4b0122 /web/src/js/components/proxyapp.jsx.js | |
parent | 021e209ce0fbfa5fa993ad43e8167a29a759d120 (diff) | |
download | mitmproxy-38bf34ebd9826c6f69d97906282632fbd5cff06b.tar.gz mitmproxy-38bf34ebd9826c6f69d97906282632fbd5cff06b.tar.bz2 mitmproxy-38bf34ebd9826c6f69d97906282632fbd5cff06b.zip |
web++
Diffstat (limited to 'web/src/js/components/proxyapp.jsx.js')
-rw-r--r-- | web/src/js/components/proxyapp.jsx.js | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/web/src/js/components/proxyapp.jsx.js b/web/src/js/components/proxyapp.jsx.js index ff6e8da1..3545cfe0 100644 --- a/web/src/js/components/proxyapp.jsx.js +++ b/web/src/js/components/proxyapp.jsx.js @@ -1,5 +1,3 @@ -/** @jsx React.DOM */ - //TODO: Move out of here, just a stub. var Reports = React.createClass({ render: function () { @@ -10,7 +8,10 @@ var Reports = React.createClass({ var ProxyAppMain = React.createClass({ getInitialState: function () { - return { settings: SettingsStore.getAll() }; + return { + settings: SettingsStore.getAll(), + flowStore: new LiveFlowStore() + }; }, componentDidMount: function () { SettingsStore.addListener("change", this.onSettingsChange); @@ -25,30 +26,28 @@ var ProxyAppMain = React.createClass({ return ( <div id="container"> <Header settings={this.state.settings}/> - <this.props.activeRouteHandler settings={this.state.settings}/> + <RouteHandler settings={this.state.settings} flowStore={this.state.flowStore}/> {this.state.settings.showEventLog ? <Splitter axis="y"/> : null} {this.state.settings.showEventLog ? <EventLog/> : null} <Footer settings={this.state.settings}/> </div> - ); + ); } }); -var Routes = ReactRouter.Routes; var Route = ReactRouter.Route; +var RouteHandler = ReactRouter.RouteHandler; var Redirect = ReactRouter.Redirect; var DefaultRoute = ReactRouter.DefaultRoute; var NotFoundRoute = ReactRouter.NotFoundRoute; -var ProxyApp = ( - <Routes location="hash"> - <Route path="/" handler={ProxyAppMain}> - <Route name="flows" path="flows" handler={MainView}/> - <Route name="flow" path="flows/:flowId/:detailTab" handler={MainView}/> - <Route name="reports" handler={Reports}/> - <Redirect path="/" to="flows" /> - </Route> - </Routes> - );
\ No newline at end of file +var routes = ( + <Route path="/" handler={ProxyAppMain}> + <Route name="flows" path="flows" handler={MainView}/> + <Route name="flow" path="flows/:flowId/:detailTab" handler={MainView}/> + <Route name="reports" handler={Reports}/> + <Redirect path="/" to="flows" /> + </Route> +);
\ No newline at end of file |