Skip to content

Commit

Permalink
start with sort, continue tomorrow
Browse files Browse the repository at this point in the history
  • Loading branch information
cle1000 committed Jun 6, 2016
1 parent ebd99da commit f6db0de
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 36 deletions.
41 changes: 11 additions & 30 deletions mitmproxy/web/static/app.js

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

5 changes: 3 additions & 2 deletions web/src/js/components/flowtable.js
Expand Up @@ -94,7 +94,7 @@ FlowTableHead.propTypes = {
};

const FlowTableHeadContainer = connect(
(state, ownProps) => ({
(state) => ({
sort: state.flows.sort
})
)(FlowTableHead)
Expand Down Expand Up @@ -215,7 +215,8 @@ const parseFilter = _.memoize(Filt.parse)

const FlowTableContainer = connect(
state => ({
flows: state.flows.view,
// first idea to sort here, but i think thats not good enough ( and not working yet)...
flows: state.flows.view.sort((a,b) => state.flows.sort.sortColumn ? a.response.status_code > b.response.status_code : 0),
})
)(FlowTable)

Expand Down
4 changes: 0 additions & 4 deletions web/src/js/components/mainview.js
Expand Up @@ -23,9 +23,6 @@ var MainView = React.createClass({
this.props.setHighlight(nextProps.location.query[Query.HIGHLIGHT], false)
}
},
setSortKeyFun: function (sortKeyFun) {
// FIXME: Move to redux. This requires that sortKeyFun is not a function anymore.
},
selectFlow: function (flow) {
// TODO: This belongs into redux
if (flow) {
Expand Down Expand Up @@ -161,7 +158,6 @@ var MainView = React.createClass({
<div className="main-view">
<FlowTable ref="flowTable"
selectFlow={this.selectFlow}
setSortKeyFun={(f) => console.log("asdf")}
setSort={this.props.setSort}
selected={this.props.selectedFlow} />
{details}
Expand Down

0 comments on commit f6db0de

Please sign in to comment.