diff --git a/client/app/scripts/actions/app-actions.js b/client/app/scripts/actions/app-actions.js index daa825787..4f46dc071 100644 --- a/client/app/scripts/actions/app-actions.js +++ b/client/app/scripts/actions/app-actions.js @@ -11,6 +11,7 @@ import { doControlRequest, getAllNodes, getNodesDelta, getNodeDetails, getTopologies, deletePipe } from '../utils/web-api-utils'; import { getActiveTopologyOptions, getCurrentTopologyUrl } from '../utils/topology-utils'; +import { storageSet } from '../utils/storage-utils'; const log = debug('scope:app-actions'); @@ -665,3 +666,10 @@ export function route(urlState) { ); }; } + +export function resetLocalViewState() { + return (dispatch) => { + dispatch({type: ActionTypes.RESET_LOCAL_VIEW_STATE}); + storageSet('scopeViewState', ''); + }; +} diff --git a/client/app/scripts/components/help-panel.js b/client/app/scripts/components/help-panel.js index aad9b3b7f..ed5c1fb42 100644 --- a/client/app/scripts/components/help-panel.js +++ b/client/app/scripts/components/help-panel.js @@ -3,7 +3,7 @@ import { connect } from 'react-redux'; import { searchableFieldsSelector } from '../selectors/chartSelectors'; import { CANVAS_MARGINS } from '../constants/styles'; -import { hideHelp } from '../actions/app-actions'; +import { hideHelp, resetLocalViewState } from '../actions/app-actions'; const GENERAL_SHORTCUTS = [ @@ -149,7 +149,7 @@ function renderFieldsPanel(currentTopologyName, searchableFields) { } -function HelpPanel({currentTopologyName, searchableFields, onClickClose}) { +function HelpPanel({currentTopologyName, searchableFields, onClickClose, onClickReset}) { return (