Bug 2084292

Summary: Access to dashboard resources is needed in dynamic plugin SDK
Product: OpenShift Container Platform Reporter: Phillip Bailey <phbailey>
Component: Management ConsoleAssignee: Phillip Bailey <phbailey>
Status: CLOSED ERRATA QA Contact: Yadan Pei <yapei>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.11CC: yapei
Target Milestone: ---   
Target Release: 4.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-10 11:11:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Phillip Bailey 2022-05-11 19:56:13 UTC
Description of problem:

The withDashboardResources HOC provides needed access to data inside the Console redux store for static plugins. That isn't an option when migrating to a dynamic plugin, but access to that data is still needed.

The preferred option to fill this gap is a hook that provides the data once provided by withDashboardResources that hasn't already been replaced by existing hooks such as watchK8sResources.

Comment 2 Yadan Pei 2022-05-17 07:09:04 UTC
Hi Phillip

Trying to figure out how to verify the new changes fix PR has brought in but still no clue, to my understanding, this PR just adds a new useDashboardResources Hook, but I didn't see any references/usages about it, how can I make sure it is functionally working?

Comment 4 Yadan Pei 2022-06-01 08:23:24 UTC
confirmed that the useDashboardResources hook is exported in our console-dynamic-plugin-sdk

$ cat packages/console-dynamic-plugin-sdk/dist/internal/lib/api/internal-api.js
.......
.......
export const useDashboardResources = require('@console/shared/src/hooks/useDashboardResources')
    .useDashboardResources;
.......
.......

Comment 6 errata-xmlrpc 2022-08-10 11:11:18 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: OpenShift Container Platform 4.11.0 bug fix and security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:5069