diff options
author | Maximilian Hils <git@maximilianhils.com> | 2014-09-18 00:01:45 +0200 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2014-09-18 00:01:45 +0200 |
commit | 6a161be6b4c526fcc5f6581c7faff00a2c976f37 (patch) | |
tree | 6b99c30538a57e096c4fd01a923fc8542e90e6e4 /libmproxy/web/static/js | |
parent | b99de36b24e4687e35069fbfa18727519f23ea35 (diff) | |
download | mitmproxy-6a161be6b4c526fcc5f6581c7faff00a2c976f37.tar.gz mitmproxy-6a161be6b4c526fcc5f6581c7faff00a2c976f37.tar.bz2 mitmproxy-6a161be6b4c526fcc5f6581c7faff00a2c976f37.zip |
.jsx -> .jsx.js
Rename jsx files to be compatible with Chrome Dev Tools and
Workspace Mapping.
Diffstat (limited to 'libmproxy/web/static/js')
-rw-r--r-- | libmproxy/web/static/js/app.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libmproxy/web/static/js/app.js b/libmproxy/web/static/js/app.js index ea49db4d..df1c91de 100644 --- a/libmproxy/web/static/js/app.js +++ b/libmproxy/web/static/js/app.js @@ -456,7 +456,7 @@ var FlowRow = React.createClass({displayName: 'FlowRow', flow: flow }); }.bind(this)); - return React.DOM.tr(null, columns); + return React.DOM.tr({onClick: this.props.onClick}, columns); } }); @@ -473,7 +473,7 @@ var FlowTableBody = React.createClass({displayName: 'FlowTableBody', render: function(){ var rows = this.props.flows.map(function(flow){ //TODO: Add UUID - return FlowRow({flow: flow, columns: this.props.columns}); + return FlowRow({onClick: this.props.onClick, flow: flow, columns: this.props.columns}); }.bind(this)); return React.DOM.tbody(null, rows); } @@ -593,6 +593,9 @@ var FlowTable = React.createClass({displayName: 'FlowTable', flows: this.flowStore.getAll() }); }, + onClick: function(e){ + console.log("rowclick", e); + }, render: function () { var flows = this.state.flows.map(function(flow){ return React.DOM.div(null, flow.request.method, " ", flow.request.scheme, "://", flow.request.host, flow.request.path); @@ -600,7 +603,7 @@ var FlowTable = React.createClass({displayName: 'FlowTable', return ( React.DOM.table({className: "flow-table"}, FlowTableHead({columns: this.state.columns}), - FlowTableBody({columns: this.state.columns, flows: this.state.flows}) + FlowTableBody({onClick: this.onClick, columns: this.state.columns, flows: this.state.flows}) ) ); } |