Skip to content

Conversation

@CannonLock
Copy link
Contributor

( Draft for now until I can get my hands on a running cache to view real data )

  • Same as Origin as they have the same metrics
  • Centralize shared comps

@CannonLock CannonLock marked this pull request as ready for review March 26, 2025 20:21
@CannonLock CannonLock changed the title (Draft) Add Cache metrics page Add Cache metrics page Mar 26, 2025
@CannonLock CannonLock requested review from Copilot and h2zh and removed request for Copilot March 26, 2025 20:22
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a new Cache Metrics page that centralizes shared components from the Origin metrics page, reusing existing graph components and updating the navigation. Key changes include:

  • Adding a new layout and page for cache metrics under the cache section.
  • Refactoring import paths to use centralized shared components.
  • Updating the navigation configuration to include a Metrics entry under cache.

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
web_ui/frontend/app/cache/metrics/layout.tsx New layout using dynamic imports for GraphContext and GraphOverlay.
web_ui/frontend/app/cache/metrics/page.tsx New Cache Metrics page with multiple metric components.
web_ui/frontend/components/metrics/index.ts Re-export of shared metric components.
web_ui/frontend/components/metrics/ProjectsTable.tsx Refactored export style for the ProjectTable component.
web_ui/frontend/app/navigation.tsx Added the Metrics navigation link for the cache section.
web_ui/frontend/app/origin/metrics/page.tsx Updated import paths to reference the shared metrics components.
web_ui/frontend/app/director/metrics/page.tsx Updated import paths to reference the shared metrics components.
web_ui/frontend/app/origin/metrics/components/index.ts Removed redundant exports due to centralization.

@CannonLock CannonLock added the enhancement New feature or request label Mar 26, 2025
Copy link
Contributor

@h2zh h2zh left a comment

Choose a reason for hiding this comment

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

The code looks good. I’m curious why Origin metrics page has StorageGraph but Cache’s doesn’t? Is it possible to share the layout file across Origin and Cache’s metrics pages?

@CannonLock
Copy link
Contributor Author

@h2zh

The code looks good. I’m curious why Origin metrics page has StorageGraph but Cache’s doesn’t? Is it possible to share the layout file across Origin and Cache’s metrics pages?

Good call I have shared the layout.

I dropped the storage because this is not a metric that populated for a cache. As it is the amount of free space I would expect it to always be 0 when the cache is hot?

@CannonLock CannonLock requested a review from h2zh March 31, 2025 20:24
Copy link
Contributor

@h2zh h2zh left a comment

Choose a reason for hiding this comment

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

LGTM after the creation of associated Github issue! One nitpicky thing: the commit messages and commit content are mixed up in the last two commits. You may want to squash them.

@h2zh h2zh self-assigned this Mar 31, 2025
@h2zh h2zh added this to the v7.16 milestone Mar 31, 2025
@CannonLock
Copy link
Contributor Author

@h2zh Not nitpicky at all, perfection is the goal. I will fixup.

@CannonLock CannonLock modified the milestones: v7.16, 2164 Apr 1, 2025
@CannonLock CannonLock linked an issue Apr 1, 2025 that may be closed by this pull request
@CannonLock CannonLock linked an issue Apr 1, 2025 that may be closed by this pull request
@CannonLock CannonLock merged commit 05d979a into PelicanPlatform:main Apr 1, 2025
25 of 26 checks passed
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.

Add page for Cache Metrics

2 participants