diff options
author | Maximilian Hils <git@maximilianhils.com> | 2016-03-10 21:17:24 +0100 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2016-03-10 21:17:24 +0100 |
commit | 448d28e2cbe5020f97bccc80e9a7e1e5a3df9990 (patch) | |
tree | 8eae7351b1ef8d4f2eea4b34628e5d54908767bc /web/src/js/components/mainview.js | |
parent | 167bd7768346a75910ca0d3828d02a16887de090 (diff) | |
parent | 4a6edd92e661fa228f6f8607f045ef5489f58a05 (diff) | |
download | mitmproxy-448d28e2cbe5020f97bccc80e9a7e1e5a3df9990.tar.gz mitmproxy-448d28e2cbe5020f97bccc80e9a7e1e5a3df9990.tar.bz2 mitmproxy-448d28e2cbe5020f97bccc80e9a7e1e5a3df9990.zip |
Merge branch 'master' of https://github.com/mitmproxy/mitmproxy
Diffstat (limited to 'web/src/js/components/mainview.js')
-rw-r--r-- | web/src/js/components/mainview.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/web/src/js/components/mainview.js b/web/src/js/components/mainview.js index cc1f05ae..87c0c4bd 100644 --- a/web/src/js/components/mainview.js +++ b/web/src/js/components/mainview.js @@ -75,12 +75,12 @@ var MainView = React.createClass({ } }, onUpdate: function (flow) { - if (flow.id === this.getParams().flowId) { + if (flow.id === this.props.routeParams.flowId) { this.forceUpdate(); } }, onRemove: function (flow_id, index) { - if (flow_id === this.getParams().flowId) { + if (flow_id === this.props.routeParams.flowId) { var flow_to_select = this.state.view.list[Math.min(index, this.state.view.list.length - 1)]; this.selectFlow(flow_to_select); } @@ -93,7 +93,7 @@ var MainView = React.createClass({ }, selectFlow: function (flow) { if (flow) { - var tab = this.getParams().detailTab || "request"; + var tab = this.props.routeParams.detailTab || "request"; this.updateLocation(`/flows/${flow.id}/${tab}`); this.refs.flowTable.scrollIntoView(flow); } else { @@ -103,14 +103,14 @@ var MainView = React.createClass({ selectFlowRelative: function (shift) { var flows = this.state.view.list; var index; - if (!this.getParams().flowId) { + if (!this.props.routeParams.flowId) { if (shift < 0) { index = flows.length - 1; } else { index = 0; } } else { - var currFlowId = this.getParams().flowId; + var currFlowId = this.props.routeParams.flowId; var i = flows.length; while (i--) { if (flows[i].id === currFlowId) { @@ -212,7 +212,7 @@ var MainView = React.createClass({ e.preventDefault(); }, getSelected: function () { - return this.context.flowStore.get(this.getParams().flowId); + return this.context.flowStore.get(this.props.routeParams.flowId); }, render: function () { var selected = this.getSelected(); @@ -224,7 +224,7 @@ var MainView = React.createClass({ <FlowView key="flowDetails" ref="flowDetails" - tab={this.getParams().detailTab} + tab={this.props.routeParams.detailTab} flow={selected}/> ]; } else { |