Merge pull request #3893 from influxdata/bugfix/notifications

Bugfix: Notification on unconnected source
pull/10616/head
Andrew Watkins 2018-07-12 09:40:45 -07:00 committed by GitHub
commit 9a8e69723d
1 changed files with 1 additions and 5 deletions

View File

@ -17,7 +17,6 @@ import {
import {getSourceHealth} from 'src/sources/apis' import {getSourceHealth} from 'src/sources/apis'
import {getSourcesAsync} from 'src/shared/actions/sources' import {getSourcesAsync} from 'src/shared/actions/sources'
import {errorThrown as errorThrownAction} from 'src/shared/actions/errors'
import {notify as notifyAction} from 'src/shared/actions/notifications' import {notify as notifyAction} from 'src/shared/actions/notifications'
import {DEFAULT_HOME_PAGE} from 'src/shared/constants' import {DEFAULT_HOME_PAGE} from 'src/shared/constants'
@ -48,7 +47,6 @@ interface Props {
location: Location location: Location
auth: Auth auth: Auth
notify: (message: Notification | NotificationFunc) => void notify: (message: Notification | NotificationFunc) => void
errorThrown: () => void
} }
export const SourceContext = React.createContext() export const SourceContext = React.createContext()
@ -117,7 +115,6 @@ export class CheckSources extends Component<Props, State> {
router, router,
location, location,
params, params,
errorThrown,
sources, sources,
auth: {isUsingAuth, me}, auth: {isUsingAuth, me},
notify, notify,
@ -188,7 +185,7 @@ export class CheckSources extends Component<Props, State> {
try { try {
await getSourceHealth(source.links.health) await getSourceHealth(source.links.health)
} catch (error) { } catch (error) {
errorThrown(error, copy.notifySourceNoLongerAvailable(source.name)) notify(copy.notifySourceNoLongerAvailable(source.name))
} }
} }
} }
@ -225,7 +222,6 @@ const mapStateToProps = ({sources, auth}) => ({
const mapDispatchToProps = dispatch => ({ const mapDispatchToProps = dispatch => ({
getSources: bindActionCreators(getSourcesAsync, dispatch), getSources: bindActionCreators(getSourcesAsync, dispatch),
errorThrown: bindActionCreators(errorThrownAction, dispatch),
notify: bindActionCreators(notifyAction, dispatch), notify: bindActionCreators(notifyAction, dispatch),
}) })