[web] fix data connection
This commit is contained in:
parent
3c4e81aeff
commit
749d710665
|
@ -69,8 +69,8 @@ class EventLog extends Component {
|
|||
|
||||
export default connect(
|
||||
state => ({
|
||||
filters: state.eventLog.filter,
|
||||
events: state.eventLog.filteredEvents,
|
||||
filters: state.eventLog.filters,
|
||||
events: state.eventLog.list.data,
|
||||
}),
|
||||
{
|
||||
onClose: toggleVisibility,
|
||||
|
|
|
@ -29,8 +29,8 @@ function FlowTableHead({ sortColumn, sortDesc, onSort }) {
|
|||
|
||||
export default connect(
|
||||
state => ({
|
||||
sortDesc: state.flows.sort.sortDesc,
|
||||
sortColumn: state.flows.sort.sortColumn,
|
||||
sortDesc: state.flows.sorter.desc,
|
||||
sortColumn: state.flows.sorter.column,
|
||||
}),
|
||||
{
|
||||
onSort: updateSorter,
|
||||
|
|
|
@ -51,7 +51,7 @@ class Header extends Component {
|
|||
}
|
||||
}
|
||||
export default connect(
|
||||
(state) => ({
|
||||
state => ({
|
||||
selectedFlow: state.flows.selected[0],
|
||||
activeMenu: state.ui.activeMenu
|
||||
}),
|
||||
|
|
|
@ -29,6 +29,6 @@ function FlowMenu({ flow }) {
|
|||
|
||||
export default connect(
|
||||
state => ({
|
||||
flow: state.flows.all.byId[state.flows.selected[0]]
|
||||
flow: state.flows.list.byId[state.flows.selected[0]]
|
||||
})
|
||||
)(FlowMenu)
|
||||
|
|
|
@ -154,7 +154,7 @@ class MainView extends Component {
|
|||
}
|
||||
|
||||
render() {
|
||||
const { flows, selectedFlow, highlight, sort } = this.props
|
||||
const { flows, selectedFlow, highlight } = this.props
|
||||
return (
|
||||
<div className="main-view">
|
||||
<FlowTable
|
||||
|
@ -182,11 +182,10 @@ class MainView extends Component {
|
|||
|
||||
export default connect(
|
||||
state => ({
|
||||
flows: state.flows.view,
|
||||
flows: state.flows.list.data,
|
||||
filter: state.flows.filter,
|
||||
sort: state.flows.sort,
|
||||
highlight: state.flows.highlight,
|
||||
selectedFlow: state.flows.all.byId[state.flows.selected[0]]
|
||||
selectedFlow: state.flows.list.byId[state.flows.selected[0]]
|
||||
}),
|
||||
{
|
||||
selectFlow,
|
||||
|
|
|
@ -116,7 +116,7 @@ export function updateSorter(column, desc, sortKeyFun) {
|
|||
/**
|
||||
* @public
|
||||
*/
|
||||
export function selectFlow(id) {
|
||||
export function select(id) {
|
||||
return (dispatch, getState) => {
|
||||
dispatch({ type: SELECT_FLOW, currentSelection: getState().flows.selected[0], id })
|
||||
}
|
||||
|
@ -141,7 +141,7 @@ export function acceptAll() {
|
|||
/**
|
||||
* @public
|
||||
*/
|
||||
export function delete(flow) {
|
||||
export function remove(flow) {
|
||||
fetch(`/flows/${flow.id}`, { method: 'DELETE' })
|
||||
return { type: REQUEST_ACTION }
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import * as websocketActions from './websocket'
|
||||
import * as websocketActions from '../websocket'
|
||||
|
||||
export const UPDATE_FILTER = 'LIST_UPDATE_FILTER'
|
||||
export const UPDATE_SORTER = 'LIST_UPDATE_SORTER'
|
||||
|
|
Loading…
Reference in New Issue