-
Notifications
You must be signed in to change notification settings - Fork 615
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
Removing all the internal API Cards from Overview page #3844
Conversation
Hi @aruniiird. 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. 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. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: aruniiird The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@aruniiird I don't think this we should be showing empty tiles. @shirimordechay wdyt? |
return ( | ||
<Card></Card> | ||
) | ||
} |
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 guess all cards will be showing since the PF Card component has some custom css being applied on it that applies width to it.
https://github.com/openshift/console/blob/master/frontend/packages/operator-lifecycle-manager/src/style.scss#L89-L93
You can either return empty fragments to avoid this or return null.
Returning null
would be good as its is suggested in react docs
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.
Thanks @afreen23 , returning a null fixed the blank tiles (from showing up)
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.
@aruniiird need to modify the filtering logic now as per the below comment.
@@ -570,6 +570,11 @@ export const CRDCard: React.SFC<CRDCardProps> = (props) => { | |||
`/k8s/ns/${csv.metadata.namespace}/${ClusterServiceVersionModel.plural}/${ | |||
csv.metadata.name | |||
}/${reference}/~new`; | |||
if (crd.displayName.startsWith("[Internal]")) { |
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.
Is there a reason we can't use the operators.operatorframework.io/internal-objects
annotation instead of trying to key on the name? See #3518
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 tried this approach but is not working for me. Is there any documentation that clearly explains how to achieve this?
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.
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.
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.
Keying on name should be removed ?
bd546a7
to
b713b72
Compare
A minimal change to remove all the internal API cards from 'Installed Operator' -> Overview page Signed-off-by: Arun Kumar Mohan <arun.iiird@gmail.com>
b713b72
to
d920f88
Compare
@@ -616,7 +620,7 @@ export const CRDCardRow = connect(crdCardRowStateToProps)((props: CRDCardRowProp | |||
{_.isEmpty(props.crdDescs) ? ( | |||
<span className="text-muted">No Kubernetes APIs are being provided by this Operator.</span> | |||
) : ( | |||
props.crdDescs.map((desc) => ( | |||
props.crdDescs.filter((crd) => !isInternal(crd)).map((desc) => ( |
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.
Actually this function is expecting csv object passed with crd name.
In order to reuse need to pass a custom object with csv and crdDesc
Bipul has a better PR (#3877) to do the same ... Closing this PR |
A minimal change to remove all the internal API cards from 'Installed
Operator' -> Overview page
Signed-off-by: Arun Kumar Mohan arun.iiird@gmail.com