From cbb068edaaa4a91297cc8c6416dcbc274b3e1317 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Sun, 28 Feb 2016 22:35:08 +0100 Subject: fix up web stuff --- web/src/js/components/mainview.js | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'web/src/js/components/mainview.js') 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) { -- cgit v1.2.3