Skip to content

OCPBUGS-77113: remove dev to admin links as dev monitoring views are enabled#16163

Merged
openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
jgbernalp:remove-dev-to-admin-console-monitoring-links
Apr 10, 2026
Merged

OCPBUGS-77113: remove dev to admin links as dev monitoring views are enabled#16163
openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
jgbernalp:remove-dev-to-admin-console-monitoring-links

Conversation

@jgbernalp
Copy link
Copy Markdown
Contributor

@jgbernalp jgbernalp commented Mar 17, 2026

Summary by CodeRabbit

  • Updates
    • Monitoring dashboard URLs now use path-based routing instead of query parameters.
    • Monitoring access is now controlled by feature flags and user permissions.
    • Added perspective-aware navigation behavior for monitoring views and alerts.
    • The application automatically adjusts your perspective when navigating to specific monitoring dashboards.

Related change from the plugin side:

@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Mar 17, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@jgbernalp: This pull request references Jira Issue OCPBUGS-77113, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.22.0) matches configured target version for branch (4.22.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @juzhao

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In 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.

@openshift-ci openshift-ci bot requested review from jhadvig, juzhao and spadgett March 17, 2026 15:07
@openshift-ci openshift-ci bot added component/core Related to console core functionality component/dashboard Related to dashboard component/dev-console Related to dev-console component/shared Related to console-shared labels Mar 17, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 17, 2026

📝 Walkthrough

Walkthrough

This 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 /dev-monitoring/ns/{namespace}. The useActivePerspective hook is integrated to track the active perspective state, while a new canAccessMonitoring flag gates monitoring access by combining feature flag checks with Prometheus availability. Components now conditionally route to either standard monitoring query-browser or dev-monitoring paths based on perspective state and access permissions. OnClick handlers switch perspective to 'dev' when navigating to dev-monitoring URLs from other perspectives. The PrometheusGraphLinkProps interface is updated to expose the canAccessMonitoring boolean.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

Warning

Review ran into problems

🔥 Problems

Linked repositories: Couldn't analyze openshift/console - clone failed: Clone operation failed: Stream setup permanently failed: 13 INTERNAL: Received RST_STREAM with code 2 (Internal server error)


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

CodeRabbit can generate a title for your PR based on the changes.

Add @coderabbitai placeholder anywhere in the title of your PR and CodeRabbit will replace it with a title based on the changes in the PR. You can change the placeholder by changing the reviews.auto_title_placeholder setting.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 458a8b6 and d166ad1.

📒 Files selected for processing (5)
  • frontend/packages/console-shared/src/components/dashboard/utilization-card/TopConsumerPopover.tsx
  • frontend/packages/dev-console/src/components/monitoring/dashboard/MonitoringDashboardGraph.tsx
  • frontend/packages/dev-console/src/components/monitoring/overview/MonitoringOverview.tsx
  • frontend/packages/dev-console/src/components/monitoring/overview/MonitoringOverviewAlerts.tsx
  • frontend/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.tsx
  • frontend/packages/dev-console/src/components/monitoring/overview/MonitoringOverviewAlerts.tsx
  • frontend/public/components/graphs/prometheus-graph.tsx
  • frontend/packages/dev-console/src/components/monitoring/dashboard/MonitoringDashboardGraph.tsx
  • frontend/packages/console-shared/src/components/dashboard/utilization-card/TopConsumerPopover.tsx

Comment thread frontend/public/components/graphs/prometheus-graph.tsx Outdated
@jgbernalp jgbernalp force-pushed the remove-dev-to-admin-console-monitoring-links branch 3 times, most recently from cbaeefc to d6ef276 Compare March 17, 2026 17:21
@jgbernalp
Copy link
Copy Markdown
Contributor Author

/test e2e-gcp-console

@jgbernalp
Copy link
Copy Markdown
Contributor Author

/test e2e-gcp-console

@jgbernalp
Copy link
Copy Markdown
Contributor Author

/test e2e-gcp-console

3 similar comments
@etmurasaki
Copy link
Copy Markdown

/test e2e-gcp-console

@juzhao
Copy link
Copy Markdown

juzhao commented Mar 20, 2026

/test e2e-gcp-console

@jgbernalp
Copy link
Copy Markdown
Contributor Author

/test e2e-gcp-console

@PeterYurkovich
Copy link
Copy Markdown
Contributor

/retest

@PeterYurkovich
Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 23, 2026
variant={getAlertType(severity)}
isInline
title={<Link to={alertDetailsPageLink}>{name}</Link>}
onClick={() => {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think the onClick handler should be on the Link element, otherwise any click anywhere on the alert body (including the message text) will trigger the action

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@jhadvig fixed!

…enabled

Signed-off-by: Gabriel Bernal <gbernal@redhat.com>
@jgbernalp jgbernalp force-pushed the remove-dev-to-admin-console-monitoring-links branch from f0d99cc to f2b02e8 Compare April 7, 2026 12:36
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Apr 7, 2026
@jgbernalp
Copy link
Copy Markdown
Contributor Author

/test e2e-gcp-console

1 similar comment
@jgbernalp
Copy link
Copy Markdown
Contributor Author

/test e2e-gcp-console

Copy link
Copy Markdown
Member

@jhadvig jhadvig left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Apr 8, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 8, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jgbernalp, jhadvig, PeterYurkovich

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 8, 2026
@jgbernalp
Copy link
Copy Markdown
Contributor Author

/label docs-approved
The documentation feature for the dev console monitoring needs to be updated as a whole. I'll check this with @opayne1

@openshift-ci openshift-ci bot added the docs-approved Signifies that Docs has signed off on this PR label Apr 9, 2026
@jgbernalp
Copy link
Copy Markdown
Contributor Author

/label px-approved
No product changes as it only affects where links redirect to.

@openshift-ci openshift-ci bot added the px-approved Signifies that Product Support has signed off on this PR label Apr 9, 2026
@etmurasaki
Copy link
Copy Markdown

/verified by @etmurasaki

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Apr 10, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@etmurasaki: This PR has been marked as verified by @etmurasaki.

Details

In response to this:

/verified by @etmurasaki

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.

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD 8390b37 and 2 for PR HEAD f2b02e8 in total

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 10, 2026

@jgbernalp: all tests passed!

Full PR test history. Your PR dashboard.

Details

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 kubernetes-sigs/prow repository. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot bot merged commit fb24786 into openshift:main Apr 10, 2026
8 checks passed
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@jgbernalp: Jira Issue OCPBUGS-77113: Some pull requests linked via external trackers have merged:

The following pull request, linked via external tracker, has not merged:

All associated pull requests must be merged or unlinked from the Jira bug in order for it to move to the next state. Once unlinked, request a bug refresh with /jira refresh.

Jira Issue OCPBUGS-77113 has not been moved to the MODIFIED state.

This PR is marked as verified. If the remaining PRs listed above are marked as verified before merging, the issue will automatically be moved to VERIFIED after all of the changes from the PRs are available in an accepted nightly payload.

Details

In response to this:

Summary by CodeRabbit

  • Updates
  • Monitoring dashboard URLs now use path-based routing instead of query parameters.
  • Monitoring access is now controlled by feature flags and user permissions.
  • Added perspective-aware navigation behavior for monitoring views and alerts.
  • The application automatically adjusts your perspective when navigating to specific monitoring dashboards.

Related change from the plugin side:

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.

@jgbernalp
Copy link
Copy Markdown
Contributor Author

/jira refresh

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@jgbernalp: Jira Issue OCPBUGS-77113 is in an unrecognized state (ON_QA) and will not be moved to the MODIFIED state.

Details

In response to this:

/jira refresh

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.

@jgbernalp
Copy link
Copy Markdown
Contributor Author

/jira refresh

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@jgbernalp: Jira Issue OCPBUGS-77113: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-77113 has been moved to the MODIFIED state.

Details

In response to this:

/jira refresh

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. component/core Related to console core functionality component/dashboard Related to dashboard component/dev-console Related to dev-console component/shared Related to console-shared docs-approved Signifies that Docs has signed off on this PR jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. px-approved Signifies that Product Support has signed off on this PR verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants