-
Notifications
You must be signed in to change notification settings - Fork 49
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 state of the Kyma modules in cluster overview #3699
Conversation
public/i18n/en.yaml
Outdated
modules-ready: 'Ready' | ||
modules-error: 'Error' | ||
modules-warning: 'Warning' |
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 have it in common.stauses
, probably it will be better to not make additional duplicated state
statuses:
error: Error
ready: Ready
unknown: Unknown
subTitle={t('kyma-modules.installed-modules')} | ||
extraInfo={[ | ||
{ | ||
title: t('cluster-overview.statistics.modules-ready'), |
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.
as previous comment
@@ -61,6 +66,58 @@ export function useModuleStatus(resource: KymaResourceType) { | |||
return { data, loading, error }; | |||
} | |||
|
|||
export function useModulesStatuses(modules: any[]) { |
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 have 2 functions, one to get status for one module, and this to get all of the statuses, please rename this function to be more different in naming than the 1 one. Maybe useGetAllModulesStatuses
or useAllModulesStatuses
} | ||
/> | ||
</div> | ||
<CountingCard |
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.
Please move it to a separate file, components + moduleCounts
error: statusesError, | ||
} = useModulesStatuses(modules); | ||
|
||
const moduleCounts = useMemo(() => { |
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.
maybe name it moduleStatusCounts
or countModuleStatuses
, will be a little bit clearer
Description
Changes proposed in this pull request:
Related issue(s)
Closes #3659
Definition of done
backlog#4567