diff --git a/ui/src/App.js b/ui/src/App.js index 79a34925be..50fb06d40e 100644 --- a/ui/src/App.js +++ b/ui/src/App.js @@ -16,6 +16,7 @@ const App = React.createClass({ }), params: PropTypes.shape({ sourceID: PropTypes.string.isRequired, + base64ExplorerID: PropTypes.string, }).isRequired, publishNotification: PropTypes.func.isRequired, dismissNotification: PropTypes.func.isRequired, @@ -42,11 +43,11 @@ const App = React.createClass({ }, render() { - const {sourceID} = this.props.params; + const {sourceID, base64ExplorerID} = this.props.params; return (
- +
{this.renderNotifications()} {this.props.children && React.cloneElement(this.props.children, { diff --git a/ui/src/chronograf/containers/App.js b/ui/src/chronograf/containers/App.js index 2c36fd6d10..6314243629 100644 --- a/ui/src/chronograf/containers/App.js +++ b/ui/src/chronograf/containers/App.js @@ -33,6 +33,7 @@ const App = React.createClass({ render() { const {base64ExplorerID} = this.props.params; + return (
diff --git a/ui/src/chronograf/containers/DataExplorer.js b/ui/src/chronograf/containers/DataExplorer.js index 8498dce0d4..7303d86d56 100644 --- a/ui/src/chronograf/containers/DataExplorer.js +++ b/ui/src/chronograf/containers/DataExplorer.js @@ -62,16 +62,11 @@ const DataExplorer = React.createClass({ render() { const {timeRange, explorers, explorerID, setTimeRange, createExploration, chooseExploration, deleteExplorer, editExplorer} = this.props; - if (explorers === FETCHING) { + if (explorers === FETCHING || !explorerID) { // TODO: page-wide spinner return null; } - const activeExplorer = explorers[explorerID]; - if (!activeExplorer) { - return
You have no active explorers
; // TODO: handle no explorers; - } - return (
@@ -21,9 +24,9 @@ const SideNav = React.createClass({ Host List - - - Data Explorer + + + Data Explorer diff --git a/ui/src/side_nav/containers/SideNavApp.js b/ui/src/side_nav/containers/SideNavApp.js index e4bdc43a8f..3742556c5f 100644 --- a/ui/src/side_nav/containers/SideNavApp.js +++ b/ui/src/side_nav/containers/SideNavApp.js @@ -7,6 +7,7 @@ const SideNavApp = React.createClass({ currentLocation: string.isRequired, addFlashMessage: func.isRequired, sourceID: string.isRequired, + explorationID: string, }, contextTypes: { @@ -21,7 +22,7 @@ const SideNavApp = React.createClass({ }, render() { - const {currentLocation, sourceID} = this.props; + const {currentLocation, sourceID, explorationID} = this.props; const {canViewChronograf} = this.context; return ( @@ -30,6 +31,7 @@ const SideNavApp = React.createClass({ isAdmin={true} canViewChronograf={canViewChronograf} location={currentLocation} + explorationID={explorationID} /> ); },