diff --git a/ui/src/chronograf/components/Explorer.js b/ui/src/chronograf/components/Explorer.js index d5685030e..f81e1cddd 100644 --- a/ui/src/chronograf/components/Explorer.js +++ b/ui/src/chronograf/components/Explorer.js @@ -108,7 +108,7 @@ const Explorer = React.createClass({ if (!query) { return ( -
+
This Graph has no Queries

Add a Query
@@ -130,10 +130,10 @@ const Explorer = React.createClass({ if (!this.props.isExpanded) { return null; } - return (
{this.props.queries.map((q) => { + const 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 f24c888e5..ab16e8692 100644 --- a/ui/src/chronograf/components/QueryTabItem.js +++ b/ui/src/chronograf/components/QueryTabItem.js @@ -9,6 +9,7 @@ const QueryTabItem = React.createClass({ }).isRequired, onSelect: PropTypes.func.isRequired, onDelete: PropTypes.func.isRequired, + queryTabText: PropTypes.string, }, handleSelect() { @@ -23,7 +24,7 @@ const QueryTabItem = React.createClass({ render() { return (
- {this.props.query.rawText ? 'Raw Text' : 'Query'} + {this.props.query.rawText ? 'Raw Text' : this.props.queryTabText}
);