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/mainview.js | |
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/mainview.js')
-rw-r--r-- | web/src/js/components/mainview.js | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/web/src/js/components/mainview.js b/web/src/js/components/mainview.js index 9ff51dfa..86666e39 100644 --- a/web/src/js/components/mainview.js +++ b/web/src/js/components/mainview.js @@ -42,7 +42,8 @@ var MainView = React.createClass({ }, getViewFilt: function () { try { - var filt = Filt.parse(this.getQuery()[Query.SEARCH] || ""); + var filtStr = this.getQuery()[Query.SEARCH]; + var filt = filtStr ? Filt.parse(filtStr) : function(){return true}; var highlightStr = this.getQuery()[Query.HIGHLIGHT]; var highlight = highlightStr ? Filt.parse(highlightStr) : false; } catch (e) { @@ -90,16 +91,11 @@ var MainView = React.createClass({ }, selectFlow: function (flow) { if (flow) { - this.replaceWith( - "flow", - { - flowId: flow.id, - detailTab: this.getParams().detailTab || "request" - } - ); + var tab = this.getParams().detailTab || "request"; + this.replaceWith(`/flows/${flow.id}/${tab}`); this.refs.flowTable.scrollIntoView(flow); } else { - this.replaceWith("flows", {}); + this.replaceWith("/flows"); } }, selectFlowRelative: function (shift) { |