-
Notifications
You must be signed in to change notification settings - Fork 51
feat: Add Community Modules Table in Modules view #3917
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
feat: Add Community Modules Table in Modules view #3917
Conversation
setSelectedEntry={setSelectedEntry} | ||
/> | ||
)} | ||
{kymaResource && ( |
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.
Community modules should be independent from kymaResource
@@ -86,6 +88,14 @@ export function KymaModuleContextProvider({ | |||
skip: !kymaResource?.metadata?.name, | |||
}); | |||
|
|||
const { | |||
installed: installedCommunityModules, |
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.
Those are not installedCommunityModules
, but installedCommunityModules and installed unmanaged modules. To get installedCommunityModules
you should pass communityModuleTemplates
instead of moduleTemplates
.
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.
loading: communityModulesLoading, | ||
} = useGetInstalledModules( | ||
moduleTemplates, | ||
!kymaResource?.metadata?.name || !!!moduleTemplates, |
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.
Also community modules are independent of !kymaResource?.metadata?.name. If there is no kymaResource then all installed modules are community modules.
KymaModuleProvider was written for managed/unmanaged modules only, thats why we skip in !kymaResource?.metadata?.name
. If we adopt this provider to community modules as well we need to adjust some some skips due to !kymaResource?.metadata?.name
) => { | ||
if (!moduleTemplates?.items) return { managed: [], unmanaged: [] }; | ||
|
||
const managed: ModuleTemplateListType = { items: [] }; |
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 would rename it to community templates and kyma templates... cause kyma modules after installation are either managed and unmanaged, so it can get confusing.
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.
LGTM
Description
Changes proposed in this pull request:
Related issue(s)
Closes #3815
Definition of done
backlog#4567