Add accidentally removed prop

experiment/integration-testing
Andrew Watkins 2017-08-10 18:20:04 -07:00
parent 7ec2b47044
commit a6a5346fee
2 changed files with 10 additions and 6 deletions

View File

@ -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>

View File

@ -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