Pass editQueryStatus to the timeseries component

pull/10616/head
ebb-tide 2018-07-17 11:25:21 -07:00
parent 159a04cfdf
commit dec7382ae6
2 changed files with 13 additions and 3 deletions

View File

@ -62,7 +62,14 @@ class RefreshingGraph extends PureComponent<Props> {
}
public render() {
const {inView, type, queries, source, templates} = this.props
const {
inView,
type,
queries,
source,
templates,
editQueryStatus,
} = this.props
if (!queries.length) {
return (
@ -78,6 +85,7 @@ class RefreshingGraph extends PureComponent<Props> {
inView={inView}
queries={this.queries}
templates={templates}
editQueryStatus={editQueryStatus}
>
{({timeSeries, loading}) => {
switch (type) {

View File

@ -25,6 +25,7 @@ interface Props {
children: (r: RenderProps) => JSX.Element
inView?: boolean
templates?: Template[]
editQueryStatus?: () => void
}
interface State {
@ -67,7 +68,7 @@ class TimeSeries extends Component<Props, State> {
}
public executeQueries = async (isFirstFetch: boolean = false) => {
const {source, inView, queries, templates} = this.props
const {source, inView, queries, templates, editQueryStatus} = this.props
if (!inView) {
return
@ -86,7 +87,8 @@ class TimeSeries extends Component<Props, State> {
source,
queries,
TEMP_RES,
templates
templates,
editQueryStatus
)
const newSeries = timeSeries.map((response: TimeSeriesResponse) => ({