diff options
author | Maximilian Hils <git@maximilianhils.com> | 2014-09-16 00:05:06 +0200 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2014-09-16 00:05:06 +0200 |
commit | acdd182754625fabcfc2c6ed4bdad8a63bce8ad6 (patch) | |
tree | bd48b8c269790d31913a13ecac8969c9d6413f0e /web/src/js/components/TrafficTable.react.js | |
parent | 1d9b1f79a11feb57043be1d9d656f4c1638d3357 (diff) | |
download | mitmproxy-acdd182754625fabcfc2c6ed4bdad8a63bce8ad6.tar.gz mitmproxy-acdd182754625fabcfc2c6ed4bdad8a63bce8ad6.tar.bz2 mitmproxy-acdd182754625fabcfc2c6ed4bdad8a63bce8ad6.zip |
web: implement EventLogStore
Diffstat (limited to 'web/src/js/components/TrafficTable.react.js')
-rw-r--r-- | web/src/js/components/TrafficTable.react.js | 33 |
1 files changed, 13 insertions, 20 deletions
diff --git a/web/src/js/components/TrafficTable.react.js b/web/src/js/components/TrafficTable.react.js index 442f8da2..d6a4f200 100644 --- a/web/src/js/components/TrafficTable.react.js +++ b/web/src/js/components/TrafficTable.react.js @@ -1,36 +1,29 @@ /** @jsx React.DOM */ var TrafficTable = React.createClass({ - /*getInitialState: function(){ + getInitialState: function(){ return { flows: [] }; - },*/ - componentDidMount: function () { - /*var flowStore = new DummyFlowStore([]); - this.setState({flowStore: flowStore}); - - flowStore.addChangeListener(this.onFlowsChange); - - $.getJSON("/flows.json").success(function (flows) { - flows.forEach(function (flow, i) { - window.setTimeout(function () { - flowStore.addFlow(flow); - }, _.random(i*400,i*400+1000)); - }); - }.bind(this));*/ }, - componentWillUnmount: function(){ - //this.state.flowStore.close(); + componentDidMount(){ + //this.flowStore = FlowStore.getView(); + //this.flowStore.addListener("change",this.onFlowChange); + }, + componentWillUnmount(){ + //this.flowStore.removeListener("change",this.onFlowChange); + //this.flowStore.close(); }, - onFlowsChange: function(event, flows){ - //this.setState({flows: flows.getAll()}); + onFlowChange(){ + this.setState({ + //flows: this.flowStore.getAll() + }); }, render: function () { /*var flows = this.state.flows.map(function(flow){ return <div>{flow.request.method} {flow.request.scheme}://{flow.request.host}{flow.request.path}</div>; }); *//**/ - x = "WTF"; + x = "Flow"; i = 12; while(i--) x += x; return <div><pre>{x}</pre></div>; |