aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/js/components/proxyapp.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/src/js/components/proxyapp.js')
-rw-r--r--web/src/js/components/proxyapp.js15
1 files changed, 10 insertions, 5 deletions
diff --git a/web/src/js/components/proxyapp.js b/web/src/js/components/proxyapp.js
index 4c790d3d..99b64580 100644
--- a/web/src/js/components/proxyapp.js
+++ b/web/src/js/components/proxyapp.js
@@ -1,6 +1,8 @@
import React from "react";
import ReactDOM from "react-dom";
import _ from "lodash";
+import {connect} from 'react-redux'
+import { Route, Router as ReactRouter, hashHistory, Redirect} from "react-router"
import {Splitter} from "./common.js"
import MainView from "./mainview.js";
@@ -8,7 +10,6 @@ import Footer from "./footer.js";
import {Header, MainMenu} from "./header.js";
import EventLog from "./eventlog.js"
import {EventLogStore, FlowStore, SettingsStore} from "../store/store.js";
-import {Query} from "../actions.js";
import {Key} from "../utils.js";
@@ -120,10 +121,10 @@ var ProxyAppMain = React.createClass({
render: function () {
var query = this.getQuery();
var eventlog;
- if (this.props.location.query[Query.SHOW_EVENTLOG]) {
+ if (this.props.showEventLog) {
eventlog = [
<Splitter key="splitter" axis="y"/>,
- <EventLog key="eventlog" updateLocation={this.updateLocation}/>
+ <EventLog key="eventlog"/>
];
} else {
eventlog = null;
@@ -142,13 +143,17 @@ var ProxyAppMain = React.createClass({
}
});
+const AppContainer = connect(
+ state => ({
+ showEventLog: state.eventLog.visible
+ })
+)(ProxyAppMain);
-import { Route, Router as ReactRouter, hashHistory, Redirect} from "react-router";
export var App = (
<ReactRouter history={hashHistory}>
<Redirect from="/" to="/flows" />
- <Route path="/" component={ProxyAppMain}>
+ <Route path="/" component={AppContainer}>
<Route path="flows" component={MainView}/>
<Route path="flows/:flowId/:detailTab" component={MainView}/>
<Route path="reports" component={Reports}/>