Skip to content

CAMEL-TUI: Add Consumers tab and health check DOWN indicators#23260

Merged
davsclaus merged 5 commits into
mainfrom
fix/camel-tui-consumers-tab
May 16, 2026
Merged

CAMEL-TUI: Add Consumers tab and health check DOWN indicators#23260
davsclaus merged 5 commits into
mainfrom
fix/camel-tui-consumers-tab

Conversation

@davsclaus
Copy link
Copy Markdown
Contributor

Summary

Claude Code on behalf of Claus Ibsen

This PR adds a new Consumers tab to the Camel JBang TUI monitor and improves health-check visibility across tabs.

New: Consumers tab (tab 4)

A dedicated tab showing all consumers for the selected integration, inserted between Routes and Endpoints:

  • Columns: ID · STATUS · TYPE · INFLIGHT · TOTAL · PERIOD · SINCE-LAST · URI
  • Sorting: press s to cycle through columns (ID, STATUS, TYPE, INFLIGHT, TOTAL, URI); default sort by ID
  • Scheduled consumers show polling period/delay in the PERIOD column
  • SINCE-LAST shows start/complete/fail timestamps as s/c/f
  • Tab label shows consumer count badge: 4 Consumers (N)
  • Tab key bindings shifted: Consumers=4, Endpoints=5, Health=6, History=7, Trace=8; footer updated to "1-8 tabs"

Health check DOWN indicators

Consumers tab: when a consumer's health check (consumer:<routeId>) is DOWN, the STATUS cell turns red and is prefixed with , and the URI column switches from the endpoint URI to the health check failure message — making unhealthy consumers immediately visible without switching to the Health tab.

Health tab label: the tab title now distinguishes healthy from unhealthy states:

  • All UP: 6 Health (N) in yellow (total count)
  • Any DOWN: 6 Health (N DOWN) in red bold — immediate at-a-glance alarm

Other fixes

  • Health tab MESSAGE column was not showing (was only reading details.failure.error.message; fixed to read the top-level message field, same as camel get health)
  • Health tab: removed the heap memory Gauge widget that appeared as noise at the bottom; health check table now occupies the full area
  • Consumers tab: PERIOD column is right-aligned to visually separate it from TOTAL

Test plan

  • Start a Camel integration and open camel tui
  • Press 4 — Consumers tab shows all consumers with correct columns and sort
  • Press s to cycle sort columns
  • Press 6 — Health tab shows MESSAGE column populated for DOWN checks
  • Trigger a consumer health check failure (e.g. stop a Kafka broker) — verify ⚠ Started in red on Consumers tab and (N DOWN) in red on Health tab label

🤖 Generated with Claude Code

davsclaus and others added 5 commits May 16, 2026 14:04
- Insert new TAB_CONSUMERS = 3, shifting Endpoints→5, Health→6,
  History→7, Trace→8 (NUM_TABS 7→8)
- Parse consumers JSON (id, uri, state, class, scheduled, inflight,
  polling, totalCounter, delay/period, statistics timestamps)
- renderConsumers() table: ID, STATUS, TYPE, INFLIGHT, TOTAL, PERIOD,
  SINCE-LAST (started/completed/failed), URI
- STATUS shown in green (Started/Polling) or red; TYPE strips "Consumer"
  suffix and package prefix for readability
- Sort with 's' key cycling ID→STATUS→TYPE→INFLIGHT→TOTAL→URI
- Footer hints updated; all number hints updated to 1-8

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…om health tab

Right-align the PERIOD header and values in the consumers table so TOTAL
and PERIOD read as two distinct columns rather than one merged block.

Remove the memory Gauge widget from the health tab — it was rendered as a
3-row strip at the bottom and showed up as unwanted noise; the health
check table now occupies the full area.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Read the top-level 'message' field from each health check JSON object
(same field the 'camel get health' CLI uses). Fall back to
details['failure.error.message'] if absent.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When a consumer's health check (id: 'consumer:<routeId>') is DOWN,
the STATUS cell turns red and is prefixed with ⚠, and the URI column
shows the health check failure message instead of the endpoint URI.
This makes unhealthy consumers immediately visible without having to
switch to the Health tab.

The lookup matches ConsumerInfo.id against HealthCheckInfo.name with
the 'consumer:' prefix, which is the convention used by
ConsumersHealthCheckRepository.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When one or more health checks are DOWN, the Health tab title changes
from the normal yellow total-count badge to a red '(N DOWN)' indicator,
giving an immediate at-a-glance signal without needing to open the tab.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

🌟 Thank you for your contribution to the Apache Camel project! 🌟
🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run
  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot although they are normally detected and executed by CI.
  • You can label PRs using skip-tests and test-dependents to fine-tune the checks executed by this PR.
  • Build and test logs are available in the summary page. Only Apache Camel committers have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

@github-actions github-actions Bot added the dsl label May 16, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🧪 CI tested the following changed modules:

  • dsl/camel-jbang/camel-jbang-plugin-tui
All tested modules (2 modules)
  • Camel :: JBang :: Plugin :: TUI
  • Camel :: Launcher :: Container

⚙️ View full build and test results

@davsclaus davsclaus merged commit 3a15e04 into main May 16, 2026
6 checks passed
@davsclaus davsclaus deleted the fix/camel-tui-consumers-tab branch May 16, 2026 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant