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 Managed by section in resource tab for operator backed services #3943
add Managed by section in resource tab for operator backed services #3943
Conversation
10e93dc
to
96c1761
Compare
/kind feature |
putting on hold as UXD is yet to be confirmed. |
removing hold as we are going with the presently available UXD option for the time being. |
/retest |
@@ -45,6 +46,18 @@ const getSidebarResources = ({ obj, ksroutes, revisions, configurations }: Overv | |||
}; | |||
const OverviewDetailsKnativeResourcesTab: React.FC<OverviewDetailsResourcesTabProps> = ({ | |||
item, | |||
}) => <div className="overview__sidebar-pane-body"> {getSidebarResources(item)} </div>; | |||
}) => ( | |||
<div className="overview__sidebar-pane-body"> |
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 see the same code repeated twice. Make this a pure component and share it in both places.
@@ -34,6 +40,14 @@ export const OverviewDetailsResourcesTab: React.SFC<OverviewDetailsResourcesTabP | |||
const pluginComponents = getPluginTabSectionResource(item); | |||
return ( | |||
<div className="overview__sidebar-pane-body"> | |||
{item.isOperatorBackedService && ( |
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.
Use shared 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.
Done. PTAL
<span className="sidebar__section-owner-operator-heading"> | ||
Managed by operator: | ||
<span className="sidebar__section-owner-reference-operator"> | ||
<OwnerReferences resource={item.obj} /> |
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.
Looks like owner references can be an array. Does this mean that every owner ref should be listed or only the one that is backed by an operator?
Reusing this component is probably ok for now but we should ok investigate.
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.
in case of multiple owners, we could have a check for the operator backed owner.
I'm not sure if there can be multiple operator backed owners.
eb0dc03
to
8e0b72a
Compare
import { OverviewItem } from '@console/shared'; | ||
import { OwnerReferences } from './owner-references'; | ||
|
||
export const OperatorBackedOwnerReferences: React.FC<OperatorBackedOwnerReferencesProps> = ({ |
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.
We prefer single default exports for component files.
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've updated the component to export default OperatorBackedOwnerReferences.
PTAL
@openshift/team-devconsole-ux |
addc645
to
5b92772
Compare
/retest |
5b92772
to
22e6cba
Compare
/test images |
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.
looks good!
/approve |
22e6cba
to
5586c2b
Compare
/test images |
5586c2b
to
fa97c2b
Compare
Knative Services are not considered as operator backed (sidepanel does not have managed by: knative serving operator), we need to show the knative opertaor Icon. we can have a followup bug for this and displaying operator icon. |
Verified locally |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: christianvogt, karthikjeeyar, nemesis09, serenamarie125 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 |
That would require the |
This PR-
screens-