aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/js/components/TrafficTable.react.js
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2014-09-15 18:08:26 +0200
committerMaximilian Hils <git@maximilianhils.com>2014-09-15 18:08:26 +0200
commitcbf18320cdbd05197f232da69b3c9a5391735156 (patch)
tree63b9cf8fd6a8e8fb5be6b2d5a655acf3d33b6229 /web/src/js/components/TrafficTable.react.js
parent9f8d2eea64d4611c1e2f7e7043fe6d3ef9a6aa40 (diff)
downloadmitmproxy-cbf18320cdbd05197f232da69b3c9a5391735156.tar.gz
mitmproxy-cbf18320cdbd05197f232da69b3c9a5391735156.tar.bz2
mitmproxy-cbf18320cdbd05197f232da69b3c9a5391735156.zip
client-side structure
Diffstat (limited to 'web/src/js/components/TrafficTable.react.js')
-rw-r--r--web/src/js/components/TrafficTable.react.js38
1 files changed, 38 insertions, 0 deletions
diff --git a/web/src/js/components/TrafficTable.react.js b/web/src/js/components/TrafficTable.react.js
new file mode 100644
index 00000000..442f8da2
--- /dev/null
+++ b/web/src/js/components/TrafficTable.react.js
@@ -0,0 +1,38 @@
+/** @jsx React.DOM */
+
+var TrafficTable = React.createClass({
+ /*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();
+ },
+ onFlowsChange: function(event, flows){
+ //this.setState({flows: flows.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";
+ i = 12;
+ while(i--) x += x;
+ return <div><pre>{x}</pre></div>;
+ }
+}); \ No newline at end of file