diff --git a/src/components/README.md b/src/components/README.md
index 96039a58b..fcf8ccf53 100644
--- a/src/components/README.md
+++ b/src/components/README.md
@@ -302,8 +302,6 @@ Initialize an app, and return a combined state store that includes authorization
options.authorizeUser | function |
- options.hideGlobalFilter | function |
-
options.useChrome | function |
options.useDispatch | function |
diff --git a/src/components/authentication/__tests__/__snapshots__/authenticationContext.test.js.snap b/src/components/authentication/__tests__/__snapshots__/authenticationContext.test.js.snap
index bf4ed5e4a..99384b820 100644
--- a/src/components/authentication/__tests__/__snapshots__/authenticationContext.test.js.snap
+++ b/src/components/authentication/__tests__/__snapshots__/authenticationContext.test.js.snap
@@ -68,14 +68,6 @@ exports[`AuthenticationContext should apply a hook for retrieving auth data from
[
[Function],
],
- [
- [
- {
- "payload": Promise {},
- "type": "PLATFORM_GLOBAL_FILTER_HIDE",
- },
- ],
- ],
]
`;
diff --git a/src/components/authentication/authenticationContext.js b/src/components/authentication/authenticationContext.js
index ceca78846..062cc404c 100644
--- a/src/components/authentication/authenticationContext.js
+++ b/src/components/authentication/authenticationContext.js
@@ -32,7 +32,6 @@ const useAuthContext = () => useContext(AuthenticationContext);
* @param {object} options
* @param {string} options.appName
* @param {Function} options.authorizeUser
- * @param {Function} options.hideGlobalFilter
* @param {Function} options.useChrome
* @param {Function} options.useDispatch
* @param {Function} options.useSelectorsResponse
@@ -41,13 +40,12 @@ const useAuthContext = () => useContext(AuthenticationContext);
const useGetAuthorization = ({
appName = routerHelpers.appName,
authorizeUser = reduxActions.platform.authorizeUser,
- hideGlobalFilter = reduxActions.platform.hideGlobalFilter,
useChrome: useAliasChrome = useChrome,
useDispatch: useAliasDispatch = storeHooks.reactRedux.useDispatch,
useSelectorsResponse: useAliasSelectorsResponse = storeHooks.reactRedux.useSelectorsResponse
} = {}) => {
const dispatch = useAliasDispatch();
- const { updateDocumentTitle = helpers.noop } = useAliasChrome();
+ const { updateDocumentTitle = helpers.noop, hideGlobalFilter = helpers.noop } = useAliasChrome();
const { data, error, fulfilled, pending, responses } = useAliasSelectorsResponse([
{ id: 'auth', selector: ({ app }) => app?.auth },
{ id: 'locale', selector: ({ app }) => app?.locale },
@@ -60,7 +58,7 @@ const useGetAuthorization = ({
useMount(async () => {
await dispatch(authorizeUser());
updateDocumentTitle(appName);
- dispatch([hideGlobalFilter()]);
+ hideGlobalFilter();
});
const [user = {}, app = {}] = (Array.isArray(data.auth) && data.auth) || [];
diff --git a/src/redux/README.md b/src/redux/README.md
index 63dc2bfe7..b2bc44586 100644
--- a/src/redux/README.md
+++ b/src/redux/README.md
@@ -69,7 +69,6 @@ Platform service wrappers for dispatch, state update.
* [~deleteExistingExports(existingExports, notifications)](#Actions.module_PlatformActions..deleteExistingExports) ⇒ function
* [~getExistingExportsStatus(notifications)](#Actions.module_PlatformActions..getExistingExportsStatus) ⇒ function
* [~createExport(id, data, options, notifications)](#Actions.module_PlatformActions..createExport) ⇒ function
- * [~hideGlobalFilter(isHidden)](#Actions.module_PlatformActions..hideGlobalFilter) ⇒ Object
@@ -217,24 +216,6 @@ Create an export for download. Includes toast notifications.
-
-
-### PlatformActions~hideGlobalFilter(isHidden) ⇒ Object
-Hide platform global filter.
-
-**Kind**: inner method of [PlatformActions
](#Actions.module_PlatformActions)
-
-
-
- Param | Type |
-
-
-
-
- isHidden | boolean |
-
-
-
## RhsmActions
diff --git a/src/redux/actions/__tests__/__snapshots__/platformActions.test.js.snap b/src/redux/actions/__tests__/__snapshots__/platformActions.test.js.snap
index b586d9b1e..d3be4202e 100644
--- a/src/redux/actions/__tests__/__snapshots__/platformActions.test.js.snap
+++ b/src/redux/actions/__tests__/__snapshots__/platformActions.test.js.snap
@@ -1,12 +1,5 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
-exports[`PlatformActions Should return a dispatch object for the hideGlobalFilter method: dispatch object 1`] = `
-{
- "payload": Promise {},
- "type": "PLATFORM_GLOBAL_FILTER_HIDE",
-}
-`;
-
exports[`PlatformActions Should return response content for createExport method: dispatch object 1`] = `
[
[
diff --git a/src/redux/actions/__tests__/platformActions.test.js b/src/redux/actions/__tests__/platformActions.test.js
index 6269e9edc..35631bce5 100644
--- a/src/redux/actions/__tests__/platformActions.test.js
+++ b/src/redux/actions/__tests__/platformActions.test.js
@@ -63,10 +63,6 @@ describe('PlatformActions', () => {
expect(mockDispatch.mock.calls).toMatchSnapshot('dispatch object');
});
- it('Should return a dispatch object for the hideGlobalFilter method', () => {
- expect(platformActions.hideGlobalFilter()).toMatchSnapshot('dispatch object');
- });
-
it('Should return response content for removeExistingExports method', () => {
const mockDispatch = jest.fn();
platformActions.deleteExistingExports([])(mockDispatch);
diff --git a/src/redux/actions/platformActions.js b/src/redux/actions/platformActions.js
index 29286d031..ac7a7e7ed 100644
--- a/src/redux/actions/platformActions.js
+++ b/src/redux/actions/platformActions.js
@@ -131,17 +131,6 @@ const createExport =
}
});
-/**
- * Hide platform global filter.
- *
- * @param {boolean} isHidden
- * @returns {{Function}}
- */
-const hideGlobalFilter = isHidden => ({
- type: platformTypes.PLATFORM_GLOBAL_FILTER_HIDE,
- payload: platformServices.hideGlobalFilter(isHidden)
-});
-
const platformActions = {
addNotification,
removeNotification,
@@ -150,8 +139,7 @@ const platformActions = {
createExport,
deleteExistingExports,
getExistingExports,
- getExistingExportsStatus,
- hideGlobalFilter
+ getExistingExportsStatus
};
export {
@@ -164,6 +152,5 @@ export {
createExport,
deleteExistingExports,
getExistingExports,
- getExistingExportsStatus,
- hideGlobalFilter
+ getExistingExportsStatus
};
diff --git a/src/redux/types/__tests__/__snapshots__/index.test.js.snap b/src/redux/types/__tests__/__snapshots__/index.test.js.snap
index 378f0c115..4ab20b6a7 100644
--- a/src/redux/types/__tests__/__snapshots__/index.test.js.snap
+++ b/src/redux/types/__tests__/__snapshots__/index.test.js.snap
@@ -40,7 +40,6 @@ exports[`ReduxTypes should have specific type properties: all redux types 1`] =
"GET_PLATFORM_EXPORT_EXISTING": "GET_PLATFORM_EXPORT_EXISTING",
"PLATFORM_ADD_NOTIFICATION": "@@INSIGHTS-CORE/NOTIFICATIONS/ADD_NOTIFICATION",
"PLATFORM_CLEAR_NOTIFICATIONS": "@@INSIGHTS-CORE/NOTIFICATIONS/CLEAR_NOTIFICATIONS",
- "PLATFORM_GLOBAL_FILTER_HIDE": "PLATFORM_GLOBAL_FILTER_HIDE",
"PLATFORM_REMOVE_NOTIFICATION": "@@INSIGHTS-CORE/NOTIFICATIONS/REMOVE_NOTIFICATION",
"PLATFORM_USER_AUTH": "PLATFORM_USER_AUTH",
"SET_PLATFORM_EXPORT_CREATE": "SET_PLATFORM_EXPORT_CREATE",
@@ -86,7 +85,6 @@ exports[`ReduxTypes should have specific type properties: all redux types 1`] =
"GET_PLATFORM_EXPORT_EXISTING": "GET_PLATFORM_EXPORT_EXISTING",
"PLATFORM_ADD_NOTIFICATION": "@@INSIGHTS-CORE/NOTIFICATIONS/ADD_NOTIFICATION",
"PLATFORM_CLEAR_NOTIFICATIONS": "@@INSIGHTS-CORE/NOTIFICATIONS/CLEAR_NOTIFICATIONS",
- "PLATFORM_GLOBAL_FILTER_HIDE": "PLATFORM_GLOBAL_FILTER_HIDE",
"PLATFORM_REMOVE_NOTIFICATION": "@@INSIGHTS-CORE/NOTIFICATIONS/REMOVE_NOTIFICATION",
"PLATFORM_USER_AUTH": "PLATFORM_USER_AUTH",
"SET_PLATFORM_EXPORT_CREATE": "SET_PLATFORM_EXPORT_CREATE",
@@ -132,7 +130,6 @@ exports[`ReduxTypes should have specific type properties: all redux types 1`] =
"GET_PLATFORM_EXPORT_EXISTING": "GET_PLATFORM_EXPORT_EXISTING",
"PLATFORM_ADD_NOTIFICATION": "@@INSIGHTS-CORE/NOTIFICATIONS/ADD_NOTIFICATION",
"PLATFORM_CLEAR_NOTIFICATIONS": "@@INSIGHTS-CORE/NOTIFICATIONS/CLEAR_NOTIFICATIONS",
- "PLATFORM_GLOBAL_FILTER_HIDE": "PLATFORM_GLOBAL_FILTER_HIDE",
"PLATFORM_REMOVE_NOTIFICATION": "@@INSIGHTS-CORE/NOTIFICATIONS/REMOVE_NOTIFICATION",
"PLATFORM_USER_AUTH": "PLATFORM_USER_AUTH",
"SET_PLATFORM_EXPORT_CREATE": "SET_PLATFORM_EXPORT_CREATE",
@@ -205,7 +202,6 @@ exports[`ReduxTypes should have specific type properties: specific types 1`] = `
"GET_PLATFORM_EXPORT_EXISTING": "GET_PLATFORM_EXPORT_EXISTING",
"PLATFORM_ADD_NOTIFICATION": "@@INSIGHTS-CORE/NOTIFICATIONS/ADD_NOTIFICATION",
"PLATFORM_CLEAR_NOTIFICATIONS": "@@INSIGHTS-CORE/NOTIFICATIONS/CLEAR_NOTIFICATIONS",
- "PLATFORM_GLOBAL_FILTER_HIDE": "PLATFORM_GLOBAL_FILTER_HIDE",
"PLATFORM_REMOVE_NOTIFICATION": "@@INSIGHTS-CORE/NOTIFICATIONS/REMOVE_NOTIFICATION",
"PLATFORM_USER_AUTH": "PLATFORM_USER_AUTH",
"SET_PLATFORM_EXPORT_CREATE": "SET_PLATFORM_EXPORT_CREATE",
diff --git a/src/redux/types/index.js b/src/redux/types/index.js
index c01457a23..05bfa1d88 100644
--- a/src/redux/types/index.js
+++ b/src/redux/types/index.js
@@ -60,16 +60,14 @@ const messageTypes = {
* Platform action, reducer types.
*
* @type {{PLATFORM_USER_AUTH: string, DELETE_PLATFORM_EXPORT_EXISTING: string, SET_PLATFORM_EXPORT_EXISTING_STATUS:
- * string, SET_PLATFORM_EXPORT_STATUS: string, PLATFORM_GLOBAL_FILTER_HIDE: string, PLATFORM_CLEAR_NOTIFICATIONS:
- * string, GET_PLATFORM_EXPORT_EXISTING: string, SET_PLATFORM_EXPORT_RESET: string, PLATFORM_ADD_NOTIFICATION:
- * string, PLATFORM_REMOVE_NOTIFICATION: string, SET_PLATFORM_EXPORT_CREATE:
- * string}}
+ * string, SET_PLATFORM_EXPORT_STATUS: string, PLATFORM_CLEAR_NOTIFICATIONS: string, GET_PLATFORM_EXPORT_EXISTING:
+ * string, SET_PLATFORM_EXPORT_RESET: string, PLATFORM_ADD_NOTIFICATION: string, PLATFORM_REMOVE_NOTIFICATION:
+ * string, SET_PLATFORM_EXPORT_CREATE: string}}
*/
const platformTypes = {
PLATFORM_ADD_NOTIFICATION: ADD_NOTIFICATION,
PLATFORM_REMOVE_NOTIFICATION: REMOVE_NOTIFICATION,
PLATFORM_CLEAR_NOTIFICATIONS: CLEAR_NOTIFICATIONS,
- PLATFORM_GLOBAL_FILTER_HIDE: 'PLATFORM_GLOBAL_FILTER_HIDE',
PLATFORM_USER_AUTH: 'PLATFORM_USER_AUTH',
DELETE_PLATFORM_EXPORT_EXISTING: 'DELETE_PLATFORM_EXPORT_EXISTING',
GET_PLATFORM_EXPORT_EXISTING: 'GET_PLATFORM_EXPORT_EXISTING',
diff --git a/src/services/README.md b/src/services/README.md
index 4f7d16888..b5a308279 100644
--- a/src/services/README.md
+++ b/src/services/README.md
@@ -425,7 +425,6 @@ Emulated service calls for platform globals.
* [PlatformServices](#Platform.module_PlatformServices)
* [~getUser(options)](#Platform.module_PlatformServices..getUser) ⇒ Promise.<\*>
* [~getUserPermissions(appName, options)](#Platform.module_PlatformServices..getUserPermissions) ⇒ Promise.<\*>
- * [~hideGlobalFilter(isHidden)](#Platform.module_PlatformServices..hideGlobalFilter) ⇒ Promise.<\*>
* [~deleteExport(id, options)](#Platform.module_PlatformServices..deleteExport) ⇒ Promise.<\*>
* [~getExistingExportsStatus(id, params, options)](#Platform.module_PlatformServices..getExistingExportsStatus) ⇒ Promise.<\*>
* [~getExport(id, options)](#Platform.module_PlatformServices..getExport) ⇒ Promise.<\*>
@@ -470,24 +469,6 @@ Basic user permissions.
-
-
-### PlatformServices~hideGlobalFilter(isHidden) ⇒ Promise.<\*>
-Disables the Platform's global filter display.
-
-**Kind**: inner method of [PlatformServices
](#Platform.module_PlatformServices)
-
-
-
- Param | Type | Default |
-
-
-
-
- isHidden | boolean | true |
-
-
-
### PlatformServices~deleteExport(id, options) ⇒ Promise.<\*>
diff --git a/src/services/platform/__tests__/__snapshots__/platformServices.test.js.snap b/src/services/platform/__tests__/__snapshots__/platformServices.test.js.snap
index 828416de1..5a415abd7 100644
--- a/src/services/platform/__tests__/__snapshots__/platformServices.test.js.snap
+++ b/src/services/platform/__tests__/__snapshots__/platformServices.test.js.snap
@@ -8,7 +8,6 @@ exports[`PlatformServices should export a specific properties, methods and clas
"getExport": [Function],
"getUser": [Function],
"getUserPermissions": [Function],
- "hideGlobalFilter": [Function],
"postExport": [Function],
}
`;
@@ -31,8 +30,6 @@ exports[`PlatformServices should return a failed getUserPermissions: failed user
}
`;
-exports[`PlatformServices should return a failed hideGlobalFilter: failed hideGlobalFilter 1`] = `[Error: { on } = insights.chrome, insights.chrome.hideGlobalFilter is not a function]`;
-
exports[`PlatformServices should return a successful getUser with a specific response: specific success for authorized user 1`] = `
{
"data": {
diff --git a/src/services/platform/__tests__/platformServices.test.js b/src/services/platform/__tests__/platformServices.test.js
index 426b3ab56..172a1e6c1 100644
--- a/src/services/platform/__tests__/platformServices.test.js
+++ b/src/services/platform/__tests__/platformServices.test.js
@@ -78,11 +78,4 @@ describe('PlatformServices', () => {
expect({ status, statusText, data, message }).toMatchSnapshot('failed user permissions');
});
-
- it('should return a failed hideGlobalFilter', async () => {
- window.insights.chrome.hideGlobalFilter = undefined;
- const response = await returnPromiseAsync(platformServices.hideGlobalFilter);
-
- expect(response).toMatchSnapshot('failed hideGlobalFilter');
- });
});
diff --git a/src/services/platform/platformServices.js b/src/services/platform/platformServices.js
index ec8d24c7a..dd0147b63 100644
--- a/src/services/platform/platformServices.js
+++ b/src/services/platform/platformServices.js
@@ -93,21 +93,6 @@ const getUserPermissions = (appName = Object.keys(rbacConfig), options = {}) =>
});
};
-/**
- * Disables the Platform's global filter display.
- *
- * @param {boolean} isHidden
- * @returns {Promise<*>}
- */
-const hideGlobalFilter = async (isHidden = true) => {
- const { insights } = window;
- try {
- await insights.chrome.hideGlobalFilter(isHidden);
- } catch (e) {
- throw new Error(`{ on } = insights.chrome, ${e.message}`);
- }
-};
-
/**
* @apiMock {ForceStatus} 202
* @api {delete} /api/export/v1/exports/:id
@@ -545,7 +530,6 @@ const platformServices = {
getExport,
getUser,
getUserPermissions,
- hideGlobalFilter,
postExport
};
@@ -563,6 +547,5 @@ export {
getExport,
getUser,
getUserPermissions,
- hideGlobalFilter,
postExport
};