Skip to content

Commit

Permalink
s/filter/search/
Browse files Browse the repository at this point in the history
no matter what we agree on in mitmproxy#542,
this needs to be done anyway.
  • Loading branch information
mhils committed Mar 29, 2015
1 parent a32698f commit 7370029
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
18 changes: 9 additions & 9 deletions libmproxy/web/static/app.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion web/src/js/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ var FlowActions = {
};

var Query = {
FILTER: "f",
SEARCH: "s",
HIGHLIGHT: "h",
SHOW_EVENTLOG: "e"
};
Expand Down
12 changes: 6 additions & 6 deletions web/src/js/components/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ var MainMenu = React.createClass({
},
onFilterChange: function (val) {
var d = {};
d[Query.FILTER] = val;
d[Query.SEARCH] = val;
this.setQuery(d);
},
onHighlightChange: function (val) {
Expand All @@ -179,19 +179,19 @@ var MainMenu = React.createClass({
actions.SettingsActions.update({intercept: val});
},
render: function () {
var filter = this.getQuery()[Query.FILTER] || "";
var search = this.getQuery()[Query.SEARCH] || "";
var highlight = this.getQuery()[Query.HIGHLIGHT] || "";
var intercept = this.state.settings.intercept || "";

return (
<div>
<div className="menu-row">
<FilterInput
ref="filter"
placeholder="Filter"
type="filter"
ref="search"
placeholder="Search"
type="search"
color="black"
value={filter}
value={search}
onChange={this.onFilterChange} />
<FilterInput
ref="highlight"
Expand Down
4 changes: 2 additions & 2 deletions web/src/js/components/mainview.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ var MainView = React.createClass({
},
getViewFilt: function () {
try {
var filt = Filt.parse(this.getQuery()[Query.FILTER] || "");
var filt = Filt.parse(this.getQuery()[Query.SEARCH] || "");
var highlightStr = this.getQuery()[Query.HIGHLIGHT];
var highlight = highlightStr ? Filt.parse(highlightStr) : false;
} catch (e) {
Expand All @@ -57,7 +57,7 @@ var MainView = React.createClass({
};
},
componentWillReceiveProps: function (nextProps) {
var filterChanged = (this.props.query[Query.FILTER] !== nextProps.query[Query.FILTER]);
var filterChanged = (this.props.query[Query.SEARCH] !== nextProps.query[Query.SEARCH]);
var highlightChanged = (this.props.query[Query.HIGHLIGHT] !== nextProps.query[Query.HIGHLIGHT]);
if (filterChanged || highlightChanged) {
this.state.view.recalculate(this.getViewFilt(), this.state.sortKeyFun);
Expand Down

0 comments on commit 7370029

Please sign in to comment.