From 2aad2202a5bac5e1bc36d6fbe45bd2ab635185d6 Mon Sep 17 00:00:00 2001 From: Adonis Puente Date: Mon, 6 Mar 2023 16:27:05 -0500 Subject: [PATCH] chore(RHIF-180): Supress data in sentry/hotjar --- src/Utilities/DeleteModal.js | 2 +- .../__snapshots__/DeleteModal.test.js.snap | 10 +++++----- .../GeneralInfo/SystemCard/SystemCard.js | 2 ++ src/components/InventoryDetail/TopBar.js | 3 ++- src/components/InventoryTable/TitleColumn.js | 2 +- .../__snapshots__/EntityTable.test.js.snap | 16 ++++++++-------- .../__snapshots__/TitleColumn.test.js.snap | 6 +++--- src/routes/InventoryTable.js | 3 ++- src/routes/InventoryTable.test.js | 2 ++ src/store/actions.js | 6 ++++-- src/store/actions.test.js | 1 + src/store/inventory-actions.js | 3 ++- 12 files changed, 33 insertions(+), 23 deletions(-) diff --git a/src/Utilities/DeleteModal.js b/src/Utilities/DeleteModal.js index fb37bfc20..318f154d5 100644 --- a/src/Utilities/DeleteModal.js +++ b/src/Utilities/DeleteModal.js @@ -27,7 +27,7 @@ const DeleteModal = ({ handleModalToggle, isModalOpen, currentSytems, onConfirm return handleModalToggle(false)} diff --git a/src/Utilities/__snapshots__/DeleteModal.test.js.snap b/src/Utilities/__snapshots__/DeleteModal.test.js.snap index bf491e42a..6c38f8f4e 100644 --- a/src/Utilities/__snapshots__/DeleteModal.test.js.snap +++ b/src/Utilities/__snapshots__/DeleteModal.test.js.snap @@ -7,7 +7,7 @@ exports[`EntityTable DOM should render correctly 1`] = ` aria-describedby="" aria-label="" aria-labelledby="" - className="ins-c-inventory__table--remove" + className="ins-c-inventory__table--remove sentry-mask data-hj-suppress" hasNoBodyWrapper={false} isOpen={false} onClose={[Function]} @@ -103,7 +103,7 @@ exports[`EntityTable DOM should render correctly with multiple systems - count 1 aria-describedby="" aria-label="" aria-labelledby="" - className="ins-c-inventory__table--remove" + className="ins-c-inventory__table--remove sentry-mask data-hj-suppress" hasNoBodyWrapper={false} isOpen={true} onClose={[Function]} @@ -200,7 +200,7 @@ exports[`EntityTable DOM should render correctly with multiple systems - count 2 aria-describedby="" aria-label="" aria-labelledby="" - className="ins-c-inventory__table--remove" + className="ins-c-inventory__table--remove sentry-mask data-hj-suppress" hasNoBodyWrapper={false} isOpen={true} onClose={[Function]} @@ -297,7 +297,7 @@ exports[`EntityTable DOM should render correctly with one system 1`] = ` aria-describedby="" aria-label="" aria-labelledby="" - className="ins-c-inventory__table--remove" + className="ins-c-inventory__table--remove sentry-mask data-hj-suppress" hasNoBodyWrapper={false} isOpen={true} onClose={[Function]} @@ -394,7 +394,7 @@ exports[`EntityTable DOM should render correctly with one system 2`] = ` aria-describedby="" aria-label="" aria-labelledby="" - className="ins-c-inventory__table--remove" + className="ins-c-inventory__table--remove sentry-mask data-hj-suppress" hasNoBodyWrapper={false} isOpen={true} onClose={[Function]} diff --git a/src/components/GeneralInfo/SystemCard/SystemCard.js b/src/components/GeneralInfo/SystemCard/SystemCard.js index 76a589e1c..504faf2b5 100644 --- a/src/components/GeneralInfo/SystemCard/SystemCard.js +++ b/src/components/GeneralInfo/SystemCard/SystemCard.js @@ -170,6 +170,7 @@ class SystemCardCore extends Component { inputOuiaId="input-edit-display-name" onCancel={ this.onCancel } onSubmit={ this.onSubmit(setDisplayName, entity && entity.display_name) } + className ='sentry-mask data-hj-suppress' /> ); diff --git a/src/components/InventoryDetail/TopBar.js b/src/components/InventoryDetail/TopBar.js index 408deaf61..526d081a7 100644 --- a/src/components/InventoryDetail/TopBar.js +++ b/src/components/InventoryDetail/TopBar.js @@ -144,7 +144,8 @@ const TopBar = ({ variant: 'warning', title: 'Delete operation initiated', description: `Removal of ${entity.display_name} started.`, - dismissable: false + dismissable: false, + className: 'sentry-mask data-hj-suppress' }); deleteEntity( [entity.id], diff --git a/src/components/InventoryTable/TitleColumn.js b/src/components/InventoryTable/TitleColumn.js index ac41ddcf0..c327a8a2f 100644 --- a/src/components/InventoryTable/TitleColumn.js +++ b/src/components/InventoryTable/TitleColumn.js @@ -32,7 +32,7 @@ const onRowClick = (event, key, { loaded, onRowClick: rowClick, noDetail }) => { * @param {*} props additional props passed from `EntityTable` - holds any props passed to inventory table. */ const TitleColumn = (data, id, item, props) => ( -
+
{item?.os_release}
{ props?.noDetail ? diff --git a/src/components/InventoryTable/__snapshots__/EntityTable.test.js.snap b/src/components/InventoryTable/__snapshots__/EntityTable.test.js.snap index 340c86783..3169e0c6e 100644 --- a/src/components/InventoryTable/__snapshots__/EntityTable.test.js.snap +++ b/src/components/InventoryTable/__snapshots__/EntityTable.test.js.snap @@ -102,7 +102,7 @@ exports[`EntityTable DOM should render correctly - compact 1`] = ` data-label="One" >
onRefresh({ filters }))); handleModalToggle(false); diff --git a/src/routes/InventoryTable.test.js b/src/routes/InventoryTable.test.js index ad3166c63..2fd13b244 100644 --- a/src/routes/InventoryTable.test.js +++ b/src/routes/InventoryTable.test.js @@ -206,6 +206,7 @@ describe('InventoryTable', () => { expect(actions[0]).toEqual({ payload: { + className: 'sentry-mask data-hj-suppress', description: 'Removal of RHIQE.31ea86a9-a439-4422-9516-27c879057535.test started.', dismissable: false, id: 'remove-initiated', @@ -219,6 +220,7 @@ describe('InventoryTable', () => { meta: { notifications: { fulfilled: { + className: 'sentry-mask data-hj-suppress', description: 'RHIQE.31ea86a9-a439-4422-9516-27c879057535.test has been successfully removed.', dismissable: true, title: 'Delete operation finished', diff --git a/src/store/actions.js b/src/store/actions.js index 0167d550b..7ffb6bb59 100644 --- a/src/store/actions.js +++ b/src/store/actions.js @@ -12,7 +12,8 @@ export const deleteEntity = (systems, displayName) => ({ variant: 'success', title: 'Delete operation finished', description: `${displayName} has been successfully removed.`, - dismissable: true + dismissable: true, + className: 'sentry-mask data-hj-suppress' } }, systems @@ -43,7 +44,8 @@ export const editDisplayName = (id, value, origValue) => ({ fulfilled: { variant: 'success', title: `Display name for entity with ID ${id} has been changed to ${value}`, - dismissable: true + dismissable: true, + className: 'sentry-mask data-hj-suppress' } } } diff --git a/src/store/actions.test.js b/src/store/actions.test.js index ff71dc4a0..e08cf2b44 100644 --- a/src/store/actions.test.js +++ b/src/store/actions.test.js @@ -30,6 +30,7 @@ describe('editDisplayName', () => { origValue: undefined, notifications: { fulfilled: { + className: 'sentry-mask data-hj-suppress', variant: 'success', title: 'Display name for entity with ID 4 has been changed to test-value', dismissable: true diff --git a/src/store/inventory-actions.js b/src/store/inventory-actions.js index 95e3d7585..a35d05c3c 100644 --- a/src/store/inventory-actions.js +++ b/src/store/inventory-actions.js @@ -198,7 +198,8 @@ export const deleteEntity = (systems, displayName) => ({ variant: 'success', title: 'Delete operation finished', description: `${displayName} has been successfully removed.`, - dismissable: true + dismissable: true, + className: 'sentry-mask data-hj-suppress' } }, systems