openshift / openshift/troubleshooting-panel-console-plugin

Troubleshooting panel for non-admin users

Open
#250 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
5
Forks
14
Avg merge
23h 40m
Merged PRs (30d)
17

Description

Type: Story
Needs: Investigation

Description

Removing the dev perspective introduced changes in console URLs for non-admin users. Review all cases and update the troubleshooting-panel query-to-URL mapping to work correctly for non-admin users.

Current State

The troubleshooting panel currently restricts itself to admin-only access:

  • useTroubleshootingPanel hook: Returns an empty actions array if the current perspective is not admin, preventing the action from appearing in the alert toolbar.
  • Popover component: Auto-closes if the user switches away from the admin perspective.

Console URL generation is handled by domain-specific converters in web/src/korrel8r/. The useNavigateToQuery hook (web/src/hooks/useNavigateToQuery.ts) is the central dispatcher that converts Korrel8r query objects to console URLs using these domain converters.

Acceptance Criteria

  • Troubleshooting panel is accessible to non-admin users (remove or adjust admin-perspective restriction).
  • All domain URL converters generate correct console URLs for non-admin user perspectives.
  • URLs that were previously dev-perspective-specific are updated for the post-dev-perspective console layout.
  • Non-admin users can navigate to correlated resources within their authorized namespaces.
  • Admin user URL generation remains unaffected.

Investigation Tasks

  • Audit each domain converter for perspective-dependent URL patterns:
    • web/src/korrel8r/k8s.ts
    • web/src/korrel8r/alert.ts
    • web/src/korrel8r/log.ts
    • web/src/korrel8r/metric.ts
    • web/src/korrel8r/netflow.ts
    • web/src/korrel8r/trace.ts
  • Identify which URLs changed when the dev perspective was removed.
  • Determine what perspective-aware logic is needed in useNavigateToQuery.
  • Decide whether the panel should be fully available to non-admin or conditionally available based on RBAC.

Dependencies

  • Korrel8r stores for non-admin users (backend must also support non-admin queries).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with web/src/hooks/useNavigateToQuery.ts and the useTroubleshootingPanel and Popover implementations, then audit the converters in web/src/korrel8r/k8s.ts, alert.ts, log.ts, metric.ts, netflow.ts, and trace.ts. Compare their URLs with the post-dev-perspective console layout and verify behavior for authorized non-admin namespaces. Done means the panel and correlated-resource navigation work for non-admin users without changing admin URL generation.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
authorization, frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.