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
Bug 1796664: Add links to Marketplace workflows in OperatorHub #3861
Bug 1796664: Add links to Marketplace workflows in OperatorHub #3861
Conversation
/hold |
...ackages/operator-lifecycle-manager/src/components/operator-hub/operator-hub-item-details.tsx
Outdated
Show resolved
Hide resolved
...ackages/operator-lifecycle-manager/src/components/operator-hub/operator-hub-item-details.tsx
Outdated
Show resolved
Hide resolved
f0de823
to
dda3a6b
Compare
@@ -87,6 +91,12 @@ export const OperatorHubItemDetails: React.SFC<OperatorHubItemDetailsProps> = ({ | |||
item.subscription.metadata.name | |||
}?showDelete=true`; | |||
|
|||
const createLinkWorkflow = |
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.
Instead of having separate createLink
and createLinkWorkflow
variables, it would be better to have a single createLink
variables that's set to the right value.
const createLink =
_.get(obj, ['metadata', 'annotations', 'marketplace.openshift.io/remote-workflow']) ||
`/operatorhub/subscribe?pkg=${
obj.metadata.name
}&catalog=${catalogSource}&catalogNamespace=${catalogSourceNamespace}&targetNamespace=${namespace}`;
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.
Updated this.
dda3a6b
to
b71d52b
Compare
/retest |
1 similar comment
/retest |
@@ -39,6 +41,8 @@ export const OperatorHubItemDetails: React.SFC<OperatorHubItemDetailsProps> = ({ | |||
catalogSourceNamespace, | |||
} = item; | |||
const notAvailable = <span className="properties-side-panel-pf-property-label">N/A</span>; | |||
const actionText = | |||
_.get(obj, ['metadata', 'annotations', 'marketplace.openshift.io/action-text']) || 'Install'; |
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'm guessing these annotations would be on the CSV not the PackageManifest, but we need to check with @alimobrem. If so, this would be
_.get(obj, ['metadata', 'annotations', 'marketplace.openshift.io/action-text']) || 'Install'; | |
_.get(obj, ['status', 'channels', '0', 'currentCSVDesc', 'annotations', 'marketplace.openshift.io/action-text']) || 'Install'; |
and similar for the annotations below
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.
Yes they are on the CSV.
Thanks
@rebeccaalpert PR needs rebase and there's a pending comment about reading the annotation |
@spadgett This is blocked by modal PR. Will rebase and upload latest once that merges. |
Understood. If you rebase on your modal commit from the other PR and include it here, we should be able to review and tag. |
b71d52b
to
9b771d4
Compare
'0', | ||
'currentCSVDesc', | ||
'annotations', | ||
'marketplace.openshift.io/support-workflow', |
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.
@alimobrem @robszumski It looks like there's an existing support
annotation. Is there a reason we can't simply use that?
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 are using that one, right?
@@ -619,6 +619,14 @@ export const ClusterServiceVersionDetails: React.SFC<ClusterServiceVersionDetail | |||
props, | |||
) => { | |||
const { spec, metadata, status } = props.obj; | |||
const ibmSupportLink = _.get(props.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.
This path is wrong if you have the ClusterServiceVersion resource. This path is for the PackageManfiest.
Here it would just be on metadata.annotations
.
@@ -647,6 +655,10 @@ export const ClusterServiceVersionDetails: React.SFC<ClusterServiceVersionDetail | |||
<dd> | |||
{spec.provider && spec.provider.name ? spec.provider.name : 'Not available'} | |||
</dd> | |||
<dt>Support</dt> | |||
<dd> | |||
{ibmSupportLink && <ExternalLink href={ibmSupportLink} text="Get Support" />} |
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 should fall back to the standard support link here if available. (Although I think the marketplace support link could use the standard annotation.)
'currentCSVDesc', | ||
'annotations', | ||
'marketplace.openshift.io/support-workflow', | ||
]); |
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.
This should be read where the other CSV annotations are
'currentCSVDesc', | ||
'annotations', | ||
'marketplace.openshift.io/action-text', | ||
])) || |
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.
This should be read with the other annotations
d800ee1
to
08667e5
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rebeccaalpert, spadgett 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 |
/hold cancel This was approved and in the queue Friday, and no other changes have been made. (The commit from Friday rebased cleanly with no changes now that the modal PR merged.) |
/retest |
/retest Please review the full test history for this PR and help us cut down flakes. |
5 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
@rebeccaalpert: This pull request references Bugzilla bug 1796664, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 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. |
/retest Please review the full test history for this PR and help us cut down flakes. |
14 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
@rebeccaalpert: All pull requests linked via external trackers have merged. Bugzilla bug 1796664 has been moved to the MODIFIED state. 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. |
Read annotations and use action text, remote workflow link, and support link from annotations if present. Default to original values if not found.
The annotations don't seem to be present yet, but I added code to handle them for when they show up.
Fixes https://issues.redhat.com/projects/CONSOLE/issues/CONSOLE-1953.