diff options
author | Maximilian Hils <git@maximilianhils.com> | 2016-02-28 22:35:08 +0100 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2016-02-28 22:35:08 +0100 |
commit | cbb068edaaa4a91297cc8c6416dcbc274b3e1317 (patch) | |
tree | 74a21b74a402295c3e5f687babda30b4682e37de /web/src/js/components/flowview | |
parent | ade5078ebde142a83692bd5e940f6463e6ee52c7 (diff) | |
download | mitmproxy-cbb068edaaa4a91297cc8c6416dcbc274b3e1317.tar.gz mitmproxy-cbb068edaaa4a91297cc8c6416dcbc274b3e1317.tar.bz2 mitmproxy-cbb068edaaa4a91297cc8c6416dcbc274b3e1317.zip |
fix up web stuff
Diffstat (limited to 'web/src/js/components/flowview')
-rw-r--r-- | web/src/js/components/flowview/index.js | 10 | ||||
-rw-r--r-- | web/src/js/components/flowview/messages.js | 3 |
2 files changed, 4 insertions, 9 deletions
diff --git a/web/src/js/components/flowview/index.js b/web/src/js/components/flowview/index.js index 739a46dc..91b17dd2 100644 --- a/web/src/js/components/flowview/index.js +++ b/web/src/js/components/flowview/index.js @@ -40,13 +40,7 @@ var FlowView = React.createClass({ this.selectTab(tabs[nextIndex]); }, selectTab: function (panel) { - this.replaceWith( - "flow", - { - flowId: this.getParams().flowId, - detailTab: panel - } - ); + this.replaceWith(`/flows/${this.getParams().flowId}/${panel}`); }, getActive: function(){ return this.getParams().detailTab; @@ -93,7 +87,7 @@ var FlowView = React.createClass({ var tabs = this.getTabs(flow); var active = this.getActive(); - if (!_.contains(tabs, active)) { + if (tabs.indexOf(active) < 0) { if (active === "response" && flow.error) { active = "error"; } else if (active === "error" && flow.response) { diff --git a/web/src/js/components/flowview/messages.js b/web/src/js/components/flowview/messages.js index 7ac95d85..c11ee46f 100644 --- a/web/src/js/components/flowview/messages.js +++ b/web/src/js/components/flowview/messages.js @@ -1,4 +1,5 @@ var React = require("react"); +var ReactDOM = require('react-dom'); var _ = require("lodash"); var common = require("../common.js"); @@ -98,7 +99,7 @@ var HeaderEditor = React.createClass({ return <ValueEditor ref="input" {...this.props} onKeyDown={this.onKeyDown} inline/>; }, focus: function () { - this.getDOMNode().focus(); + ReactDOM.findDOMNode(this).focus(); }, onKeyDown: function (e) { switch (e.keyCode) { |