Add function to get protoboards to wizard dashboards step
parent
5fbb9a2688
commit
3bb3d7c9a2
|
@ -8,3 +8,9 @@ export const getSourceHealth = async (url: string) => {
|
|||
throw error
|
||||
}
|
||||
}
|
||||
|
||||
export const getProtoBoards = () =>
|
||||
AJAX({
|
||||
method: 'GET',
|
||||
resource: 'protoboards',
|
||||
})
|
||||
|
|
|
@ -3,6 +3,9 @@ import React, {PureComponent} from 'react'
|
|||
import {withRouter, WithRouterProps} from 'react-router'
|
||||
import _ from 'lodash'
|
||||
|
||||
// APIs
|
||||
import {getProtoBoards} from 'src/sources/apis'
|
||||
|
||||
// Components
|
||||
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||
import WizardOverlay from 'src/reusable_ui/components/wizard/WizardOverlay'
|
||||
|
@ -60,6 +63,14 @@ class ConnectionWizard extends PureComponent<Props & WithRouterProps, State> {
|
|||
}
|
||||
}
|
||||
|
||||
public componentDidMount = async () => {
|
||||
const {
|
||||
data: {protoboards},
|
||||
} = await getProtoBoards()
|
||||
|
||||
this.setState({dashboards: protoboards})
|
||||
}
|
||||
|
||||
public render() {
|
||||
const {isVisible, toggleVisibility, jumpStep, showNewKapacitor} = this.props
|
||||
const {
|
||||
|
|
Loading…
Reference in New Issue