diff options
author | Maximilian Hils <git@maximilianhils.com> | 2014-11-26 04:18:21 +0100 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2014-11-26 04:18:21 +0100 |
commit | ed8249023fb7c0d429b9278c63b51ac071700987 (patch) | |
tree | 8bd83354e7484f15029ec678744234bd32e9906d /web/src/js/components/mainview.jsx.js | |
parent | 47a78e3c729f4ddb7971b72bfae30140562f4dd6 (diff) | |
download | mitmproxy-ed8249023fb7c0d429b9278c63b51ac071700987.tar.gz mitmproxy-ed8249023fb7c0d429b9278c63b51ac071700987.tar.bz2 mitmproxy-ed8249023fb7c0d429b9278c63b51ac071700987.zip |
introduce revised views, port over changes from multiple_views branch
Diffstat (limited to 'web/src/js/components/mainview.jsx.js')
-rw-r--r-- | web/src/js/components/mainview.jsx.js | 12 |
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) { |