Merge pull request #697 from influxdata/super-hot-fix
Use InfluxQL instead of Raw Textpull/696/head
commit
34f233a370
|
@ -137,7 +137,12 @@ const Panel = React.createClass({
|
||||||
return (
|
return (
|
||||||
<div className="panel--tabs">
|
<div className="panel--tabs">
|
||||||
{queries.map((q) => {
|
{queries.map((q) => {
|
||||||
const queryTabText = (q.measurement && q.fields.length !== 0) ? `${q.measurement}.${q.fields[0].field}` : 'Query';
|
let queryTabText;
|
||||||
|
if (q.rawText) {
|
||||||
|
queryTabText = 'InfluxQL';
|
||||||
|
} else {
|
||||||
|
queryTabText = (q.measurement && q.fields.length !== 0) ? `${q.measurement}.${q.fields[0].field}` : 'Query';
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<QueryTabItem
|
<QueryTabItem
|
||||||
isActive={this.getActiveQuery().id === q.id}
|
isActive={this.getActiveQuery().id === q.id}
|
||||||
|
@ -160,7 +165,7 @@ const Panel = React.createClass({
|
||||||
case 'Query Builder':
|
case 'Query Builder':
|
||||||
this.handleAddQuery();
|
this.handleAddQuery();
|
||||||
break;
|
break;
|
||||||
case 'Raw Text':
|
case 'InfluxQL':
|
||||||
this.handleAddRawQuery();
|
this.handleAddRawQuery();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -168,7 +173,7 @@ const Panel = React.createClass({
|
||||||
|
|
||||||
renderAddQuery() {
|
renderAddQuery() {
|
||||||
return (
|
return (
|
||||||
<SimpleDropdown onChoose={this.onChoose} items={[{text: 'Query Builder'}, {text: 'Raw Text'}]} className="panel--tab-new">
|
<SimpleDropdown onChoose={this.onChoose} items={[{text: 'Query Builder'}, {text: 'InfluxQL'}]} className="panel--tab-new">
|
||||||
<span className="icon plus"></span>
|
<span className="icon plus"></span>
|
||||||
</SimpleDropdown>
|
</SimpleDropdown>
|
||||||
);
|
);
|
||||||
|
|
|
@ -24,7 +24,7 @@ const QueryTabItem = React.createClass({
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className={classNames('panel--tab', {active: this.props.isActive})} onClick={this.handleSelect}>
|
<div className={classNames('panel--tab', {active: this.props.isActive})} onClick={this.handleSelect}>
|
||||||
<span className="panel--tab-label">{this.props.query.rawText ? 'Raw Text' : this.props.queryTabText}</span>
|
<span className="panel--tab-label">{this.props.queryTabText}</span>
|
||||||
<span className="panel--tab-delete" onClick={this.handleDelete}></span>
|
<span className="panel--tab-delete" onClick={this.handleDelete}></span>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue