Pass editQueryStatus to the timeseries component
parent
159a04cfdf
commit
dec7382ae6
|
@ -62,7 +62,14 @@ class RefreshingGraph extends PureComponent<Props> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public render() {
|
public render() {
|
||||||
const {inView, type, queries, source, templates} = this.props
|
const {
|
||||||
|
inView,
|
||||||
|
type,
|
||||||
|
queries,
|
||||||
|
source,
|
||||||
|
templates,
|
||||||
|
editQueryStatus,
|
||||||
|
} = this.props
|
||||||
|
|
||||||
if (!queries.length) {
|
if (!queries.length) {
|
||||||
return (
|
return (
|
||||||
|
@ -78,6 +85,7 @@ class RefreshingGraph extends PureComponent<Props> {
|
||||||
inView={inView}
|
inView={inView}
|
||||||
queries={this.queries}
|
queries={this.queries}
|
||||||
templates={templates}
|
templates={templates}
|
||||||
|
editQueryStatus={editQueryStatus}
|
||||||
>
|
>
|
||||||
{({timeSeries, loading}) => {
|
{({timeSeries, loading}) => {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
|
|
@ -25,6 +25,7 @@ interface Props {
|
||||||
children: (r: RenderProps) => JSX.Element
|
children: (r: RenderProps) => JSX.Element
|
||||||
inView?: boolean
|
inView?: boolean
|
||||||
templates?: Template[]
|
templates?: Template[]
|
||||||
|
editQueryStatus?: () => void
|
||||||
}
|
}
|
||||||
|
|
||||||
interface State {
|
interface State {
|
||||||
|
@ -67,7 +68,7 @@ class TimeSeries extends Component<Props, State> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public executeQueries = async (isFirstFetch: boolean = false) => {
|
public executeQueries = async (isFirstFetch: boolean = false) => {
|
||||||
const {source, inView, queries, templates} = this.props
|
const {source, inView, queries, templates, editQueryStatus} = this.props
|
||||||
|
|
||||||
if (!inView) {
|
if (!inView) {
|
||||||
return
|
return
|
||||||
|
@ -86,7 +87,8 @@ class TimeSeries extends Component<Props, State> {
|
||||||
source,
|
source,
|
||||||
queries,
|
queries,
|
||||||
TEMP_RES,
|
TEMP_RES,
|
||||||
templates
|
templates,
|
||||||
|
editQueryStatus
|
||||||
)
|
)
|
||||||
|
|
||||||
const newSeries = timeSeries.map((response: TimeSeriesResponse) => ({
|
const newSeries = timeSeries.map((response: TimeSeriesResponse) => ({
|
||||||
|
|
Loading…
Reference in New Issue