diff options
Diffstat (limited to 'web/src/js/components')
-rw-r--r-- | web/src/js/components/FlowTable/FlowTableHead.jsx | 14 | ||||
-rw-r--r-- | web/src/js/components/Header/MainMenu.jsx | 10 | ||||
-rw-r--r-- | web/src/js/components/MainView.jsx | 9 |
3 files changed, 15 insertions, 18 deletions
diff --git a/web/src/js/components/FlowTable/FlowTableHead.jsx b/web/src/js/components/FlowTable/FlowTableHead.jsx index 50242737..b201285f 100644 --- a/web/src/js/components/FlowTable/FlowTableHead.jsx +++ b/web/src/js/components/FlowTable/FlowTableHead.jsx @@ -3,15 +3,15 @@ import { connect } from 'react-redux' import classnames from 'classnames' import columns from './FlowColumns' -import { updateSort } from '../../ducks/flowView' +import { setSort } from '../../ducks/flows' FlowTableHead.propTypes = { - updateSort: PropTypes.func.isRequired, + setSort: PropTypes.func.isRequired, sortDesc: React.PropTypes.bool.isRequired, sortColumn: React.PropTypes.string, } -function FlowTableHead({ sortColumn, sortDesc, updateSort }) { +function FlowTableHead({ sortColumn, sortDesc, setSort }) { const sortType = sortDesc ? 'sort-desc' : 'sort-asc' return ( @@ -19,7 +19,7 @@ function FlowTableHead({ sortColumn, sortDesc, updateSort }) { {columns.map(Column => ( <th className={classnames(Column.headerClass, sortColumn === Column.name && sortType)} key={Column.name} - onClick={() => updateSort(Column.name, Column.name !== sortColumn ? false : !sortDesc)}> + onClick={() => setSort(Column.name, Column.name !== sortColumn ? false : !sortDesc)}> {Column.headerName} </th> ))} @@ -29,10 +29,10 @@ function FlowTableHead({ sortColumn, sortDesc, updateSort }) { export default connect( state => ({ - sortDesc: state.flowView.sort.desc, - sortColumn: state.flowView.sort.column, + sortDesc: state.flows.sort.desc, + sortColumn: state.flows.sort.column, }), { - updateSort + setSort } )(FlowTableHead) diff --git a/web/src/js/components/Header/MainMenu.jsx b/web/src/js/components/Header/MainMenu.jsx index 7236d31f..5ab3fa9d 100644 --- a/web/src/js/components/Header/MainMenu.jsx +++ b/web/src/js/components/Header/MainMenu.jsx @@ -2,7 +2,7 @@ import React, { Component, PropTypes } from 'react' import { connect } from 'react-redux' import FilterInput from './FilterInput' import { update as updateSettings } from '../../ducks/settings' -import { updateFilter, updateHighlight } from '../../ducks/flowView' +import { setFilter, setHighlight } from '../../ducks/flows' MainMenu.title = "Start" @@ -31,20 +31,20 @@ const InterceptInput = connect( const FlowFilterInput = connect( state => ({ - value: state.flowView.filter || '', + value: state.flows.filter || '', placeholder: 'Search', type: 'search', color: 'black' }), - { onChange: updateFilter } + { onChange: setFilter } )(FilterInput); const HighlightInput = connect( state => ({ - value: state.flowView.highlight || '', + value: state.flows.highlight || '', placeholder: 'Highlight', type: 'tag', color: 'hsl(48, 100%, 50%)' }), - { onChange: updateHighlight } + { onChange: setHighlight } )(FilterInput); diff --git a/web/src/js/components/MainView.jsx b/web/src/js/components/MainView.jsx index 8be6f21c..5c9a2d30 100644 --- a/web/src/js/components/MainView.jsx +++ b/web/src/js/components/MainView.jsx @@ -4,7 +4,6 @@ import Splitter from './common/Splitter' import FlowTable from './FlowTable' import FlowView from './FlowView' import * as flowsActions from '../ducks/flows' -import { updateFilter, updateHighlight } from '../ducks/flowView' class MainView extends Component { @@ -41,16 +40,14 @@ class MainView extends Component { export default connect( state => ({ - flows: state.flowView.data, - filter: state.flowView.filter, - highlight: state.flowView.highlight, + flows: state.flows.view, + filter: state.flows.filter, + highlight: state.flows.highlight, selectedFlow: state.flows.byId[state.flows.selected[0]], tab: state.ui.flow.tab, }), { selectFlow: flowsActions.select, - updateFilter, - updateHighlight, updateFlow: flowsActions.update, } )(MainView) |