diff options
Diffstat (limited to 'web/src/js')
-rw-r--r-- | web/src/js/components/flowtable.js | 5 | ||||
-rw-r--r-- | web/src/js/components/mainview.js | 4 |
2 files changed, 3 insertions, 6 deletions
diff --git a/web/src/js/components/flowtable.js b/web/src/js/components/flowtable.js index 642ded17..89bcfc39 100644 --- a/web/src/js/components/flowtable.js +++ b/web/src/js/components/flowtable.js @@ -94,7 +94,7 @@ FlowTableHead.propTypes = { }; const FlowTableHeadContainer = connect( - (state, ownProps) => ({ + (state) => ({ sort: state.flows.sort }) )(FlowTableHead) @@ -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) diff --git a/web/src/js/components/mainview.js b/web/src/js/components/mainview.js index 99cdeb3c..5237bddb 100644 --- a/web/src/js/components/mainview.js +++ b/web/src/js/components/mainview.js @@ -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) { @@ -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} |