Skip to content
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

Merged
merged 8 commits into from
Feb 17, 2025

Conversation

OliwiaGowor
Copy link
Contributor

@OliwiaGowor OliwiaGowor commented Feb 13, 2025

Description

Changes proposed in this pull request:

  • added state of the Kyma modules in cluster overview
  • adjusted tests

Related issue(s)
Closes #3659

Definition of done

  • The PR's title starts with one of the following prefixes:
    • feat: A new feature
    • fix: A bug fix
    • docs: Documentation only changes
    • refactor: A code change that neither fixes a bug nor adds a feature
    • test: Adding tests
    • revert: Revert commit
    • chore: Maintainance changes to the build process or auxiliary tools, libraries, workflows, etc.
  • Related issues are linked. To link internal trackers, use the issue IDs like backlog#4567
  • Explain clearly why you created the PR and what changes it introduces
  • All necessary steps are delivered, for example, tests, documentation, merging

@kyma-bot kyma-bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cla: yes Indicates the PR's author has signed the CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 13, 2025
@OliwiaGowor OliwiaGowor marked this pull request as ready for review February 13, 2025 11:40
@kyma-bot kyma-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 13, 2025
@mrCherry97 mrCherry97 self-assigned this Feb 13, 2025
Comment on lines 45 to 47
modules-ready: 'Ready'
modules-error: 'Error'
modules-warning: 'Warning'
Copy link
Contributor

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'),
Copy link
Contributor

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[]) {
Copy link
Contributor

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
Copy link
Contributor

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(() => {
Copy link
Contributor

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

@kyma-bot kyma-bot added the lgtm Looks good to me! label Feb 17, 2025
@mrCherry97 mrCherry97 enabled auto-merge (squash) February 17, 2025 09:38
@mrCherry97 mrCherry97 merged commit 72fc158 into kyma-project:main Feb 17, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Indicates the PR's author has signed the CLA. lgtm Looks good to me! size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

State of the Kyma modules is not visible in cluster overview
4 participants