|
@@ -7,7 +7,7 @@ import { StoreState } from 'app/types';
|
|
|
import { ExploreId, ExploreUrlState } from 'app/types/explore';
|
|
import { ExploreId, ExploreUrlState } from 'app/types/explore';
|
|
|
import { parseUrlState } from 'app/core/utils/explore';
|
|
import { parseUrlState } from 'app/core/utils/explore';
|
|
|
|
|
|
|
|
-import { initializeExploreSplit } from './state/actions';
|
|
|
|
|
|
|
+import { initializeExploreSplit, resetExplore } from './state/actions';
|
|
|
import ErrorBoundary from './ErrorBoundary';
|
|
import ErrorBoundary from './ErrorBoundary';
|
|
|
import Explore from './Explore';
|
|
import Explore from './Explore';
|
|
|
import { CustomScrollbar } from '@grafana/ui';
|
|
import { CustomScrollbar } from '@grafana/ui';
|
|
@@ -16,6 +16,7 @@ interface WrapperProps {
|
|
|
initializeExploreSplit: typeof initializeExploreSplit;
|
|
initializeExploreSplit: typeof initializeExploreSplit;
|
|
|
split: boolean;
|
|
split: boolean;
|
|
|
updateLocation: typeof updateLocation;
|
|
updateLocation: typeof updateLocation;
|
|
|
|
|
+ resetExplore: typeof resetExplore;
|
|
|
urlStates: { [key: string]: string };
|
|
urlStates: { [key: string]: string };
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -42,6 +43,10 @@ export class Wrapper extends Component<WrapperProps> {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ componentWillUnmount() {
|
|
|
|
|
+ this.props.resetExplore();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
render() {
|
|
render() {
|
|
|
const { split } = this.props;
|
|
const { split } = this.props;
|
|
|
const { leftState, rightState } = this.urlStates;
|
|
const { leftState, rightState } = this.urlStates;
|
|
@@ -74,6 +79,7 @@ const mapStateToProps = (state: StoreState) => {
|
|
|
const mapDispatchToProps = {
|
|
const mapDispatchToProps = {
|
|
|
initializeExploreSplit,
|
|
initializeExploreSplit,
|
|
|
updateLocation,
|
|
updateLocation,
|
|
|
|
|
+ resetExplore,
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
export default hot(module)(connect(mapStateToProps, mapDispatchToProps)(Wrapper));
|
|
export default hot(module)(connect(mapStateToProps, mapDispatchToProps)(Wrapper));
|