-
Notifications
You must be signed in to change notification settings - Fork 667
Add Inventory card #1810
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
Add Inventory card #1810
Conversation
|
Hi @rawagner. Thanks for your PR. I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
129b5fc to
9b11440
Compare
... to Cluster Inventory card within the Overview tab 😃 |
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.
It seems that resource.kind value can fall back to model.kind unless the developer wants to be explicit about it.
More generally, we should try to keep the extension properties (API surface) as small and lean as possible.
With these typings added to public/declarations.d.ts (source):
type OptionalExceptFor<T, K extends keyof T> = Partial<T> & Pick<T, K>;
type RequiredExceptFor<T, K extends keyof T> = Pick<T, Diff<keyof T, K>> & Partial<T>;We can now modify resource.kind to be optional:
resource: RequiredExceptFor<FirehoseResource, 'kind'>;which makes the extension properties declaration shorter.
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.
RequiredExceptFor definition isn't correct as we are using different Diff definition than expected. Sticking to FirehoseResource for now
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.
OK, we can improve this later on.
frontend/public/components/dashboard/inventory-card/inventory-item.tsx
Outdated
Show resolved
Hide resolved
frontend/public/components/dashboard/inventory-card/inventory-item.tsx
Outdated
Show resolved
Hide resolved
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.
Please rename this property to icon to better reflect its purpose.
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.
Based on discussion, please change the type to React.ReactElement - similar to Perspective.icon.
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.
isnt React.ReactNode more appropriate here ? I could also rename icon to Icon to sign that it is React component.
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.
Using React.ReactElement same as in Perspective.icon
frontend/public/components/dashboard/inventory-card/inventory-item.tsx
Outdated
Show resolved
Hide resolved
frontend/public/components/dashboard/inventory-card/inventory-item.tsx
Outdated
Show resolved
Hide resolved
frontend/public/components/dashboards-page/overview-dashboard/inventory-card.tsx
Outdated
Show resolved
Hide resolved
frontend/public/components/dashboards-page/overview-dashboard/inventory-card.tsx
Outdated
Show resolved
Hide resolved
22f03be to
bc125b4
Compare
|
/assign @vojtechszocs |
|
/approve Approving pending lgtm from @vojtechszocs |
|
/ok-to-test |
bc125b4 to
9ca4349
Compare
frontend/packages/console-demo-plugin/src/dashboards/inventory.tsx
Outdated
Show resolved
Hide resolved
9ca4349 to
bd57b3f
Compare
bd57b3f to
f330161
Compare
|
@vojtechszocs as per our discussion I removed |
2e49f44 to
e7deb4a
Compare
added back sice #1871 is up |
75abbaf to
ae6d993
Compare
ae6d993 to
dc21720
Compare
|
/test e2e-aws |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rawagner, spadgett, vojtechszocs The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
Plugins can contribute new items to Inventory tab and also new status groups via
DashboardsOverviewInventoryItemandDashboardsInventoryItemGroupextension points.Every status group is a link pointing to resource page with enabled filters (ie Pods in OK group will link to Pods page with
'RunningandSucceededstatus).