Pass editQueryStatus to the timeseries component
parent
159a04cfdf
commit
dec7382ae6
|
@ -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) {
|
||||
|
|
|
@ -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) => ({
|
||||
|
|
Loading…
Reference in New Issue