Rename QueryEditor to QueryTextArea
parent
d258c23907
commit
6c9b433e59
|
@ -2,14 +2,13 @@ import React, {PropTypes} from 'react'
|
|||
|
||||
import EmptyQuery from 'src/dashboards/components/EmptyQuery'
|
||||
import QueryTabList from 'src/dashboards/components/QueryTabList'
|
||||
import QueryEditor from 'src/data_explorer/components/QueryEditor'
|
||||
import QueryTextArea from 'src/dashboards/components/QueryTextArea'
|
||||
import SchemaExplorer from 'src/dashboards/components/SchemaExplorer'
|
||||
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) || ''
|
||||
|
||||
|
@ -38,7 +37,7 @@ const QueryMaker = ({
|
|||
/>
|
||||
{activeQuery
|
||||
? <div className="query-maker--tab-contents">
|
||||
<QueryEditor
|
||||
<QueryTextArea
|
||||
query={buildText(rawText, range, activeQuery)}
|
||||
config={activeQuery}
|
||||
onUpdate={rawTextBinder(links, id, actions.editRawTextAsync)}
|
||||
|
|
Loading…
Reference in New Issue