From e880f532ad3c66ebfded4655b7fa67a367a83cc7 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Sat, 4 Jun 2016 00:58:13 -0700 Subject: web interleave old store and redux flow state --- web/src/js/components/flowtable.js | 13 +++++++++++-- web/src/js/connection.js | 6 +++++- web/src/js/ducks/utils/list.js | 2 +- 3 files changed, 17 insertions(+), 4 deletions(-) (limited to 'web/src/js') diff --git a/web/src/js/components/flowtable.js b/web/src/js/components/flowtable.js index f03b8ec0..1a616eee 100644 --- a/web/src/js/components/flowtable.js +++ b/web/src/js/components/flowtable.js @@ -1,5 +1,6 @@ import React from "react"; import ReactDOM from "react-dom"; +import {connect} from 'react-redux' import classNames from "classnames"; import {reverseString} from "../utils.js"; import _ from "lodash"; @@ -36,6 +37,14 @@ function FlowRow(props) { ); } +const FlowRowContainer = connect( + (state, ownProps) => ({ + flow: state.flows.all.byId[ownProps.flowId] + }), + dispatch => ({ + }) +)(FlowRow); + class FlowTableHead extends React.Component { static propTypes = { @@ -196,9 +205,9 @@ class FlowTable extends React.Component { {flows.map(flow => ( - { + console.log("flows are loaded now") + ConnectionActions.open() + }) dispatch(eventLogActions.fetchLogEntries()) - ConnectionActions.open() }; ws.onmessage = function (m) { var message = JSON.parse(m.data); diff --git a/web/src/js/ducks/utils/list.js b/web/src/js/ducks/utils/list.js index e5ce75ef..a5ce7250 100644 --- a/web/src/js/ducks/utils/list.js +++ b/web/src/js/ducks/utils/list.js @@ -152,7 +152,7 @@ export default function makeList(actionType, fetchURL) { dispatch(requestList()) - fetchApi(fetchURL).then(response => { + return fetchApi(fetchURL).then(response => { return response.json().then(json => { dispatch(receiveList(json.data)) }) -- cgit v1.2.3