Skip to content

Commit

Permalink
Call chrome's API to register page type and object ID (RedHatInsights…
Browse files Browse the repository at this point in the history
  • Loading branch information
karelhala committed Sep 9, 2020
1 parent 9c7b786 commit 3cf87a1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/routes/InventoryDetail.js
Expand Up @@ -56,6 +56,7 @@ const Inventory = ({ entity, currentApp, clearNotifications, loadEntity }) => {
};

useEffect(() => {
insights.chrome.appAction('system-detail');
loadInventory();
}, []);

Expand All @@ -65,6 +66,8 @@ const Inventory = ({ entity, currentApp, clearNotifications, loadEntity }) => {

const Wrapper = DetailWrapper || Fragment;

insights.chrome.appObjectId(entity?.id);

return (
<Wrapper
hideInvLink
Expand Down
2 changes: 2 additions & 0 deletions src/routes/InventoryTable.js
Expand Up @@ -139,6 +139,8 @@ const Inventory = ({
};

useEffect(() => {
insights.chrome.appAction('system-list');
insights.chrome.appObjectId();
loadInventory();
}, []);

Expand Down

0 comments on commit 3cf87a1

Please sign in to comment.