New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose Internal APIs #9230
Expose Internal APIs #9230
Conversation
frontend/packages/console-dynamic-plugin-sdk/src/api/dashboard/dashboard-api.ts
Outdated
Show resolved
Hide resolved
/assign @christianvogt @vojtechszocs |
@@ -7,4 +8,5 @@ export const exposePluginAPI = () => { | |||
useK8sWatchResources: require('@console/internal/components/utils/k8s-watch-hook') | |||
.useK8sWatchResources, | |||
}; | |||
Object.assign(window.api, exposedAPIs); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I din't make a new object for it. Should I add it to window.provisional
instead? @vojtechszocs
IMO all of it can be accomplished from PF. However, exposing these simple components should allow us to maintain similarities across dashboards and changing CSS in the core console would allow us to revamp all the dashboards(wouldn't have to wait for two releases) without changing plugin code. |
I have created a wrapper for PageHeading #9465 based on the commonly used props. Apparently only a few of the defined are commonly used.
|
72df9dd
to
dd3c8ff
Compare
+1 for having one prometheus hook and storing data to redux. I wanted to do it for some time but cannot find the time |
As @bipuladh said. That is the idea behind these simple components. |
Changes lgtm We should be working towards promoting these extensions to proper APIs. |
e099218
to
7bad0f5
Compare
/test e2e-gcp-console |
@bipuladh: The specified target(s) for
Use
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bipuladh, christianvogt The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@yapei has given us the OK for development to test the PR. /label qe-approved This PR has no user visible changes and has no doc impact. These APIs are internal and can change at any time. /label px-approved /hold cancel |
Exposes the following Components:
Hooks
usePrometheusPoll
Dashboard Related Components
DashboardGrid
HealthItem
AlertItem
AlertsBody
PrometheusUtilizationItem
ResourceInventoryItem
UtilizationBody
RecentEventsBody
OngoingActivityBody
DashboardCard
DashboardCardBody
DashboardCardHeader
DashboardCardTitle
DetailsItem
DetailsBody
UtilizationItem
ActivityItem
ActivityBody