Add accidentally removed prop
parent
7ec2b47044
commit
a6a5346fee
|
@ -270,6 +270,7 @@ class CellEditorOverlay extends Component {
|
||||||
onAddQuery={this.handleAddQuery}
|
onAddQuery={this.handleAddQuery}
|
||||||
activeQueryIndex={activeQueryIndex}
|
activeQueryIndex={activeQueryIndex}
|
||||||
activeQuery={this.getActiveQuery()}
|
activeQuery={this.getActiveQuery()}
|
||||||
|
setActiveQueryIndex={this.handleSetActiveQueryIndex}
|
||||||
/>}
|
/>}
|
||||||
</div>
|
</div>
|
||||||
</ResizeContainer>
|
</ResizeContainer>
|
||||||
|
|
|
@ -9,8 +9,8 @@ import buildInfluxQLQuery from 'utils/influxql'
|
||||||
const TEMPLATE_RANGE = {upper: null, lower: ':dashboardTime:'}
|
const TEMPLATE_RANGE = {upper: null, lower: ':dashboardTime:'}
|
||||||
const rawTextBinder = (links, id, action) => text =>
|
const rawTextBinder = (links, id, action) => text =>
|
||||||
action(links.queries, id, text)
|
action(links.queries, id, text)
|
||||||
const buildText = (rawText, range, q) =>
|
const buildText = q =>
|
||||||
rawText || buildInfluxQLQuery(range || TEMPLATE_RANGE, q) || ''
|
q.rawText || buildInfluxQLQuery(q.range || TEMPLATE_RANGE, q) || ''
|
||||||
|
|
||||||
const QueryMaker = ({
|
const QueryMaker = ({
|
||||||
source: {links},
|
source: {links},
|
||||||
|
@ -20,7 +20,6 @@ const QueryMaker = ({
|
||||||
templates,
|
templates,
|
||||||
onAddQuery,
|
onAddQuery,
|
||||||
activeQuery,
|
activeQuery,
|
||||||
activeQuery: {id, range, rawText},
|
|
||||||
onDeleteQuery,
|
onDeleteQuery,
|
||||||
activeQueryIndex,
|
activeQueryIndex,
|
||||||
setActiveQueryIndex,
|
setActiveQueryIndex,
|
||||||
|
@ -35,12 +34,16 @@ const QueryMaker = ({
|
||||||
activeQueryIndex={activeQueryIndex}
|
activeQueryIndex={activeQueryIndex}
|
||||||
setActiveQueryIndex={setActiveQueryIndex}
|
setActiveQueryIndex={setActiveQueryIndex}
|
||||||
/>
|
/>
|
||||||
{activeQuery
|
{activeQuery && activeQuery.id
|
||||||
? <div className="query-maker--tab-contents">
|
? <div className="query-maker--tab-contents">
|
||||||
<QueryTextArea
|
<QueryTextArea
|
||||||
query={buildText(rawText, range, activeQuery)}
|
query={buildText(activeQuery)}
|
||||||
config={activeQuery}
|
config={activeQuery}
|
||||||
onUpdate={rawTextBinder(links, id, actions.editRawTextAsync)}
|
onUpdate={rawTextBinder(
|
||||||
|
links,
|
||||||
|
activeQuery.id,
|
||||||
|
actions.editRawTextAsync
|
||||||
|
)}
|
||||||
templates={templates}
|
templates={templates}
|
||||||
/>
|
/>
|
||||||
<SchemaExplorer
|
<SchemaExplorer
|
||||||
|
|
Loading…
Reference in New Issue