diff --git a/ui/src/dashboards/components/CellEditorOverlay.js b/ui/src/dashboards/components/CellEditorOverlay.js index f15e95c91..8e62f1274 100644 --- a/ui/src/dashboards/components/CellEditorOverlay.js +++ b/ui/src/dashboards/components/CellEditorOverlay.js @@ -270,6 +270,7 @@ class CellEditorOverlay extends Component { onAddQuery={this.handleAddQuery} activeQueryIndex={activeQueryIndex} activeQuery={this.getActiveQuery()} + setActiveQueryIndex={this.handleSetActiveQueryIndex} />} diff --git a/ui/src/dashboards/components/QueryMaker.js b/ui/src/dashboards/components/QueryMaker.js index 7de7511e6..7292ecd39 100644 --- a/ui/src/dashboards/components/QueryMaker.js +++ b/ui/src/dashboards/components/QueryMaker.js @@ -9,8 +9,8 @@ import buildInfluxQLQuery from 'utils/influxql' const TEMPLATE_RANGE = {upper: null, lower: ':dashboardTime:'} const rawTextBinder = (links, id, action) => text => action(links.queries, id, text) -const buildText = (rawText, range, q) => - rawText || buildInfluxQLQuery(range || TEMPLATE_RANGE, q) || '' +const buildText = q => + q.rawText || buildInfluxQLQuery(q.range || TEMPLATE_RANGE, q) || '' const QueryMaker = ({ source: {links}, @@ -20,7 +20,6 @@ const QueryMaker = ({ templates, onAddQuery, activeQuery, - activeQuery: {id, range, rawText}, onDeleteQuery, activeQueryIndex, setActiveQueryIndex, @@ -35,12 +34,16 @@ const QueryMaker = ({ activeQueryIndex={activeQueryIndex} setActiveQueryIndex={setActiveQueryIndex} /> - {activeQuery + {activeQuery && activeQuery.id ?