aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/js/components/mainview.jsx.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/src/js/components/mainview.jsx.js')
-rw-r--r--web/src/js/components/mainview.jsx.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/web/src/js/components/mainview.jsx.js b/web/src/js/components/mainview.jsx.js
index 795b8136..f0dfb59a 100644
--- a/web/src/js/components/mainview.jsx.js
+++ b/web/src/js/components/mainview.jsx.js
@@ -7,8 +7,14 @@ var MainView = React.createClass({
};
},
componentDidMount: function () {
- this.flowStore = FlowStore.getView();
- this.flowStore.addListener("change",this.onFlowChange);
+ //FIXME: The store should be global, move out of here.
+ window.flowstore = new LiveFlowStore();
+
+ this.flowStore = window.flowstore.open_view();
+ this.flowStore.addListener("add",this.onFlowChange);
+ this.flowStore.addListener("update",this.onFlowChange);
+ this.flowStore.addListener("remove",this.onFlowChange);
+ this.flowStore.addListener("recalculate",this.onFlowChange);
},
componentWillUnmount: function () {
this.flowStore.removeListener("change",this.onFlowChange);
@@ -16,7 +22,7 @@ var MainView = React.createClass({
},
onFlowChange: function () {
this.setState({
- flows: this.flowStore.getAll()
+ flows: this.flowStore.flows
});
},
selectDetailTab: function(panel) {