From 2aac7ed5ea8fc6b5beaa1b1a0b0134397fcee06a Mon Sep 17 00:00:00 2001 From: Will Piers Date: Thu, 15 Dec 2016 12:24:19 -0800 Subject: [PATCH] Use InfluxQL instead of Raw Text --- ui/src/chronograf/components/Panel.js | 11 ++++++++--- ui/src/chronograf/components/QueryTabItem.js | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ui/src/chronograf/components/Panel.js b/ui/src/chronograf/components/Panel.js index c680e3e99..50ddf8621 100644 --- a/ui/src/chronograf/components/Panel.js +++ b/ui/src/chronograf/components/Panel.js @@ -137,7 +137,12 @@ const Panel = React.createClass({ return (
{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 ( + ); diff --git a/ui/src/chronograf/components/QueryTabItem.js b/ui/src/chronograf/components/QueryTabItem.js index 60eda42e0..c3ac85fe3 100644 --- a/ui/src/chronograf/components/QueryTabItem.js +++ b/ui/src/chronograf/components/QueryTabItem.js @@ -24,7 +24,7 @@ const QueryTabItem = React.createClass({ render() { return (
- {this.props.query.rawText ? 'Raw Text' : this.props.queryTabText} + {this.props.queryTabText}
);