This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
commit a7dade03c93262a1998e7eb4b2d197d6a88603a6 Author: Claus Ibsen <[email protected]> AuthorDate: Sat Jun 27 08:54:22 2026 +0200 chore: TUI overview - unwrap nested map properties for infra services Co-Authored-By: Claude Opus 4.6 <[email protected]> Signed-off-by: Claus Ibsen <[email protected]> --- .../dsl/jbang/core/commands/tui/OverviewTab.java | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/OverviewTab.java b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/OverviewTab.java index c12b537d0d06..805458e3ad30 100644 --- a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/OverviewTab.java +++ b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/OverviewTab.java @@ -590,10 +590,22 @@ class OverviewTab implements MonitorTab { if (key.startsWith("get") && key.length() > 3) { key = key.substring(3); } - String value = String.valueOf(e.getValue()); - lines.add(Line.from( - Span.styled(key + ": ", dim), - Span.raw(TuiHelper.truncate(value, inner.width() - key.length() - 2)))); + Object val = e.getValue(); + if (val instanceof Map<?, ?> map) { + lines.add(Line.from(Span.styled(key + ":", dim))); + for (Map.Entry<?, ?> me : map.entrySet()) { + String mk = String.valueOf(me.getKey()); + String mv = String.valueOf(me.getValue()); + lines.add(Line.from( + Span.styled(" " + mk + ": ", dim), + Span.raw(TuiHelper.truncate(mv, inner.width() - mk.length() - 4)))); + } + } else { + String value = String.valueOf(val); + lines.add(Line.from( + Span.styled(key + ": ", dim), + Span.raw(TuiHelper.truncate(value, inner.width() - key.length() - 2)))); + } } frame.renderWidget(Paragraph.builder().text(Text.from(lines)).build(), inner); }
