You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2026/10/01 13:36:51 UTC
(camel) branch main updated: chore: camel-jbang - the Log tab title names the integration, as the pinned log panel does (#27209)
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
The following commit(s) were added to refs/heads/main by this push:
new e1c1385195db chore: camel-jbang - the Log tab title names the integration, as the pinned log panel does (#27209)
e1c1385195db is described below
commit e1c1385195dbd7ce4d23a6f7ea48994df1a6abff
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Oct 1 15:36:45 2026 +0200
chore: camel-jbang - the Log tab title names the integration, as the pinned log panel does (#27209)
Co-Authored-By: Claude Opus 5.5 (1M context) <no...@anthropic.com>
---
.../java/org/apache/camel/dsl/jbang/core/commands/tui/LogTab.java | 8 +++++---
.../camel/dsl/jbang/core/commands/tui/LogTabRenderTest.java | 8 ++++++++
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/LogTab.java b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/LogTab.java
index e73134ca7304..838ed865fbee 100644
--- a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/LogTab.java
+++ b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/LogTab.java
@@ -296,12 +296,14 @@ class LogTab extends AbstractTab {
titleSpans.add(Span.raw(" ["));
titleSpans.add(Span.styled(infraSel.alias, Theme.label().bold()));
titleSpans.add(Span.raw("] Log "));
- } else if (ctx.logPinVisible && ctx.selectedPid != null) {
+ } else if (ctx.selectedPid != null) {
+ // the integration is named, as in the pinned log panel, so it is clear whose log this is
titleSpans.add(Span.raw(" ["));
titleSpans.add(Span.styled(ctx.selectedName(), Theme.label().bold()));
titleSpans.add(Span.raw("] Log "));
- } else if (info != null && info.rootLogLevel != null) {
- titleSpans.add(Span.raw(" Log level:" + info.rootLogLevel + " "));
+ if (!ctx.logPinVisible && info != null && info.rootLogLevel != null) {
+ titleSpans.add(Span.raw("level:" + info.rootLogLevel + " "));
+ }
} else {
titleSpans.add(Span.raw(" Log "));
}
diff --git a/dsl/camel-jbang/camel-jbang-plugin-tui/src/test/java/org/apache/camel/dsl/jbang/core/commands/tui/LogTabRenderTest.java b/dsl/camel-jbang/camel-jbang-plugin-tui/src/test/java/org/apache/camel/dsl/jbang/core/commands/tui/LogTabRenderTest.java
index e7b9ae0bece0..8d3b479a5bfb 100644
--- a/dsl/camel-jbang/camel-jbang-plugin-tui/src/test/java/org/apache/camel/dsl/jbang/core/commands/tui/LogTabRenderTest.java
+++ b/dsl/camel-jbang/camel-jbang-plugin-tui/src/test/java/org/apache/camel/dsl/jbang/core/commands/tui/LogTabRenderTest.java
@@ -83,6 +83,14 @@ class LogTabRenderTest {
assertTrue(rendered.contains("Log"), "Should show Log in the block title");
}
+ @Test
+ void theTitleNamesTheIntegrationAndItsLogLevel() {
+ info.rootLogLevel = "INFO";
+ LogTab tab = new LogTab(ctx);
+ String rendered = TuiTestHelper.renderToString(tab, 120, 20);
+ assertTrue(rendered.contains("[test-app] Log level:INFO"), rendered);
+ }
+
@Test
void renderShowsLoadingOrEmpty() {
LogTab tab = new LogTab(ctx);