diff --git a/CHANGELOG.md b/CHANGELOG.md
index 63e6c377c..7a73d37a3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -21,6 +21,7 @@
1. [#2040](https://github.com/influxdata/chronograf/pull/2040): Prevent the legend from overlapping graphs at the bottom of the screen
1. [#2054](https://github.com/influxdata/chronograf/pull/2054): Add a "Plus" icon to every button with an Add or Create action for clarity and consistency
1. [#2052](https://github.com/influxdata/chronograf/pull/2052): Make hovering over series smoother
+1. [#2072](https://github.com/influxdata/chronograf/pull/2072): Remove tabs from Data Explorer
1. [#2057](https://github.com/influxdata/chronograf/pull/2057): Improve appearance of placeholder text in inputs
1. [#2057](https://github.com/influxdata/chronograf/pull/2057): Add ability to use "Default" values in Source Connection form
diff --git a/ui/src/data_explorer/components/QueryMaker.js b/ui/src/data_explorer/components/QueryMaker.js
index 09410d432..12ee0317e 100644
--- a/ui/src/data_explorer/components/QueryMaker.js
+++ b/ui/src/data_explorer/components/QueryMaker.js
@@ -1,8 +1,6 @@
import React, {PropTypes} from 'react'
import QueryEditor from './QueryEditor'
-import EmptyQuery from 'src/shared/components/EmptyQuery'
-import QueryTabList from 'src/shared/components/QueryTabList'
import SchemaExplorer from 'src/shared/components/SchemaExplorer'
import buildInfluxQLQuery from 'utils/influxql'
@@ -12,47 +10,23 @@ const rawTextBinder = (links, id, action) => text =>
const buildText = (q, timeRange) =>
q.rawText || buildInfluxQLQuery(timeRange, q) || ''
-const QueryMaker = ({
- source,
- actions,
- queries,
- timeRange,
- onAddQuery,
- activeQuery,
- onDeleteQuery,
- activeQueryIndex,
- setActiveQueryIndex,
-}) =>
+const QueryMaker = ({source, actions, timeRange, activeQuery}) =>
-
- {activeQuery && activeQuery.id
- ?
-
-
-
- :
}
+
+
+
+
-const {arrayOf, func, number, shape, string} = PropTypes
+const {func, shape, string} = PropTypes
QueryMaker.propTypes = {
source: shape({
@@ -60,7 +34,6 @@ QueryMaker.propTypes = {
queries: string.isRequired,
}).isRequired,
}).isRequired,
- queries: arrayOf(shape({})).isRequired,
timeRange: shape({
upper: string,
lower: string,
@@ -77,11 +50,7 @@ QueryMaker.propTypes = {
applyFuncsToField: func.isRequired,
editRawTextAsync: func.isRequired,
}).isRequired,
- setActiveQueryIndex: func.isRequired,
- onDeleteQuery: func.isRequired,
- onAddQuery: func.isRequired,
activeQuery: shape({}),
- activeQueryIndex: number,
}
export default QueryMaker
diff --git a/ui/src/data_explorer/containers/DataExplorer.js b/ui/src/data_explorer/containers/DataExplorer.js
index c8312a3ef..15340fb08 100644
--- a/ui/src/data_explorer/containers/DataExplorer.js
+++ b/ui/src/data_explorer/containers/DataExplorer.js
@@ -23,34 +23,16 @@ class DataExplorer extends Component {
super(props)
this.state = {
- activeQueryIndex: 0,
showWriteForm: false,
}
}
- handleSetActiveQueryIndex = index => {
- this.setState({activeQueryIndex: index})
- }
-
- handleDeleteQuery = index => {
- const {queryConfigs, queryConfigActions} = this.props
- const query = queryConfigs[index]
- queryConfigActions.deleteQuery(query.id)
- }
-
- handleAddQuery = () => {
- const newIndex = this.props.queryConfigs.length
- this.props.queryConfigActions.addQuery()
- this.handleSetActiveQueryIndex(newIndex)
- }
-
getActiveQuery = () => {
- const {activeQueryIndex} = this.state
const {queryConfigs} = this.props
- const activeQuery = queryConfigs[activeQueryIndex]
- const defaultQuery = queryConfigs[0]
-
- return activeQuery || defaultQuery
+ if (queryConfigs.length === 0) {
+ this.props.queryConfigActions.addQuery()
+ }
+ return queryConfigs[0]
}
handleCloseWriteData = () => {
@@ -109,14 +91,8 @@ class DataExplorer extends Component {
>