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
ODC-6779 - Hide sub-catalog(s) in the developer catalog or the entire dev catalog based on customization #12067
ODC-6779 - Hide sub-catalog(s) in the developer catalog or the entire dev catalog based on customization #12067
Conversation
/retest |
/assign @jerolimov |
/retest |
frontend/packages/dev-console/src/utils/useAddActionExtensions.ts
Outdated
Show resolved
Hide resolved
frontend/packages/dev-console/src/utils/useAddActionExtensions.ts
Outdated
Show resolved
Hide resolved
frontend/packages/dev-console/src/utils/useAddActionExtensions.ts
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.
This was just a high level review but we should not update the extensions if it's not needed.
PTAL on my comments below:
frontend/packages/console-dynamic-plugin-sdk/src/extensions/actions.ts
Outdated
Show resolved
Hide resolved
frontend/packages/console-dynamic-plugin-sdk/src/extensions/catalog.ts
Outdated
Show resolved
Hide resolved
frontend/packages/dev-console/src/utils/useAddActionExtensions.ts
Outdated
Show resolved
Hide resolved
frontend/packages/dev-console/src/utils/useAddActionExtensions.ts
Outdated
Show resolved
Hide resolved
helmRelease: { | ||
label: t('helm-plugin~Helm Release'), | ||
label: isHelmVisible ? t('helm-plugin~Helm Release') : null, | ||
onSelection: () => `/catalog/ns/${namespace}?catalogType=HelmChart`, | ||
}, |
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.
If the flag is false and we don't want to add an Action
, we should not add it completely instead of setting the label to null.
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.
If the label is null then that action will not be added.
frontend/packages/knative-plugin/src/actions/add-event-sink.tsx
Outdated
Show resolved
Hide resolved
4e55be3
to
f796783
Compare
Hi @jerolimov / @debsmita1 , Updated the PR as per the PR comments. |
f796783
to
349f008
Compare
/retest |
1 similar comment
/retest |
3926393
to
e5ea31b
Compare
/retest |
e32b0cc
to
dc89179
Compare
Updated the PR. PTAL. Thanks. |
The entire dev-catalog is disabled, but I can see |
dc89179
to
a529ea8
Compare
Updated the PR. |
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 @lokanandaprabhu . This feature works as expected. Just added a couple of nits. PTAL if it makes sense.
ff83dc0
to
0fa6ab9
Compare
@@ -47,7 +48,7 @@ const CatalogServiceProvider: React.FC<CatalogServiceProviderProps> = ({ | |||
catalogBadgeProviderExtensions, | |||
extensionsResolved, | |||
] = useCatalogExtensions(catalogId, catalogType); | |||
|
|||
const [disabledSubCatalogs] = useGetAllDisabledSubCatalogs(); |
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.
Isn't it easier to filter the items directly in useCatalogExtensions
so that it returns already just an array of enabled catalogTypeExtensions
?
frontend/packages/console-shared/src/components/catalog/catalog-view/CatalogTypeSelector.tsx
Outdated
Show resolved
Hide resolved
0fa6ab9
to
e03cbb4
Compare
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 PR needs a rebase and I would like that you move the utils as mentioned below.
frontend/packages/console-shared/src/components/catalog/catalog-view/CatalogTypeSelector.tsx
Outdated
Show resolved
Hide resolved
...packages/kubevirt-plugin/src/components/create-vm/dev-console/dev-console-create-vm-form.tsx
Outdated
Show resolved
Hide resolved
Following our no-FF process propagate the PX and Docs ACK from epic ODC-5897 I add also approve here so that @debsmita1 can do the final review when the files are moved (#12067 (review)) and the PR is rebased. |
e03cbb4
to
59b26fb
Compare
Hi @jerolimov / @debsmita1 , I have updated the PR based on PR comments. PTAL. Thanks. |
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.
Tested the latest version on a cluster bot instance and it works fine. 👍
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jerolimov, lokanandaprabhu 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 |
/retest |
@lokanandaprabhu: all tests passed! Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
JIRA story:
https://issues.redhat.com/browse/ODC-6779
Description:
This story is about the customization of developer catalog and sub-catalog based on customization. If all the available sub-catalogs(types) are disabled, complete developer catalog along with the entry points to the catalog will be disabled.
Screenshots:
----When all the sub-catalogs are disabled - Add page----
----When all the sub-catalogs are disabled - Topology page----
-----Quick start when complete developer catalog is disabled-----
------ All services - when all the sub-catalogs(types) are enabled----
------ All services - when Templates and Helm charts sub-catalogs are disabled----
-----Helm Page when helm chart sub-catalog is disabled-----
---- Operator hub description when operator backed service is disabled or complete developer catalog is disabled---
---- If Event source type is disabled, create event source in action menu is hidden----
-----If user try to reach to catalog by entering URL and if that sub-catalog is disabled, then user will see Page not found--
Test cases:
How to test:
If backend API PR's - openshift/api#1256 & openshift/console-operator#676 are not merged then to add the customization use below method,
Pass options as a string to bridge with -developer-catalog-disabled-types or pass a ConsoleConfig yaml with -config option.
Example:
Specify developer catalog types to bridge with ./bin/bridge -developer-catalog-types '{ "state": "Disabled" ,"disabled": ["HelmChart", "Devfile"] }'.
This indicated HelmChart and Devfile sub-catalogs are disabled. Similarly below are the test scenarios,
If the
state
isEnabled
andenabled
list is empty, all the types will be shown.If the
state
idEnabled
andenabled
list is non-empty, only theenabled
list items will be shown.If the
state
isDisabled
anddisabled
list is empty, all the types will be hidden.If the
state
idDisabled
anddisabled
list is non-empty, only thedisabled
list items will be hidden.To disable the complete developer catalog then in
disabled
all the available typesshould be listed or make the
disabled
list empty forstate: Disabled
./kind feature