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: implement cluster details page #6698

Open
wants to merge 17 commits into
base: feat/infra-monitoring-k8s
Choose a base branch
from

Conversation

amlannandy
Copy link
Member

@amlannandy amlannandy commented Dec 22, 2024

Summary

Implement the clustersdetails page in Infra Monitoring

Related Issues / PR's

N/A

Screenshots

N/A

Affected Areas and Manually Tested Areas

Infra Monitoring section


Important

Implement detailed Kubernetes cluster view in Infra Monitoring with metrics, logs, traces, and events.

  • Cluster Details Page:
    • Implement ClusterDetails component for Kubernetes cluster details.
    • Add ClusterMetrics, ClusterLogs, ClusterTraces, and ClusterEvents components.
    • Implement NoLogsContainer and NoEventsContainer for empty states.
  • API Integration:
    • Create getK8sClustersList in getK8sClustersList.ts for fetching cluster data.
    • Use useGetK8sClustersList hook for querying data.
  • Styles:
    • Add SCSS files for styling components like ClusterDetails.styles.scss.
  • Utilities:
    • Define utility functions in constants.ts and utils.tsx for data formatting.

This description was created by Ellipsis for ee9c392. It will automatically update as commits are pushed.

@amlannandy amlannandy requested a review from YounixM as a code owner December 22, 2024 16:17
@amlannandy amlannandy marked this pull request as draft December 22, 2024 16:17
Copy link

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

@github-actions github-actions bot added the enhancement New feature or request label Dec 22, 2024
Copy link

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Changes requested. Reviewed everything up to 2f992b1 in 1 minute and 44 seconds

More details
  • Looked at 5604 lines of code in 33 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. frontend/src/container/InfraMonitoringK8s/Clusters/ClusterDetails/Traces/ClusterTraces.tsx:54
  • Draft comment:
    The offset state is initialized but never updated. Consider updating it to handle pagination correctly.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable:
    The code appears to handle pagination through URL query params (paginationQueryData) rather than local state. The offset state is just a fallback value of 0. While technically true that the setter is unused, this appears intentional as the pagination is controlled through the URL instead. The comment might lead to confusion or unnecessary changes.
    The comment correctly identifies an unused state setter. Perhaps there's a reason why URL-based pagination was chosen over state-based pagination that I'm missing?
    Using URL-based pagination is a valid and common pattern that allows for shareable/bookmarkable pages. The unused setter isn't a bug - it's just that the component uses a different pagination mechanism.
    The comment should be deleted. While technically correct about the unused setter, the pagination is intentionally handled through URL params instead of state, making this comment potentially misleading.
2. frontend/src/container/InfraMonitoringK8s/Clusters/ClusterDetails/Traces/constants.ts:107
  • Draft comment:
    The aggregateAttribute is set with empty values. Ensure this is intentional and won't affect query execution.
  • Reason this comment was not posted:
    Comment did not seem useful.

Workflow ID: wflow_lFKd59bAKweoIPMh


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

items: [],
op: 'and',
},
orderBy: { columnName: 'cpu', order: 'desc' },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The orderBy field is hardcoded to cpu, which might not exist or be intended for ordering. Consider making this dynamic or ensuring the field exists.

key: `${key}-${dataType}-${type}`,
width: 145,
render: (value, item): JSX.Element => {
const itemData = item.data as any;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using item.data as any can lead to runtime errors. Consider using a more specific type or adding type checks.

return (
<div className="pod-group">
{groupByValues.map((value) => (
<Tag key={value} color="#1D212D" className="pod-group-tag-item">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use design tokens or predefined color constants instead of hardcoding color values for consistency.

@amlannandy amlannandy marked this pull request as ready for review December 23, 2024 06:18
@amlannandy amlannandy force-pushed the feat/infra-monitoring-k8s-clusters-details branch from 2f992b1 to de61caa Compare December 24, 2024 17:35
Copy link

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Changes requested. Incremental review on de44425 in 56 seconds

More details
  • Looked at 236 lines of code in 4 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. frontend/src/container/InfraMonitoringK8s/Clusters/ClusterDetails/ClusterDetails.tsx:373
  • Draft comment:
    Remove the console.log statement to avoid unnecessary console output in production code.
  • Reason this comment was not posted:
    Comment was not on a valid diff hunk.

Workflow ID: wflow_2eqinKoMwd1XQsZL


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

}
}, [groupByFiltersData]);

console.log({ selectedClusterData });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the console.log statement to avoid unnecessary console output in production code.

Copy link

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Incremental review on ee9c392 in 40 seconds

More details
  • Looked at 1706 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. frontend/src/container/InfraMonitoringK8s/Clusters/K8sClustersList.tsx:435
  • Draft comment:
    Remove the unnecessary console.log statement to clean up the code.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
2. frontend/src/container/InfraMonitoringK8s/Clusters/K8sClustersList.tsx:435
  • Draft comment:
    Remove the unnecessary console.log statement to clean up the code.

  • Reason this comment was not posted:
    Marked as duplicate.

Workflow ID: wflow_mrR7KhSsv8jRcmBd


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant