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/infra monitoring k8s volume #6900

Merged

Conversation

amlannandy
Copy link
Member

@amlannandy amlannandy commented Jan 22, 2025

Summary

Related Issues / PR's

Screenshots

NA

Affected Areas and Manually Tested Areas


Important

Add Kubernetes volumes monitoring feature with new API calls, UI components, styles, and utilities.

  • API Changes:
    • Add getK8sVolumesList function in getK8sVolumesList.ts to fetch Kubernetes volumes data.
    • Update API calls in getK8sDaemonSetsList.ts, getK8sJobsList.ts, and getsK8sStatefulSetsList.ts to use axios.
  • UI Components:
    • Add K8sVolumesList component in K8sVolumesList.tsx for displaying volumes.
    • Add VolumeDetails component in VolumeDetails.tsx for detailed view of a volume.
    • Update InfraMonitoringK8s.tsx to include volumes in the monitoring categories.
  • Styles:
    • Add styles for volumes in K8sVolumesList.styles.scss and entityDetails.styles.scss.
  • Utilities and Constants:
    • Add utility functions in utils.tsx for handling volume data.
    • Update constants.ts to include volume-related configurations and mappings.
  • Hooks:
    • Add useGetK8sVolumesList hook in useGetK8sVolumesList.ts for fetching volume data using React Query.

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

@amlannandy amlannandy requested a review from YounixM as a code owner January 22, 2025 11:23
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! Reviewed everything up to 6fa7e39 in 2 minutes and 18 seconds

More details
  • Looked at 5600 lines of code in 41 files
  • Skipped 0 files when reviewing.
  • Skipped posting 9 drafted comments based on config settings.
1. frontend/src/container/InfraMonitoringK8s/Volumes/VolumeDetails/VolumeDetails.tsx:34
  • Draft comment:
    The conversion factor for nanoseconds to milliseconds should be 1000000, not 1000000000. Please update the conversion logic accordingly.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable:
  1. To convert from nanoseconds to milliseconds, we need to divide by 1,000,000 (1e6) since 1ms = 1,000,000ns. 2. However, looking at the variable names (startMs, endMs), these might actually be meant to be in seconds, not milliseconds. 3. To convert from nanoseconds to seconds, we divide by 1,000,000,000 (1e9). 4. The current code uses 1e9 consistently, suggesting it's intentionally converting to seconds.
    I could be wrong about the intended unit - maybe these times really should be in milliseconds. Without seeing how these values are used by other components, I can't be 100% certain.
    The consistent use of 1e9 throughout the file and the fact that Unix timestamps are typically in seconds strongly suggests these are meant to be second-based timestamps, not milliseconds.
    The comment appears to be incorrect. The code is likely intentionally converting to seconds, not milliseconds, so the 1000000000 divisor is correct.
2. frontend/src/container/InfraMonitoringK8s/Volumes/VolumeDetails/VolumeDetails.tsx:37
  • Draft comment:
    The conversion factor for nanoseconds to milliseconds should be 1000000, not 1000000000. Please update the conversion logic accordingly.
  • Reason this comment was not posted:
    Marked as duplicate.
3. frontend/src/container/InfraMonitoringK8s/Volumes/VolumeDetails/VolumeDetails.tsx:66
  • Draft comment:
    The conversion factor for nanoseconds to milliseconds should be 1000000, not 1000000000. Please update the conversion logic accordingly.
  • Reason this comment was not posted:
    Marked as duplicate.
4. frontend/src/container/InfraMonitoringK8s/Volumes/VolumeDetails/VolumeDetails.tsx:67
  • Draft comment:
    The conversion factor for nanoseconds to milliseconds should be 1000000, not 1000000000. Please update the conversion logic accordingly.
  • Reason this comment was not posted:
    Marked as duplicate.
5. frontend/src/container/InfraMonitoringK8s/Volumes/VolumeDetails/VolumeDetails.tsx:85
  • Draft comment:
    The conversion factor for nanoseconds to milliseconds should be 1000000, not 1000000000. Please update the conversion logic accordingly.
  • Reason this comment was not posted:
    Marked as duplicate.
6. frontend/src/container/InfraMonitoringK8s/Volumes/VolumeDetails/VolumeDetails.tsx:86
  • Draft comment:
    The conversion factor for nanoseconds to milliseconds should be 1000000, not 1000000000. Please update the conversion logic accordingly.
  • Reason this comment was not posted:
    Marked as duplicate.
7. frontend/src/container/InfraMonitoringK8s/Volumes/VolumeDetails/VolumeDetails.tsx:106
  • Draft comment:
    The conversion factor for nanoseconds to milliseconds should be 1000000, not 1000000000. Please update the conversion logic accordingly.
  • Reason this comment was not posted:
    Marked as duplicate.
8. frontend/src/container/InfraMonitoringK8s/Volumes/VolumeDetails/VolumeDetails.tsx:107
  • Draft comment:
    The conversion factor for nanoseconds to milliseconds should be 1000000, not 1000000000. Please update the conversion logic accordingly.
  • Reason this comment was not posted:
    Marked as duplicate.
9. frontend/src/container/InfraMonitoringK8s/Volumes/utils.tsx:137
  • Draft comment:
    Use design tokens or predefined color constants instead of hardcoding color values for consistency.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.

Workflow ID: wflow_B3GVR8qJm1sc3yPz


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

@amlannandy amlannandy force-pushed the feat/infra-monitoring-k8s-volume branch from 6fa7e39 to d3da712 Compare January 22, 2025 11:31
@github-actions github-actions bot added the enhancement New feature or request label Jan 22, 2025
@amlannandy amlannandy merged commit ad3a269 into feat/infra-monitoring-k8s-jobs Jan 22, 2025
6 checks passed
@amlannandy amlannandy deleted the feat/infra-monitoring-k8s-volume branch January 22, 2025 11:31
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