Skip to content

Commit

Permalink
fix(graphql): update graphql queries to use namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
landonreed committed Nov 8, 2017
1 parent 4cdb527 commit e7a7aa6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions lib/manager/components/reporter/containers/Feed.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ const mapStateToProps = (state, ownProps) => {
}

const mapDispatchToProps = (dispatch, ownProps) => {
const feedId = ownProps.version.id.replace('.zip', '')
const {namespace} = ownProps.version
return {
onComponentMount: (initialProps) => {
if (!initialProps.feed.fetchStatus.fetched) {
dispatch(fetchFeed(feedId))
dispatch(fetchFeed(namespace))
}
}
}
Expand Down
12 changes: 6 additions & 6 deletions lib/manager/components/reporter/containers/Patterns.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,25 @@ const mapStateToProps = (state, ownProps) => {
}

const mapDispatchToProps = (dispatch, ownProps) => {
const feedId = ownProps.version.id.replace('.zip', '')
const {namespace} = ownProps.version
return {
onComponentMount: (initialProps) => {
if (!initialProps.routes.fetchStatus.fetched) {
dispatch(fetchRoutes(feedId))
dispatch(fetchRoutes(namespace))
}
// if (!initialProps.patterns.fetchStatus.fetched) {
// dispatch(fetchPatterns(feedId, null))
// dispatch(fetchPatterns(namespace, null))
// }
},
patternRouteFilterChange: (newValue) => {
dispatch(patternRouteFilterChange(feedId, newValue))
dispatch(patternRouteFilterChange(namespace, newValue))
},
viewStops: (row) => {
dispatch(stopPatternFilterChange(feedId, row))
dispatch(stopPatternFilterChange(namespace, row))
ownProps.selectTab('stops')
},
patternDateTimeFilterChange: (props) => {
dispatch(patternDateTimeFilterChange(feedId, props))
dispatch(patternDateTimeFilterChange(namespace, props))
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions lib/manager/components/reporter/containers/Routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ const mapStateToProps = (state, ownProps) => {
}

const mapDispatchToProps = (dispatch, ownProps) => {
const feedId = ownProps.version.id.replace('.zip', '')
const {namespace} = ownProps.version
return {
onComponentMount: (initialProps) => {
if (!initialProps.routes.fetchStatus.fetched) {
dispatch(fetchRoutes(feedId))
dispatch(fetchRoutes(namespace))
}
},
viewPatterns: (row) => {
dispatch(patternRouteFilterChange(feedId, row))
dispatch(patternRouteFilterChange(namespace, row))
ownProps.selectTab('patterns')
}
}
Expand Down

0 comments on commit e7a7aa6

Please sign in to comment.