ROX-35326: Combine Prometheus metric cards into tabbed card#21414
ROX-35326: Combine Prometheus metric cards into tabbed card#21414parametalol wants to merge 1 commit into
Conversation
Replace separate cards per metrics category with a single Card using PatternFly Tabs. Each tab header includes a Badge showing the number of enabled metrics. Applies to both view and edit modes. Also fixes "Gathering period" label wrapping by widening the horizontal description list term width. Partially generated by AI. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #21414 +/- ##
==========================================
- Coverage 50.12% 50.08% -0.05%
==========================================
Files 2835 2835
Lines 217546 217546
==========================================
- Hits 109049 108951 -98
- Misses 100615 100693 +78
- Partials 7882 7902 +20
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
📝 WalkthroughWalkthroughPrometheus metrics configuration and details views now render all categories through shared tabbed card and form components. The details page and form page pass the full private config into those components, and the details view drops the extra grid wrapper. ChangesTabbed Prometheus metrics UI
Sequence Diagram(s)sequenceDiagram
participant SystemConfigDetails
participant PrivateConfigPrometheusMetricsDetails
participant PrometheusMetricsTabbedCard
participant PrometheusMetricsTable
participant EmptyState
SystemConfigDetails->>PrivateConfigPrometheusMetricsDetails: pass systemConfig.privateConfig
PrivateConfigPrometheusMetricsDetails->>PrometheusMetricsTabbedCard: render tabs from privateConfig
PrometheusMetricsTabbedCard->>PrometheusMetricsTable: render category metrics table
PrometheusMetricsTabbedCard->>EmptyState: render when a category has no metrics
sequenceDiagram
participant SystemConfigForm
participant PrometheusMetricsTabbedForm
participant PrometheusMetricsPeriodForm
participant PrometheusMetricsTable
SystemConfigForm->>PrometheusMetricsTabbedForm: pass values.privateConfig, onChange, onCustomChange
PrometheusMetricsTabbedForm->>PrometheusMetricsPeriodForm: render per-category period form
PrometheusMetricsTabbedForm->>PrometheusMetricsTable: render per-category metrics table
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@ui/apps/platform/src/Containers/SystemConfig/Details/components/PrometheusMetricsCard.tsx`:
- Around line 409-446: The gathering period is currently tied to hasMetrics in
PrometheusMetricsCard, so a category with no enabled descriptors hides valid
period state. Update the PrometheusMetricsCard render logic to show the
DescriptionList section whenever period is set, even if descriptors is empty,
and only use the EmptyState for the no-metrics message while still rendering the
gathering period for that category.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Central YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: c82d4100-b7c1-4074-90fe-f0a0f8cc388d
📒 Files selected for processing (4)
ui/apps/platform/src/Containers/SystemConfig/Details/PrivateConfigPrometheusMetricsDetails.tsxui/apps/platform/src/Containers/SystemConfig/Details/SystemConfigDetails.tsxui/apps/platform/src/Containers/SystemConfig/Details/components/PrometheusMetricsCard.tsxui/apps/platform/src/Containers/SystemConfig/Form/SystemConfigForm.tsx

Description
The System Configuration page rendered separate cards for each Prometheus metrics category. With more categories being added, this doesn't scale.
Replaced the individual cards with a single Card using PatternFly Tabs — one tab per category. Each tab header shows a Badge with the count of enabled metrics. Applied to both view and edit modes.
Also fixed the "Gathering period" label wrapping by setting
horizontalTermWidthModifierto15ch.Why tabs over cards: reduces vertical scrolling, scales to N categories without layout changes, and the badge provides an at-a-glance summary that the old Enabled/Disabled label did per-card.
User-facing documentation
Testing and quality
Automated testing
How I validated my change
npm run tsc)match enabled metrics, tab switching works, edit mode form inputs work
View mode:

Edit mode:
