aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/js/components/mainview.js
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2016-05-27 11:43:01 -0700
committerMaximilian Hils <git@maximilianhils.com>2016-05-27 11:43:01 -0700
commitabf3cae54e715e53559b4c7103f8b2247ed791dc (patch)
tree765b55027aba7685264e838d285c0587d18b9205 /web/src/js/components/mainview.js
parent22ecd022a84e1c3762dd425bc9bee2230e393d8d (diff)
parent9e869f0aa17cbd202f72bab1540d866f7274a8a1 (diff)
downloadmitmproxy-abf3cae54e715e53559b4c7103f8b2247ed791dc.tar.gz
mitmproxy-abf3cae54e715e53559b4c7103f8b2247ed791dc.tar.bz2
mitmproxy-abf3cae54e715e53559b4c7103f8b2247ed791dc.zip
Merge pull request #1169 from gzzhanghao/contentview
[web] Eliminate Router mixin and RawMixin
Diffstat (limited to 'web/src/js/components/mainview.js')
-rw-r--r--web/src/js/components/mainview.js13
1 files changed, 7 insertions, 6 deletions
diff --git a/web/src/js/components/mainview.js b/web/src/js/components/mainview.js
index 87c0c4bd..964e82db 100644
--- a/web/src/js/components/mainview.js
+++ b/web/src/js/components/mainview.js
@@ -5,12 +5,11 @@ import {Query} from "../actions.js";
import {Key} from "../utils.js";
import {StoreView} from "../store/view.js";
import Filt from "../filt/filt.js";
-import { Router, Splitter} from "./common.js"
+import {Splitter} from "./common.js"
import FlowTable from "./flowtable.js";
import FlowView from "./flowview/index.js";
var MainView = React.createClass({
- mixins: [Router],
contextTypes: {
flowStore: React.PropTypes.object.isRequired,
},
@@ -41,9 +40,9 @@ var MainView = React.createClass({
},
getViewFilt: function () {
try {
- var filtStr = this.getQuery()[Query.SEARCH];
+ var filtStr = this.props.query[Query.SEARCH];
var filt = filtStr ? Filt.parse(filtStr) : () => true;
- var highlightStr = this.getQuery()[Query.HIGHLIGHT];
+ var highlightStr = this.props.query[Query.HIGHLIGHT];
var highlight = highlightStr ? Filt.parse(highlightStr) : () => false;
} catch (e) {
console.error("Error when processing filter: " + e);
@@ -94,10 +93,10 @@ var MainView = React.createClass({
selectFlow: function (flow) {
if (flow) {
var tab = this.props.routeParams.detailTab || "request";
- this.updateLocation(`/flows/${flow.id}/${tab}`);
+ this.props.updateLocation(`/flows/${flow.id}/${tab}`);
this.refs.flowTable.scrollIntoView(flow);
} else {
- this.updateLocation("/flows");
+ this.props.updateLocation("/flows");
}
},
selectFlowRelative: function (shift) {
@@ -225,6 +224,8 @@ var MainView = React.createClass({
key="flowDetails"
ref="flowDetails"
tab={this.props.routeParams.detailTab}
+ query={this.props.query}
+ updateLocation={this.props.updateLocation}
flow={selected}/>
];
} else {