OCPBUGS-77113: remove dev to admin links as dev monitoring views are enabled#16163
OCPBUGS-77113: remove dev to admin links as dev monitoring views are enabled#16163jgbernalp wants to merge 1 commit intoopenshift:mainfrom
Conversation
|
@jgbernalp: This pull request references Jira Issue OCPBUGS-77113, which is valid. 3 validation(s) were run on this bug
Requesting review from QA contact: The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this: Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: jgbernalp The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
📝 WalkthroughWalkthroughThis pull request refactors monitoring URL routing across multiple OpenShift Console components to support perspective-aware navigation. Changes replace query-parameter-based monitoring URLs with path-encoded routes using ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Warning Review ran into problems🔥 ProblemsLinked repositories: Couldn't analyze Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip CodeRabbit can generate a title for your PR based on the changes.Add |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@frontend/packages/console-shared/src/components/dashboard/utilization-card/TopConsumerPopover.tsx`:
- Around line 188-191: The monitoringURL construction in TopConsumerPopover
always interpolates the optional prop namespace, causing
/dev-monitoring/ns/undefined when namespace is missing; change the monitoringURL
logic (used with monitoringParams, canAccessMonitoring, activePerspective) to
only include `/ns/${namespace}/metrics` when namespace is truthy and otherwise
fall back to a safe path such as
`/dev-monitoring/metrics?${monitoringParams.toString()}` (or omit the ns segment
entirely), preserving the admin branch for `/monitoring/query-browser?...`.
In `@frontend/public/components/graphs/prometheus-graph.tsx`:
- Line 13: The import in prometheus-graph.tsx currently references the package
internal path '@console/dynamic-plugin-sdk/src'; update the import to use the
package entrypoint '@console/dynamic-plugin-sdk' instead so useActivePerspective
is imported from the public API (replace the import that references '/src' with
the package root import for useActivePerspective).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
Run ID: 31957c53-4854-4931-ba48-795c5962bedc
📒 Files selected for processing (5)
frontend/packages/console-shared/src/components/dashboard/utilization-card/TopConsumerPopover.tsxfrontend/packages/dev-console/src/components/monitoring/dashboard/MonitoringDashboardGraph.tsxfrontend/packages/dev-console/src/components/monitoring/overview/MonitoringOverview.tsxfrontend/packages/dev-console/src/components/monitoring/overview/MonitoringOverviewAlerts.tsxfrontend/public/components/graphs/prometheus-graph.tsx
📜 Review details
🧰 Additional context used
📓 Path-based instructions (1)
**
⚙️ CodeRabbit configuration file
-Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity.
Files:
frontend/packages/dev-console/src/components/monitoring/overview/MonitoringOverview.tsxfrontend/packages/dev-console/src/components/monitoring/overview/MonitoringOverviewAlerts.tsxfrontend/public/components/graphs/prometheus-graph.tsxfrontend/packages/dev-console/src/components/monitoring/dashboard/MonitoringDashboardGraph.tsxfrontend/packages/console-shared/src/components/dashboard/utilization-card/TopConsumerPopover.tsx
...end/packages/console-shared/src/components/dashboard/utilization-card/TopConsumerPopover.tsx
Show resolved
Hide resolved
c664639 to
cbaeefc
Compare
…enabled Signed-off-by: Gabriel Bernal <gbernal@redhat.com>
cbaeefc to
d6ef276
Compare
|
@jgbernalp: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Summary by CodeRabbit