Be the pretty
parent
5b397d022d
commit
4694e1a4b0
|
@ -106,14 +106,23 @@ const QueryBuilder = React.createClass({
|
||||||
},
|
},
|
||||||
|
|
||||||
renderQueryTabList() {
|
renderQueryTabList() {
|
||||||
const {queries, activeQueryIndex, onDeleteQuery, timeRange, setActiveQueryIndex} = this.props
|
const {
|
||||||
|
queries,
|
||||||
|
activeQueryIndex,
|
||||||
|
onDeleteQuery,
|
||||||
|
timeRange,
|
||||||
|
setActiveQueryIndex,
|
||||||
|
} = this.props
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="query-builder--tabs">
|
<div className="query-builder--tabs">
|
||||||
<div className="query-builder--tabs-heading">
|
<div className="query-builder--tabs-heading">
|
||||||
<h1>Queries</h1>
|
<h1>Queries</h1>
|
||||||
<div className="panel--tab-new btn btn-sm btn-primary dropdown-toggle" onClick={this.handleAddQuery}>
|
<div
|
||||||
<span className="icon plus"></span>
|
className="panel--tab-new btn btn-sm btn-primary dropdown-toggle"
|
||||||
|
onClick={this.handleAddQuery}
|
||||||
|
>
|
||||||
|
<span className="icon plus" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{queries.map((q, i) => {
|
{queries.map((q, i) => {
|
||||||
|
@ -125,7 +134,11 @@ const QueryBuilder = React.createClass({
|
||||||
query={q}
|
query={q}
|
||||||
onSelect={setActiveQueryIndex}
|
onSelect={setActiveQueryIndex}
|
||||||
onDelete={onDeleteQuery}
|
onDelete={onDeleteQuery}
|
||||||
queryTabText={q.rawText || buildInfluxQLQuery(timeRange, q) || `Query ${i + 1}`}
|
queryTabText={
|
||||||
|
q.rawText ||
|
||||||
|
buildInfluxQLQuery(timeRange, q) ||
|
||||||
|
`Query ${i + 1}`
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
})}
|
})}
|
||||||
|
|
|
@ -7,11 +7,7 @@ import TagList from './TagList'
|
||||||
import RawQueryEditor from './RawQueryEditor'
|
import RawQueryEditor from './RawQueryEditor'
|
||||||
import buildInfluxQLQuery from 'utils/influxql'
|
import buildInfluxQLQuery from 'utils/influxql'
|
||||||
|
|
||||||
const {
|
const {arrayOf, string, shape, func} = PropTypes
|
||||||
string,
|
|
||||||
shape,
|
|
||||||
func,
|
|
||||||
} = PropTypes
|
|
||||||
|
|
||||||
const QueryEditor = React.createClass({
|
const QueryEditor = React.createClass({
|
||||||
propTypes: {
|
propTypes: {
|
||||||
|
|
Loading…
Reference in New Issue