This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch fix/CAMEL-23934 in repository https://gitbox.apache.org/repos/asf/camel.git
commit 2d191fdcce39f5b27f03fb76411b06c319974fc0 Author: Claus Ibsen <[email protected]> AuthorDate: Wed Jul 8 14:19:01 2026 +0200 CAMEL-23934: Standardize key-value label styling to Theme.muted() across all tabs Co-Authored-By: Claude Opus 4.6 <[email protected]> Signed-off-by: Claus Ibsen <[email protected]> --- .../camel/dsl/jbang/core/commands/tui/AiPanel.java | 2 +- .../dsl/jbang/core/commands/tui/BeansTab.java | 4 +- .../dsl/jbang/core/commands/tui/BrowseTab.java | 10 ++-- .../jbang/core/commands/tui/CircuitBreakerTab.java | 2 +- .../dsl/jbang/core/commands/tui/DiagramTab.java | 62 +++++++++++----------- .../dsl/jbang/core/commands/tui/DoctorPopup.java | 36 ++++++------- .../dsl/jbang/core/commands/tui/ErrorsTab.java | 22 ++++---- .../jbang/core/commands/tui/HeapHistogramTab.java | 22 ++++---- .../dsl/jbang/core/commands/tui/HistoryTab.java | 50 ++++++++--------- .../camel/dsl/jbang/core/commands/tui/HttpTab.java | 4 +- .../jbang/core/commands/tui/InfraBrowserPopup.java | 4 +- .../dsl/jbang/core/commands/tui/MemoryLeakTab.java | 40 +++++++------- .../dsl/jbang/core/commands/tui/MemoryTab.java | 38 ++++++------- .../dsl/jbang/core/commands/tui/MetricsTab.java | 2 +- .../dsl/jbang/core/commands/tui/OverviewTab.java | 4 +- .../dsl/jbang/core/commands/tui/ProcessTab.java | 4 +- .../dsl/jbang/core/commands/tui/RoutesTab.java | 40 +++++++------- .../dsl/jbang/core/commands/tui/SpansTab.java | 18 +++---- .../dsl/jbang/core/commands/tui/SqlTraceTab.java | 4 +- .../dsl/jbang/core/commands/tui/StartupTab.java | 2 +- 20 files changed, 185 insertions(+), 185 deletions(-) diff --git a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/AiPanel.java b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/AiPanel.java index 132451ad25b2..ca82ea8274a5 100644 --- a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/AiPanel.java +++ b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/AiPanel.java @@ -732,7 +732,7 @@ class AiPanel { // --- Summary --- Rect summaryArea = sections.get(0); - Style dimStyle = Style.EMPTY.dim(); + Style dimStyle = Theme.muted(); Style cyanStyle = Style.EMPTY.fg(Theme.accent()); List<Line> summaryLines = new ArrayList<>(); summaryLines.add(Line.from( diff --git a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/BeansTab.java b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/BeansTab.java index c50bdf569248..39248fcdfd19 100644 --- a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/BeansTab.java +++ b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/BeansTab.java @@ -252,14 +252,14 @@ class BeansTab extends AbstractTableTab { // full type if (bean.type != null && !bean.type.isEmpty()) { lines.add(Line.from( - Span.styled(" Type: ", Style.EMPTY.dim()), + Span.styled(" Type: ", Theme.muted()), Span.styled(bean.type, Style.EMPTY.fg(Theme.baseFg())))); } // properties if (bean.properties != null && !bean.properties.isEmpty()) { lines.add(Line.from(Span.raw(""))); - lines.add(Line.from(Span.styled(" Properties:", Style.EMPTY.dim()))); + lines.add(Line.from(Span.styled(" Properties:", Theme.muted()))); int maxNameLen = 0; for (BeanData.Property prop : bean.properties) { diff --git a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/BrowseTab.java b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/BrowseTab.java index e6f43061767d..cd1d621c246c 100644 --- a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/BrowseTab.java +++ b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/BrowseTab.java @@ -406,21 +406,21 @@ class BrowseTab extends AbstractTab { List<Line> lines = new ArrayList<>(); lines.add(Line.from( - Span.styled(" Exchange ID: ", Theme.label().bold()), + Span.styled(" Exchange ID: ", Theme.muted()), Span.styled(msg.exchangeId != null ? msg.exchangeId : "", Style.EMPTY.fg(Theme.baseFg())))); if (msg.exchangePattern != null) { lines.add(Line.from( - Span.styled(" Pattern: ", Theme.label().bold()), + Span.styled(" Pattern: ", Theme.muted()), Span.styled(msg.exchangePattern, Style.EMPTY.fg(Theme.baseFg())))); } lines.add(Line.from(Span.raw(""))); // Headers if (msg.headers != null && !msg.headers.isEmpty()) { - lines.add(Line.from(Span.styled(" Headers:", Theme.label().bold()))); + lines.add(Line.from(Span.styled(" Headers:", Theme.muted()))); for (Map.Entry<String, String> entry : msg.headers.entrySet()) { lines.add(Line.from( - Span.styled(" " + entry.getKey(), Style.EMPTY.fg(Theme.accent())), + Span.styled(" " + entry.getKey(), Theme.muted()), Span.styled(" = ", Style.EMPTY.dim()), Span.styled(entry.getValue(), Style.EMPTY.fg(Theme.baseFg())))); } @@ -428,7 +428,7 @@ class BrowseTab extends AbstractTab { } // Body - lines.add(Line.from(Span.styled(" Body:", Theme.label().bold()))); + lines.add(Line.from(Span.styled(" Body:", Theme.muted()))); if (msg.body != null && !msg.body.isEmpty()) { String bodyText = msg.body; if (prettyPrint) { diff --git a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/CircuitBreakerTab.java b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/CircuitBreakerTab.java index 7206216cea0b..14380ce8f00a 100644 --- a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/CircuitBreakerTab.java +++ b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/CircuitBreakerTab.java @@ -339,7 +339,7 @@ class CircuitBreakerTab extends AbstractTableTab { .title(Title.from(chartTitle)).build()) .build(), vSplit.get(1)); - Style dim = Style.EMPTY.dim(); + Style dim = Theme.muted(); Line metricsLine1 = Line.from( Span.raw(" "), Span.styled("total:", dim), Span.raw(cb.total + " "), diff --git a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/DiagramTab.java b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/DiagramTab.java index 347b4be52769..71618179c167 100644 --- a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/DiagramTab.java +++ b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/DiagramTab.java @@ -426,69 +426,69 @@ class DiagramTab extends AbstractTab { List<Line> lines = new ArrayList<>(); if (route != null) { lines.add(Line.from( - Span.styled(" Route: ", Theme.label().bold()), + Span.styled(" Route: ", Theme.muted()), Span.styled(route.routeId, Style.EMPTY.fg(Theme.baseFg()).bold()))); lines.add(Line.from( - Span.styled(" From: ", Style.EMPTY.dim()), + Span.styled(" From: ", Theme.muted()), Span.raw(route.from != null ? route.from : ""))); String stateLabel = route.state != null ? route.state : ""; Style stateStyle = "Started".equals(route.state) ? Theme.success() : Theme.error(); lines.add(Line.from( - Span.styled(" State: ", Style.EMPTY.dim()), + Span.styled(" State: ", Theme.muted()), Span.styled(stateLabel, stateStyle))); lines.add(Line.from(Span.raw(""))); lines.add(Line.from( - Span.styled(" Uptime: ", Style.EMPTY.dim()), + Span.styled(" Uptime: ", Theme.muted()), Span.raw(route.uptime != null ? route.uptime : ""))); lines.add(Line.from( - Span.styled(" Throughput: ", Style.EMPTY.dim()), + Span.styled(" Throughput: ", Theme.muted()), Span.raw(route.throughput != null ? route.throughput : ""))); if (route.coverage != null) { lines.add(Line.from( - Span.styled(" Coverage: ", Style.EMPTY.dim()), + Span.styled(" Coverage: ", Theme.muted()), Span.raw(route.coverage))); } lines.add(Line.from(Span.raw(""))); int w = numWidth(route.total, route.failed, route.inflight); lines.add(Line.from( - Span.styled(" Total: ", Style.EMPTY.dim()), + Span.styled(" Total: ", Theme.muted()), Span.raw(String.format("%" + w + "d", route.total)))); Style failStyle = route.failed > 0 ? Theme.error().bold() : Style.EMPTY; lines.add(Line.from( - Span.styled(" Failed: ", Style.EMPTY.dim()), + Span.styled(" Failed: ", Theme.muted()), Span.styled(String.format("%" + w + "d", route.failed), failStyle))); lines.add(Line.from( - Span.styled(" Inflight: ", Style.EMPTY.dim()), + Span.styled(" Inflight: ", Theme.muted()), Span.raw(String.format("%" + w + "d", route.inflight)))); lines.add(Line.from(Span.raw(""))); if (route.total > 0) { int tw = numWidth(route.meanTime, route.maxTime, route.minTime); lines.add(Line.from( - Span.styled(" Mean: ", Style.EMPTY.dim()), + Span.styled(" Mean: ", Theme.muted()), Span.raw(String.format("%" + tw + "d ms", route.meanTime)))); lines.add(Line.from( - Span.styled(" Max: ", Style.EMPTY.dim()), + Span.styled(" Max: ", Theme.muted()), Span.raw(String.format("%" + tw + "d ms", route.maxTime)))); lines.add(Line.from( - Span.styled(" Min: ", Style.EMPTY.dim()), + Span.styled(" Min: ", Theme.muted()), Span.raw(String.format("%" + tw + "d ms", route.minTime)))); } if (route.sinceLastCompleted != null || route.sinceLastFailed != null) { lines.add(Line.from(Span.raw(""))); lines.add(Line.from( - Span.styled(" Since last:", Style.EMPTY.dim()))); + Span.styled(" Since last:", Theme.muted()))); if (route.sinceLastCompleted != null) { lines.add(Line.from( - Span.styled(" success: ", Style.EMPTY.dim()), + Span.styled(" success: ", Theme.muted()), Span.raw(route.sinceLastCompleted))); } if (route.sinceLastFailed != null) { lines.add(Line.from( - Span.styled(" fail: ", Style.EMPTY.dim()), + Span.styled(" fail: ", Theme.muted()), Span.styled(route.sinceLastFailed, Theme.error()))); } @@ -505,11 +505,11 @@ class DiagramTab extends AbstractTab { Span.styled(label, Style.EMPTY.fg(Theme.accent()).bold()))); lines.add(Line.from(Span.raw(""))); lines.add(Line.from( - Span.styled(" URI: ", Style.EMPTY.dim()), + Span.styled(" URI: ", Theme.muted()), Span.raw(topoNode.from != null ? topoNode.from : ""))); if (topoNode.description != null && !topoNode.description.isBlank()) { lines.add(Line.from( - Span.styled(" Path: ", Style.EMPTY.dim()), + Span.styled(" Path: ", Theme.muted()), Span.raw(topoNode.description))); } if (!isBridge) { @@ -517,18 +517,18 @@ class DiagramTab extends AbstractTab { if (connectedRoute != null) { lines.add(Line.from(Span.raw(""))); lines.add(Line.from( - Span.styled(isInbound ? " To route: " : " From route: ", Style.EMPTY.dim()), + Span.styled(isInbound ? " To route: " : " From route: ", Theme.muted()), Span.styled(connectedRoute, Style.EMPTY.fg(Theme.baseFg())))); } } if (topoNode.exchangesTotal > 0 || topoNode.exchangesFailed > 0) { lines.add(Line.from(Span.raw(""))); lines.add(Line.from( - Span.styled(" Total: ", Style.EMPTY.dim()), + Span.styled(" Total: ", Theme.muted()), Span.raw(String.valueOf(topoNode.exchangesTotal)))); if (topoNode.exchangesFailed > 0) { lines.add(Line.from( - Span.styled(" Failed: ", Style.EMPTY.dim()), + Span.styled(" Failed: ", Theme.muted()), Span.styled(String.valueOf(topoNode.exchangesFailed), Theme.error().bold()))); } @@ -569,7 +569,7 @@ class DiagramTab extends AbstractTab { if (ln.id != null) { lines.add(Line.from( - Span.styled(" ID: ", Style.EMPTY.dim()), + Span.styled(" ID: ", Theme.muted()), Span.raw(ln.id))); } @@ -592,15 +592,15 @@ class DiagramTab extends AbstractTab { lines.add(Line.from(Span.raw(""))); int w = numWidth(stat.exchangesTotal, stat.exchangesFailed, stat.exchangesInflight); lines.add(Line.from( - Span.styled(" Total: ", Style.EMPTY.dim()), + Span.styled(" Total: ", Theme.muted()), Span.raw(String.format("%" + w + "d", stat.exchangesTotal)))); Style failStyle = stat.exchangesFailed > 0 ? Theme.error().bold() : Style.EMPTY; lines.add(Line.from( - Span.styled(" Failed: ", Style.EMPTY.dim()), + Span.styled(" Failed: ", Theme.muted()), Span.styled(String.format("%" + w + "d", stat.exchangesFailed), failStyle))); lines.add(Line.from( - Span.styled(" Inflight: ", Style.EMPTY.dim()), + Span.styled(" Inflight: ", Theme.muted()), Span.raw(String.format("%" + w + "d", stat.exchangesInflight)))); if (stat.exchangesTotal > 0) { @@ -608,33 +608,33 @@ class DiagramTab extends AbstractTab { int tw = numWidth(stat.meanProcessingTime, stat.maxProcessingTime, stat.minProcessingTime, stat.lastProcessingTime); lines.add(Line.from( - Span.styled(" Mean: ", Style.EMPTY.dim()), + Span.styled(" Mean: ", Theme.muted()), Span.raw(String.format("%" + tw + "d ms", stat.meanProcessingTime)))); lines.add(Line.from( - Span.styled(" Max: ", Style.EMPTY.dim()), + Span.styled(" Max: ", Theme.muted()), Span.raw(String.format("%" + tw + "d ms", stat.maxProcessingTime)))); lines.add(Line.from( - Span.styled(" Min: ", Style.EMPTY.dim()), + Span.styled(" Min: ", Theme.muted()), Span.raw(String.format("%" + tw + "d ms", stat.minProcessingTime)))); lines.add(Line.from( - Span.styled(" Last: ", Style.EMPTY.dim()), + Span.styled(" Last: ", Theme.muted()), Span.raw(String.format("%" + tw + "d ms", stat.lastProcessingTime)))); if (stat.lastCompletedExchangeTimestamp > 0 || stat.lastFailedExchangeTimestamp > 0) { long now = System.currentTimeMillis(); lines.add(Line.from(Span.raw(""))); lines.add(Line.from( - Span.styled(" Since last:", Style.EMPTY.dim()))); + Span.styled(" Since last:", Theme.muted()))); if (stat.lastCompletedExchangeTimestamp > 0) { long ago = now - stat.lastCompletedExchangeTimestamp; lines.add(Line.from( - Span.styled(" success: ", Style.EMPTY.dim()), + Span.styled(" success: ", Theme.muted()), Span.raw(TimeUtils.printDuration(ago, false)))); } if (stat.lastFailedExchangeTimestamp > 0) { long ago = now - stat.lastFailedExchangeTimestamp; lines.add(Line.from( - Span.styled(" fail: ", Style.EMPTY.dim()), + Span.styled(" fail: ", Theme.muted()), Span.styled(TimeUtils.printDuration(ago, false), Theme.error()))); } diff --git a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/DoctorPopup.java b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/DoctorPopup.java index ac1e25d774c2..90d6fe509171 100644 --- a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/DoctorPopup.java +++ b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/DoctorPopup.java @@ -135,7 +135,7 @@ class DoctorPopup { } result.add(Line.from( Span.raw(TuiIcons.indent(TuiIcons.JAVA)), - Span.styled(String.format("%-14s", "Java"), Style.EMPTY.bold()), + Span.styled(String.format("%-14s", "Java"), Theme.muted()), Span.raw(String.format("%-30s", version + " (" + vendor + ")")), Span.raw(" " + emoji))); if (status != null) { @@ -149,13 +149,13 @@ class DoctorPopup { String version = catalog.getCatalogVersion(); result.add(Line.from( Span.raw(TuiIcons.indent(TuiIcons.CAMEL)), - Span.styled(String.format("%-14s", "Camel"), Style.EMPTY.bold()), + Span.styled(String.format("%-14s", "Camel"), Theme.muted()), Span.raw(String.format("%-30s", version)), Span.raw(" " + TuiIcons.OK))); } catch (Exception e) { result.add(Line.from( Span.raw(TuiIcons.indent(TuiIcons.CAMEL)), - Span.styled(String.format("%-14s", "Camel"), Style.EMPTY.bold()), + Span.styled(String.format("%-14s", "Camel"), Theme.muted()), Span.raw(String.format("%-30s", "Not detected")), Span.raw(" " + TuiIcons.FAIL))); } @@ -166,13 +166,13 @@ class DoctorPopup { if (version != null) { result.add(Line.from( Span.raw(TuiIcons.indent(TuiIcons.BUNDLED)), - Span.styled(String.format("%-14s", "JBang"), Style.EMPTY.bold()), + Span.styled(String.format("%-14s", "JBang"), Theme.muted()), Span.raw(String.format("%-30s", version)), Span.raw(" " + TuiIcons.OK))); } else { result.add(Line.from( Span.raw(TuiIcons.indent(TuiIcons.BUNDLED)), - Span.styled(String.format("%-14s", "JBang"), Style.EMPTY.bold()), + Span.styled(String.format("%-14s", "JBang"), Theme.muted()), Span.raw(String.format("%-30s", "Not detected")), Span.raw(" " + TuiIcons.WARN))); } @@ -188,13 +188,13 @@ class DoctorPopup { Set.of(), false, false); result.add(Line.from( Span.raw(TuiIcons.indent(TuiIcons.INFRA)), - Span.styled(String.format("%-14s", "Maven"), Style.EMPTY.bold()), + Span.styled(String.format("%-14s", "Maven"), Theme.muted()), Span.raw(String.format("%-30s", "Artifact resolution")), Span.raw(" " + TuiIcons.OK))); } catch (MavenResolutionException e) { result.add(Line.from( Span.raw(TuiIcons.indent(TuiIcons.INFRA)), - Span.styled(String.format("%-14s", "Maven"), Style.EMPTY.bold()), + Span.styled(String.format("%-14s", "Maven"), Theme.muted()), Span.raw(String.format("%-30s", "Resolution failed")), Span.raw(" " + TuiIcons.FAIL))); result.add(Line.from(Span.styled(" " + TuiHelper.truncate(e.getMessage(), 40), @@ -202,7 +202,7 @@ class DoctorPopup { } catch (Exception e) { result.add(Line.from( Span.raw(TuiIcons.indent(TuiIcons.INFRA)), - Span.styled(String.format("%-14s", "Maven"), Style.EMPTY.bold()), + Span.styled(String.format("%-14s", "Maven"), Theme.muted()), Span.raw(String.format("%-30s", "Error")), Span.raw(" " + TuiIcons.FAIL))); result.add(Line.from(Span.styled(" " + TuiHelper.truncate(e.getMessage(), 40), @@ -222,7 +222,7 @@ class DoctorPopup { String name = Character.toUpperCase(cmd.charAt(0)) + cmd.substring(1); result.add(Line.from( Span.raw(TuiIcons.indent(TuiIcons.DOCKER)), - Span.styled(String.format("%-14s", "Container"), Style.EMPTY.bold()), + Span.styled(String.format("%-14s", "Container"), Theme.muted()), Span.raw(String.format("%-30s", name + " running")), Span.raw(" " + TuiIcons.OK))); return; @@ -233,7 +233,7 @@ class DoctorPopup { } result.add(Line.from( Span.raw(TuiIcons.indent(TuiIcons.DOCKER)), - Span.styled(String.format("%-14s", "Container"), Style.EMPTY.bold()), + Span.styled(String.format("%-14s", "Container"), Theme.muted()), Span.raw(String.format("%-30s", "Not found (optional)")), Span.raw(" " + TuiIcons.WARN))); } @@ -251,13 +251,13 @@ class DoctorPopup { if (!conflicts.isEmpty()) { result.add(Line.from( Span.raw(TuiIcons.indent(TuiIcons.ENDPOINT)), - Span.styled(String.format("%-14s", "Ports"), Style.EMPTY.bold()), + Span.styled(String.format("%-14s", "Ports"), Theme.muted()), Span.raw(String.format("%-30s", "In use: " + conflicts)), Span.raw(" " + TuiIcons.WARN))); } else { result.add(Line.from( Span.raw(TuiIcons.indent(TuiIcons.ENDPOINT)), - Span.styled(String.format("%-14s", "Ports"), Style.EMPTY.bold()), + Span.styled(String.format("%-14s", "Ports"), Theme.muted()), Span.raw(String.format("%-30s", "8080, 8443, 9090 free")), Span.raw(" " + TuiIcons.OK))); } @@ -291,13 +291,13 @@ class DoctorPopup { if (provider != null) { result.add(Line.from( Span.raw(TuiIcons.indent(TuiIcons.MCP)), - Span.styled(String.format("%-14s", "AI"), Style.EMPTY.bold()), + Span.styled(String.format("%-14s", "AI"), Theme.muted()), Span.raw(String.format("%-30s", provider)), Span.raw(" " + TuiIcons.OK))); } else { result.add(Line.from( Span.raw(TuiIcons.indent(TuiIcons.MCP)), - Span.styled(String.format("%-14s", "AI"), Style.EMPTY.bold()), + Span.styled(String.format("%-14s", "AI"), Theme.muted()), Span.raw(String.format("%-30s", "No API key configured")), Span.raw(" " + TuiIcons.WARN))); result.add(Line.from(Span.styled(" Set ANTHROPIC_API_KEY or OPENAI_API_KEY", @@ -311,13 +311,13 @@ class DoctorPopup { if (client != null) { result.add(Line.from( Span.raw(TuiIcons.indent(TuiIcons.MCP)), - Span.styled(String.format("%-14s", "MCP"), Style.EMPTY.bold()), + Span.styled(String.format("%-14s", "MCP"), Theme.muted()), Span.raw(String.format("%-30s", client + " (port " + mcpPort + ")")), Span.raw(" " + TuiIcons.OK))); } else { result.add(Line.from( Span.raw(TuiIcons.indent(TuiIcons.MCP)), - Span.styled(String.format("%-14s", "MCP"), Style.EMPTY.bold()), + Span.styled(String.format("%-14s", "MCP"), Theme.muted()), Span.raw(String.format("%-30s", "Listening on port " + mcpPort)), Span.raw(" " + TuiIcons.WARN))); result.add(Line.from(Span.styled(" No AI client connected", @@ -326,7 +326,7 @@ class DoctorPopup { } else { result.add(Line.from( Span.raw(TuiIcons.indent(TuiIcons.MCP)), - Span.styled(String.format("%-14s", "MCP"), Style.EMPTY.bold()), + Span.styled(String.format("%-14s", "MCP"), Theme.muted()), Span.raw(String.format("%-30s", "Not enabled")), Span.raw(" " + TuiIcons.WARN))); result.add(Line.from(Span.styled(" Use --mcp to enable MCP server", @@ -344,7 +344,7 @@ class DoctorPopup { long value = gb > 0 ? gb : mb; result.add(Line.from( Span.raw(TuiIcons.indent(TuiIcons.MEMORY)), - Span.styled(String.format("%-14s", "Disk Space"), Style.EMPTY.bold()), + Span.styled(String.format("%-14s", "Disk Space"), Theme.muted()), Span.raw(String.format("%-30s", value + " " + unit + " free in temp dir")), Span.raw(" " + emoji))); if (mb <= 500) { diff --git a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/ErrorsTab.java b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/ErrorsTab.java index 9e3a9a50f5d9..f18fe1e90f6e 100644 --- a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/ErrorsTab.java +++ b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/ErrorsTab.java @@ -605,27 +605,27 @@ class ErrorsTab extends AbstractTableTab { } lines.add(Line.from( - Span.styled(" Exchange: ", Theme.label().bold()), + Span.styled(" Exchange: ", Theme.muted()), Span.raw(ei.exchangeId != null ? ei.exchangeId : ""))); lines.add(Line.from( - Span.styled(" Route: ", Theme.label().bold()), + Span.styled(" Route: ", Theme.muted()), Span.styled(ei.routeId != null ? ei.routeId : "", Style.EMPTY.fg(Theme.accent())))); lines.add(Line.from( - Span.styled(" Node: ", Theme.label().bold()), + Span.styled(" Node: ", Theme.muted()), Span.raw(ei.nodeId != null ? ei.nodeId : ""))); if (ei.elapsed >= 0) { lines.add(Line.from( - Span.styled(" Elapsed: ", Theme.label().bold()), + Span.styled(" Elapsed: ", Theme.muted()), Span.raw(ei.elapsed + "ms"))); } if (ei.threadName != null) { lines.add(Line.from( - Span.styled(" Thread: ", Theme.label().bold()), + Span.styled(" Thread: ", Theme.muted()), Span.raw(ei.threadName))); } Style handledStyle = ei.handled ? Theme.success() : Theme.error().bold(); lines.add(Line.from( - Span.styled(" Handled: ", Theme.label().bold()), + Span.styled(" Handled: ", Theme.muted()), Span.styled(ei.handled ? "true" : "false", handledStyle))); if (ei.exceptionType != null) { @@ -640,7 +640,7 @@ class ErrorsTab extends AbstractTableTab { if (showBody && ei.body != null) { lines.add(Line.from(Span.raw(""))); lines.add(Line.from( - Span.styled(" Body", Theme.success().bold()), + Span.styled(" Body", Theme.muted()), ei.bodyType != null ? Span.styled(" (" + ei.bodyType + ")", Style.EMPTY.dim()) : Span.raw(""))); for (String line : ei.body.split("\n")) { lines.add(Line.from(Span.raw(" " + line))); @@ -649,19 +649,19 @@ class ErrorsTab extends AbstractTableTab { if (showHeaders && !ei.headers.isEmpty()) { lines.add(Line.from(Span.raw(""))); - lines.add(Line.from(Span.styled(" Headers", Theme.success().bold()))); + lines.add(Line.from(Span.styled(" Headers", Theme.muted()))); addKvLines(lines, ei.headers); } if (showProperties && !ei.properties.isEmpty()) { lines.add(Line.from(Span.raw(""))); - lines.add(Line.from(Span.styled(" Properties", Theme.success().bold()))); + lines.add(Line.from(Span.styled(" Properties", Theme.muted()))); addKvLines(lines, ei.properties); } if (showVariables && !ei.variables.isEmpty()) { lines.add(Line.from(Span.raw(""))); - lines.add(Line.from(Span.styled(" Variables", Theme.success().bold()))); + lines.add(Line.from(Span.styled(" Variables", Theme.muted()))); addKvLines(lines, ei.variables); } @@ -678,7 +678,7 @@ class ErrorsTab extends AbstractTableTab { for (var entry : map.entrySet()) { String val = entry.getValue() != null ? entry.getValue().toString() : "null"; lines.add(Line.from( - Span.styled(" " + entry.getKey(), Style.EMPTY.fg(Theme.accent())), + Span.styled(" " + entry.getKey(), Theme.muted()), Span.raw(" = " + val))); } } diff --git a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/HeapHistogramTab.java b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/HeapHistogramTab.java index 1ac486bb0b15..30e626abf5b5 100644 --- a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/HeapHistogramTab.java +++ b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/HeapHistogramTab.java @@ -192,16 +192,16 @@ class HeapHistogramTab extends AbstractTableTab { // Class info lines.add(Line.from( - Span.styled(" Class: ", Theme.label().bold()), + Span.styled(" Class: ", Theme.muted()), Span.styled(className, Style.EMPTY.fg(Theme.accent())))); lines.add(Line.from( - Span.styled(" Package: ", Theme.label().bold()), + Span.styled(" Package: ", Theme.muted()), Span.styled(pkg.isEmpty() ? "(none)" : pkg, pkg.isEmpty() ? Style.EMPTY.dim() : Style.EMPTY.fg(Theme.baseFg())))); lines.add(Line.from( - Span.styled(" Instances: ", Theme.label().bold()), + Span.styled(" Instances: ", Theme.muted()), Span.styled(formatNumber(entry.instances), Style.EMPTY.fg(Theme.baseFg())), - Span.styled(" Bytes: ", Theme.label().bold()), + Span.styled(" Bytes: ", Theme.muted()), Span.styled(formatBytes(entry.bytes), Style.EMPTY.fg(Theme.baseFg())))); // Package summary @@ -218,14 +218,14 @@ class HeapHistogramTab extends AbstractTableTab { } lines.add(Line.from(Span.raw(""))); lines.add(Line.from( - Span.styled(" Package Summary ", Theme.label().bold()), + Span.styled(" Package Summary ", Theme.muted()), Span.styled("(" + pkg + ")", Style.EMPTY.dim()))); lines.add(Line.from( - Span.styled(" Classes: ", Theme.label()), + Span.styled(" Classes: ", Theme.muted()), Span.styled(formatNumber(pkgClasses), Style.EMPTY.fg(Theme.baseFg())), - Span.styled(" Instances: ", Theme.label()), + Span.styled(" Instances: ", Theme.muted()), Span.styled(formatNumber(pkgInstances), Style.EMPTY.fg(Theme.baseFg())), - Span.styled(" Bytes: ", Theme.label()), + Span.styled(" Bytes: ", Theme.muted()), Span.styled(formatBytes(pkgBytes), Style.EMPTY.fg(Theme.baseFg())))); } @@ -235,12 +235,12 @@ class HeapHistogramTab extends AbstractTableTab { lines.add(Line.from(Span.raw(""))); if (jar.groupId() != null) { lines.add(Line.from( - Span.styled(" JAR: ", Theme.label().bold()), + Span.styled(" JAR: ", Theme.muted()), Span.styled(jar.groupId() + ":" + jar.artifactId() + ":" + jar.version(), Theme.success()))); } else { lines.add(Line.from( - Span.styled(" JAR: ", Theme.label().bold()), + Span.styled(" JAR: ", Theme.muted()), Span.styled(jar.display(), Theme.success()))); } if (jar.fullPath() != null) { @@ -256,7 +256,7 @@ class HeapHistogramTab extends AbstractTableTab { } else if (isBuiltinClass(className)) { lines.add(Line.from(Span.raw(""))); lines.add(Line.from( - Span.styled(" JAR: ", Theme.label().bold()), + Span.styled(" JAR: ", Theme.muted()), Span.styled("JDK (built-in)", Theme.success()))); } diff --git a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/HistoryTab.java b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/HistoryTab.java index 325777f9513d..572b6b4592fa 100644 --- a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/HistoryTab.java +++ b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/HistoryTab.java @@ -910,7 +910,7 @@ class HistoryTab extends AbstractTab { } List<Span> stepSpans = new ArrayList<>(); - stepSpans.add(Span.styled(" Step: ", Theme.label().bold())); + stepSpans.add(Span.styled(" Step: ", Theme.muted())); stepSpans.add(Span.raw(String.format("%d/%d", stepIdx + 1, diagram.getHistoryStepCount()))); if (direction != null && !direction.isBlank()) { Style dirStyle = failed ? Theme.error() : Theme.success(); @@ -919,37 +919,37 @@ class HistoryTab extends AbstractTab { } lines.add(Line.from(stepSpans)); lines.add(Line.from( - Span.styled(" Exchange: ", Theme.label().bold()), + Span.styled(" Exchange: ", Theme.muted()), Span.raw(exchangeId))); lines.add(Line.from( - Span.styled(" Route: ", Theme.label().bold()), + Span.styled(" Route: ", Theme.muted()), Span.styled(routeId != null ? routeId : "", Style.EMPTY.fg(Theme.accent())))); lines.add(Line.from( - Span.styled(" Node: ", Theme.label().bold()), + Span.styled(" Node: ", Theme.muted()), Span.raw(nodeId != null ? nodeId : ""))); if (processor != null) { lines.add(Line.from( - Span.styled(" Proc: ", Theme.label().bold()), + Span.styled(" Proc: ", Theme.muted()), Span.raw(processor.strip()))); } if (elapsed >= 0) { lines.add(Line.from( - Span.styled(" Elapsed: ", Theme.label().bold()), + Span.styled(" Elapsed: ", Theme.muted()), Span.raw(elapsed + "ms"))); } if (timestamp != null) { lines.add(Line.from( - Span.styled(" Time: ", Theme.label().bold()), + Span.styled(" Time: ", Theme.muted()), Span.raw(timestamp))); } if (threadName != null) { lines.add(Line.from( - Span.styled(" Thread: ", Theme.label().bold()), + Span.styled(" Thread: ", Theme.muted()), Span.raw(threadName))); } if (failed) { lines.add(Line.from( - Span.styled(" Status: ", Theme.label().bold()), + Span.styled(" Status: ", Theme.muted()), Span.styled("Failed", Theme.error().bold()))); } @@ -966,7 +966,7 @@ class HistoryTab extends AbstractTab { boolean varsChanged = changes.length() > 3 && changes.charAt(3) == 'V'; List<Span> changeSpans = new ArrayList<>(); - changeSpans.add(Span.styled(" Changed: ", Theme.label().bold())); + changeSpans.add(Span.styled(" Changed: ", Theme.muted())); if (!changes.isBlank()) { changeSpans.addAll(buildChangeSpans(changes)); } @@ -985,7 +985,7 @@ class HistoryTab extends AbstractTab { } if (showBody && body != null) { - Style headerStyle = bodyChanged ? Theme.change().bold() : Theme.success().bold(); + Style headerStyle = bodyChanged ? Theme.change().bold() : Theme.muted(); lines.add(Line.from(Span.raw(""))); lines.add(Line.from( Span.styled(" Body", headerStyle), @@ -996,21 +996,21 @@ class HistoryTab extends AbstractTab { } if (showHeaders && headers != null && !headers.isEmpty()) { - Style sectionStyle = headersChanged ? Theme.change().bold() : Theme.success().bold(); + Style sectionStyle = headersChanged ? Theme.change().bold() : Theme.muted(); lines.add(Line.from(Span.raw(""))); lines.add(Line.from(Span.styled(" Headers", sectionStyle))); addInfoKvLines(lines, headers, headersChanged, prevHeaders); } if (showProps && properties != null && !properties.isEmpty()) { - Style sectionStyle = propsChanged ? Theme.change().bold() : Theme.success().bold(); + Style sectionStyle = propsChanged ? Theme.change().bold() : Theme.muted(); lines.add(Line.from(Span.raw(""))); lines.add(Line.from(Span.styled(" Properties", sectionStyle))); addInfoKvLines(lines, properties, propsChanged, prevProperties); } if (showVars && variables != null && !variables.isEmpty()) { - Style sectionStyle = varsChanged ? Theme.change().bold() : Theme.success().bold(); + Style sectionStyle = varsChanged ? Theme.change().bold() : Theme.muted(); lines.add(Line.from(Span.raw(""))); lines.add(Line.from(Span.styled(" Variables", sectionStyle))); addInfoKvLines(lines, variables, varsChanged, prevVariables); @@ -1034,7 +1034,7 @@ class HistoryTab extends AbstractTab { boolean keyChanged = sectionChanged && prevMap != null && (!prevMap.containsKey(entry.getKey()) || !Objects.equals(prevMap.get(entry.getKey()), entry.getValue())); - Style keyStyle = keyChanged ? Theme.change() : Style.EMPTY.fg(Theme.accent()); + Style keyStyle = keyChanged ? Theme.change() : Theme.muted(); Style valStyle = keyChanged ? Theme.change() : Style.EMPTY; lines.add(Line.from( Span.styled(" " + entry.getKey(), keyStyle), @@ -2030,25 +2030,25 @@ class HistoryTab extends AbstractTab { List<Line> lines, String exchangeId, String routeId, String nodeId, String nodeLabel, String location, long elapsed, String threadName, boolean failed) { lines.add(Line.from( - Span.styled(" Exchange: ", Theme.label().bold()), + Span.styled(" Exchange: ", Theme.muted()), Span.raw(exchangeId != null ? exchangeId : ""))); lines.add(Line.from( - Span.styled(" Route: ", Theme.label().bold()), + Span.styled(" Route: ", Theme.muted()), Span.raw(String.format("%-25s", routeId != null ? routeId : "")), - Span.styled(" Node: ", Theme.label().bold()), + Span.styled(" Node: ", Theme.muted()), Span.raw(nodeId != null ? nodeId : ""), Span.raw(nodeLabel != null ? " (" + nodeLabel + ")" : ""))); lines.add(Line.from( - Span.styled(" Location: ", Theme.label().bold()), + Span.styled(" Location: ", Theme.muted()), Span.raw(location != null ? location : ""))); lines.add(Line.from( - Span.styled(" Elapsed: ", Theme.label().bold()), + Span.styled(" Elapsed: ", Theme.muted()), Span.raw(elapsed >= 0 ? elapsed + "ms" : ""), - Span.styled(" Thread: ", Theme.label().bold()), + Span.styled(" Thread: ", Theme.muted()), Span.raw(threadName != null ? threadName : ""))); if (failed) { lines.add(Line.from( - Span.styled(" Status: ", Theme.label().bold()), + Span.styled(" Status: ", Theme.muted()), Span.styled("Failed", Theme.error().bold()))); } lines.add(Line.from(Span.raw(""))); @@ -2061,7 +2061,7 @@ class HistoryTab extends AbstractTab { if (map == null || map.isEmpty()) { return; } - Style headerStyle = changed ? Theme.change().bold() : Theme.success().bold(); + Style headerStyle = changed ? Theme.change().bold() : Theme.muted(); lines.add(Line.from(Span.styled(section, headerStyle))); for (Map.Entry<String, Object> entry : map.entrySet()) { String type = types != null ? types.get(entry.getKey()) : null; @@ -2083,7 +2083,7 @@ class HistoryTab extends AbstractTab { boolean keyChanged = changed && prevMap != null && (!prevMap.containsKey(entry.getKey()) || !Objects.equals(prevMap.get(entry.getKey()), entry.getValue())); - Style keyStyle = keyChanged ? Theme.change() : Style.EMPTY.fg(Theme.accent()); + Style keyStyle = keyChanged ? Theme.change() : Theme.muted(); Style valStyle = keyChanged ? Theme.change() : Style.EMPTY; lines.add(Line.from( Span.styled(" " + typeLabel, Style.EMPTY.dim()), @@ -2095,7 +2095,7 @@ class HistoryTab extends AbstractTab { } static void addBodyLines(List<Line> lines, String body, String bodyType, boolean changed) { - Style headerStyle = changed ? Theme.change().bold() : Theme.success().bold(); + Style headerStyle = changed ? Theme.change().bold() : Theme.muted(); if (body != null) { if (bodyType != null) { lines.add(Line.from( diff --git a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/HttpTab.java b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/HttpTab.java index b63e19d0ea1b..13d362a2c7a7 100644 --- a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/HttpTab.java +++ b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/HttpTab.java @@ -1226,7 +1226,7 @@ class HttpTab extends AbstractTableTab { spans.add(Span.raw(" HTTP Services [" + visible.size() + "]")); if (info.httpServer != null) { spans.add(Span.raw(" ")); - spans.add(Span.styled("Server: ", Theme.label().bold())); + spans.add(Span.styled("Server: ", Theme.muted())); spans.add(Span.styled(info.httpServer, Style.EMPTY.fg(Theme.accent()))); } long restCount = info.httpEndpoints.stream().filter(e -> e.fromRest && !e.specification).count(); @@ -1399,7 +1399,7 @@ class HttpTab extends AbstractTableTab { return; } lines.add(Line.from( - Span.styled(String.format(" %-10s ", label + ":"), Theme.label().bold()), + Span.styled(String.format(" %-10s ", label + ":"), Theme.muted()), Span.raw(value))); } diff --git a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/InfraBrowserPopup.java b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/InfraBrowserPopup.java index b52eb115f61e..9ef8d75ce3f3 100644 --- a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/InfraBrowserPopup.java +++ b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/InfraBrowserPopup.java @@ -411,7 +411,7 @@ class InfraBrowserPopup { if (hasMultiImpl) { row++; Rect labelArea = new Rect(ix, row, labelW, 1); - frame.renderWidget(Paragraph.from(Line.from(Span.styled("Impl:", Style.EMPTY.bold()))), labelArea); + frame.renderWidget(Paragraph.from(Line.from(Span.styled("Impl:", Theme.muted()))), labelArea); String impl = selectedService.implementations().get(implIndex); Rect implArea = new Rect(ix + labelW, row, fieldW, 1); frame.renderWidget(Paragraph.from(Line.from( @@ -423,7 +423,7 @@ class InfraBrowserPopup { row++; Rect labelArea = new Rect(ix, row, labelW, 1); - frame.renderWidget(Paragraph.from(Line.from(Span.styled("Port:", Style.EMPTY.bold()))), labelArea); + frame.renderWidget(Paragraph.from(Line.from(Span.styled("Port:", Theme.muted()))), labelArea); Rect portArea = new Rect(ix + labelW, row, fieldW, 1); TextInput textInput = TextInput.builder() .cursorStyle(Style.EMPTY.reversed()) diff --git a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/MemoryLeakTab.java b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/MemoryLeakTab.java index efb4e37803f0..de45796c3a1c 100644 --- a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/MemoryLeakTab.java +++ b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/MemoryLeakTab.java @@ -243,7 +243,7 @@ class MemoryLeakTab extends AbstractTab { Span.styled(" to start a recording.", Style.EMPTY.dim()))); lines.add(Line.from(Span.raw(""))); lines.add(Line.from( - Span.styled(" Duration: ", Theme.label().bold()), + Span.styled(" Duration: ", Theme.muted()), Span.styled(duration + "s", Style.EMPTY.fg(Theme.baseFg())), Span.styled(" (use ", Style.EMPTY.dim()), Span.styled("+", Theme.label().bold()), @@ -252,7 +252,7 @@ class MemoryLeakTab extends AbstractTab { Span.styled(" to adjust)", Style.EMPTY.dim()))); String modeLabel = recordingMode == RecordingMode.DUAL ? "dual" : "single"; lines.add(Line.from( - Span.styled(" Mode: ", Theme.label().bold()), + Span.styled(" Mode: ", Theme.muted()), Span.styled("[" + modeLabel + "]", Style.EMPTY.fg(Theme.baseFg())), Span.styled(" (press ", Style.EMPTY.dim()), Span.styled("d", Theme.label().bold()), @@ -265,11 +265,11 @@ class MemoryLeakTab extends AbstractTab { lines.add(Line.from( Span.styled(" Runs two sequential JFR recordings:", Style.EMPTY.dim()))); lines.add(Line.from( - Span.styled(" Run 1: ", Style.EMPTY.fg(Theme.accent())), + Span.styled(" Run 1: ", Theme.muted()), Span.styled(duration + "s", Style.EMPTY.fg(Theme.baseFg())), Span.styled(" baseline recording", Style.EMPTY.dim()))); lines.add(Line.from( - Span.styled(" Run 2: ", Style.EMPTY.fg(Theme.accent())), + Span.styled(" Run 2: ", Theme.muted()), Span.styled((duration * 2) + "s", Style.EMPTY.fg(Theme.baseFg())), Span.styled(" comparison recording (2x duration)", Style.EMPTY.dim()))); lines.add(Line.from( @@ -318,13 +318,13 @@ class MemoryLeakTab extends AbstractTab { lines.add(Line.from(Span.raw(""))); lines.add(Line.from( - Span.styled(" Elapsed: ", Theme.label().bold()), + Span.styled(" Elapsed: ", Theme.muted()), Span.styled(elapsedSec + "s", Style.EMPTY.fg(Theme.baseFg())))); lines.add(Line.from( - Span.styled(" Remaining: ", Theme.label().bold()), + Span.styled(" Remaining: ", Theme.muted()), Span.styled(remainingSec + "s", Style.EMPTY.fg(Theme.baseFg())))); lines.add(Line.from( - Span.styled(" Duration: ", Theme.label().bold()), + Span.styled(" Duration: ", Theme.muted()), Span.styled(currentRecordingDuration + "s", Style.EMPTY.fg(Theme.baseFg())))); lines.add(Line.from(Span.raw(""))); lines.add(Line.from( @@ -464,31 +464,31 @@ class MemoryLeakTab extends AbstractTab { // Sample info lines.add(Line.from( - Span.styled(" Class: ", Theme.label().bold()), + Span.styled(" Class: ", Theme.muted()), Span.styled(entry.className != null ? entry.className : "unknown", Style.EMPTY.fg(Theme.accent())))); List<Span> infoSpans = new ArrayList<>(); if (entry.count > 1) { - infoSpans.add(Span.styled(" Count: ", Theme.label().bold())); + infoSpans.add(Span.styled(" Count: ", Theme.muted())); infoSpans.add(Span.styled(String.valueOf(entry.count), Style.EMPTY.fg(Theme.baseFg()))); } if (entry.sampledSize > 0) { infoSpans.add(Span.styled(infoSpans.isEmpty() ? " Sampled: " : " Sampled: ", - Theme.label().bold())); + Theme.muted())); infoSpans.add(Span.styled(formatBytes(entry.sampledSize), Style.EMPTY.fg(Theme.baseFg()))); } if (!infoSpans.isEmpty()) { lines.add(Line.from(infoSpans)); } lines.add(Line.from( - Span.styled(" Age: ", Theme.label().bold()), + Span.styled(" Age: ", Theme.muted()), Span.styled(formatDuration(entry.objectAge), Style.EMPTY.fg(Theme.baseFg())))); // Reference chain if (entry.referenceChain != null && !entry.referenceChain.isEmpty()) { lines.add(Line.from(Span.raw(""))); lines.add(Line.from( - Span.styled(" Reference Chain (Object → GC Root):", Theme.label().bold()))); + Span.styled(" Reference Chain (Object → GC Root):", Theme.muted()))); for (int i = 0; i < entry.referenceChain.size(); i++) { ChainLink link = entry.referenceChain.get(i); @@ -509,7 +509,7 @@ class MemoryLeakTab extends AbstractTab { if (entry.stackTrace != null && !entry.stackTrace.isEmpty()) { lines.add(Line.from(Span.raw(""))); lines.add(Line.from( - Span.styled(" Allocation Stack Trace:", Theme.label().bold()))); + Span.styled(" Allocation Stack Trace:", Theme.muted()))); for (StackEntry frame2 : entry.stackTrace) { Style methodStyle = isJdkFrame(frame2.method) ? Style.EMPTY.dim() : Style.EMPTY.fg(Theme.baseFg()); @@ -617,17 +617,17 @@ class MemoryLeakTab extends AbstractTab { List<Line> lines = new ArrayList<>(); lines.add(Line.from( - Span.styled(" Class: ", Theme.label().bold()), + Span.styled(" Class: ", Theme.muted()), Span.styled(entry.className != null ? entry.className : "unknown", Style.EMPTY.fg(Theme.accent())))); lines.add(Line.from( - Span.styled(" Trend: ", Theme.label().bold()), + Span.styled(" Trend: ", Theme.muted()), trendSpan(entry.trend))); lines.add(Line.from( - Span.styled(" Run 1: ", Theme.label().bold()), + Span.styled(" Run 1: ", Theme.muted()), Span.styled(formatBytes(entry.baselineSampledSize) + " (" + entry.baselineCount + " samples)", Style.EMPTY.fg(Theme.baseFg())))); lines.add(Line.from( - Span.styled(" Run 2: ", Theme.label().bold()), + Span.styled(" Run 2: ", Theme.muted()), Span.styled(formatBytes(entry.currentSampledSize) + " (" + entry.currentCount + " samples)", Style.EMPTY.fg(Theme.baseFg())))); if (entry.growthRatio > 0) { @@ -635,7 +635,7 @@ class MemoryLeakTab extends AbstractTab { ? "~" + formatGrowthPercent(entry.growthRatio) : formatGrowthPercent(entry.growthRatio); lines.add(Line.from( - Span.styled(" Growth: ", Theme.label().bold()), + Span.styled(" Growth: ", Theme.muted()), Span.styled(growthLabel, entry.growthRatio > 1.3 ? Theme.error().bold() : Style.EMPTY.fg(Theme.baseFg())))); } @@ -653,7 +653,7 @@ class MemoryLeakTab extends AbstractTab { if (entry.referenceChain != null && !entry.referenceChain.isEmpty()) { lines.add(Line.from(Span.raw(""))); lines.add(Line.from( - Span.styled(" Reference Chain (Object -> GC Root):", Theme.label().bold()))); + Span.styled(" Reference Chain (Object -> GC Root):", Theme.muted()))); for (int i = 0; i < entry.referenceChain.size(); i++) { ChainLink link = entry.referenceChain.get(i); String prefix = i == entry.referenceChain.size() - 1 ? " └─ " : " ├─ "; @@ -672,7 +672,7 @@ class MemoryLeakTab extends AbstractTab { if (entry.stackTrace != null && !entry.stackTrace.isEmpty()) { lines.add(Line.from(Span.raw(""))); lines.add(Line.from( - Span.styled(" Allocation Stack Trace:", Theme.label().bold()))); + Span.styled(" Allocation Stack Trace:", Theme.muted()))); for (StackEntry se : entry.stackTrace) { Style methodStyle = isJdkFrame(se.method) ? Style.EMPTY.dim() : Style.EMPTY.fg(Theme.baseFg()); lines.add(Line.from( diff --git a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/MemoryTab.java b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/MemoryTab.java index 1084cb02ff6d..539e4789a2de 100644 --- a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/MemoryTab.java +++ b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/MemoryTab.java @@ -126,14 +126,14 @@ class MemoryTab extends AbstractTab { // Heap memory with two gauge bars (used/committed and used/max) if (info.heapMemUsed > 0) { lines.add(Line.from( - Span.styled(" Heap Memory", Style.EMPTY.fg(Theme.accent()).bold()))); + Span.styled(" Heap Memory", Theme.label().bold()))); // Compute heap trend from history LinkedList<Long> hist = heapMemHistory.get(info.pid); Span trendSpan = computeTrendSpan(hist, info.heapMemCommitted); lines.add(Line.from( - Span.styled(" used: ", Style.EMPTY.dim()), + Span.styled(" used: ", Theme.muted()), Span.styled(formatBytes(info.heapMemUsed), Style.EMPTY.fg(Theme.baseFg()).bold()))); if (info.heapMemCommitted > 0) { @@ -142,7 +142,7 @@ class MemoryTab extends AbstractTab { Style colorComm = pctComm >= 80 ? Theme.error() : pctComm >= 60 ? Theme.warning() : Theme.success(); List<Span> commSpans = new ArrayList<>(); - commSpans.add(Span.styled(" committed: ", Style.EMPTY.dim())); + commSpans.add(Span.styled(" committed: ", Theme.muted())); commSpans.add(Span.styled(String.format("%-10s", formatBytes(info.heapMemCommitted)), Style.EMPTY)); commSpans.add(Span.styled(gaugeComm, colorComm)); commSpans.add(Span.styled(String.format(" %d%%", pctComm), colorComm.bold())); @@ -158,7 +158,7 @@ class MemoryTab extends AbstractTab { Style colorMax = pctMax >= 80 ? Theme.error() : pctMax >= 60 ? Theme.warning() : Theme.success(); List<Span> maxSpans = new ArrayList<>(); - maxSpans.add(Span.styled(" max: ", Style.EMPTY.dim())); + maxSpans.add(Span.styled(" max: ", Theme.muted())); maxSpans.add(Span.styled(String.format("%-10s", formatBytes(info.heapMemMax)), Style.EMPTY)); maxSpans.add(Span.styled(gaugeMax, colorMax)); maxSpans.add(Span.styled(String.format(" %d%%", pctMax), colorMax.bold())); @@ -178,14 +178,14 @@ class MemoryTab extends AbstractTab { : Theme.success(); lines.add(Line.from( - Span.styled(" Old Gen: ", Style.EMPTY.dim()), + Span.styled(" Old Gen: ", Theme.muted()), Span.styled(String.format("%-10s", formatBytes(info.oldGenUsed)), Style.EMPTY.fg(Theme.baseFg()).bold()), Span.styled(oldGauge, oldColor), Span.styled(String.format(" %d%%", oldPct), oldColor.bold()))); lines.add(Line.from( - Span.styled(" committed: ", Style.EMPTY.dim()), + Span.styled(" committed: ", Theme.muted()), Span.raw(formatBytes(info.oldGenCommitted)), - Span.styled(" max: ", Style.EMPTY.dim()), + Span.styled(" max: ", Theme.muted()), Span.raw(formatBytes(info.oldGenMax)))); } @@ -193,22 +193,22 @@ class MemoryTab extends AbstractTab { if (info.nonHeapMemUsed > 0) { lines.add(Line.from(Span.raw(""))); lines.add(Line.from( - Span.styled(" Non-Heap Memory", Style.EMPTY.fg(Theme.accent()).bold()))); + Span.styled(" Non-Heap Memory", Theme.label().bold()))); lines.add(Line.from( - Span.styled(" used: ", Style.EMPTY.dim()), + Span.styled(" used: ", Theme.muted()), Span.styled(String.format("%-10s", formatBytes(info.nonHeapMemUsed)), Style.EMPTY.fg(Theme.baseFg()).bold()), - Span.styled(" committed: ", Style.EMPTY.dim()), + Span.styled(" committed: ", Theme.muted()), Span.raw(formatBytes(info.nonHeapMemCommitted)))); } if (info.metaspaceUsed > 0) { lines.add(Line.from( - Span.styled(" Metaspace: ", Style.EMPTY.dim()), + Span.styled(" Metaspace: ", Theme.muted()), Span.styled(String.format("%-10s", formatBytes(info.metaspaceUsed)), Style.EMPTY.fg(Theme.baseFg()).bold()), - Span.styled(" committed: ", Style.EMPTY.dim()), + Span.styled(" committed: ", Theme.muted()), Span.raw(formatBytes(info.metaspaceCommitted)), info.metaspaceMax > 0 - ? Span.styled(" max: " + formatBytes(info.metaspaceMax), Style.EMPTY.dim()) + ? Span.styled(" max: " + formatBytes(info.metaspaceMax), Theme.muted()) : Span.raw(""))); } @@ -216,24 +216,24 @@ class MemoryTab extends AbstractTab { if (info.threadCount > 0) { lines.add(Line.from(Span.raw(""))); List<Span> threadSpans = new ArrayList<>(); - threadSpans.add(Span.styled(" Threads", Style.EMPTY.fg(Theme.accent()).bold())); - threadSpans.add(Span.styled(" current: ", Style.EMPTY.dim())); + threadSpans.add(Span.styled(" Threads", Theme.label().bold())); + threadSpans.add(Span.styled(" current: ", Theme.muted())); threadSpans.add(Span.styled(String.valueOf(info.threadCount), Style.EMPTY.fg(Theme.baseFg()).bold())); - threadSpans.add(Span.styled(" peak: ", Style.EMPTY.dim())); + threadSpans.add(Span.styled(" peak: ", Theme.muted())); threadSpans.add(Span.raw(String.valueOf(info.peakThreadCount))); lines.add(Line.from(threadSpans)); } // GC and class loading on the same line List<Span> gcSpans = new ArrayList<>(); - gcSpans.add(Span.styled(" GC: ", Style.EMPTY.dim())); + gcSpans.add(Span.styled(" GC: ", Theme.muted())); gcSpans.add(Span.raw(info.gcCollectionCount + " collections")); if (info.gcCollectionTime > 0) { - gcSpans.add(Span.styled(" time: ", Style.EMPTY.dim())); + gcSpans.add(Span.styled(" time: ", Theme.muted())); gcSpans.add(Span.raw(TimeUtils.printDuration(info.gcCollectionTime, true))); } if (info.loadedClassCount > 0) { - gcSpans.add(Span.styled(" Classes: ", Style.EMPTY.dim())); + gcSpans.add(Span.styled(" Classes: ", Theme.muted())); gcSpans.add(Span.raw(String.valueOf(info.loadedClassCount))); } lines.add(Line.from(Span.raw(""))); diff --git a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/MetricsTab.java b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/MetricsTab.java index 67286c1dcc7f..dd5f8ddfc9e3 100644 --- a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/MetricsTab.java +++ b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/MetricsTab.java @@ -59,7 +59,7 @@ class MetricsTab extends AbstractTableTab { private static final int MOUSE_SCROLL_LINES = 3; - private static final Style LABEL = Style.EMPTY.dim(); + private static final Style LABEL = Theme.muted(); private static final Style VALUE = Style.EMPTY.fg(Theme.baseFg()).bold(); private static final Style GOOD = Theme.success(); private static final Style BAD = Theme.error(); 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 4dc53da305e5..409d5655fd16 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 @@ -633,7 +633,7 @@ class OverviewTab extends AbstractTab { frame.renderWidget(infoBlock, area); Rect inner = infoBlock.inner(area); List<Line> lines = new ArrayList<>(); - Style dim = Style.EMPTY.dim(); + Style dim = Theme.muted(); int jvmDetailStart = -1; int jvmDetailCount = 0; if (sel != null) { @@ -749,7 +749,7 @@ class OverviewTab extends AbstractTab { frame.renderWidget(infoBlock, area); Rect inner = infoBlock.inner(area); List<Line> lines = new ArrayList<>(); - Style dim = Style.EMPTY.dim(); + Style dim = Theme.muted(); lines.add(Line.from( Span.styled("Service: ", dim), Span.styled(infra.alias, Theme.notice()))); diff --git a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/ProcessTab.java b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/ProcessTab.java index c143d66b58ed..396a2d8aaeb7 100644 --- a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/ProcessTab.java +++ b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/ProcessTab.java @@ -142,7 +142,7 @@ class ProcessTab extends AbstractTab { String cmdLine = getCommandLine(info.pid); if (cmdLine != null) { lines.add(Line.from( - Span.styled(" Command Line", Style.EMPTY.fg(Theme.accent()).bold()))); + Span.styled(" Command Line", Theme.label().bold()))); lines.add(Line.from(Span.raw(""))); if (wrap) { lines.add(Line.from(Span.raw(" " + cmdLine))); @@ -241,7 +241,7 @@ class ProcessTab extends AbstractTab { } String padded = String.format(" %-12s", label + ":"); lines.add(Line.from( - Span.styled(padded, Style.EMPTY.dim()), + Span.styled(padded, Theme.muted()), Span.styled(value, Style.EMPTY.fg(Theme.baseFg()).bold()))); } diff --git a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/RoutesTab.java b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/RoutesTab.java index 69334348a038..85ffdba6bc77 100644 --- a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/RoutesTab.java +++ b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/RoutesTab.java @@ -836,69 +836,69 @@ class RoutesTab extends AbstractTab { List<Line> lines = new ArrayList<>(); if (route != null) { lines.add(Line.from( - Span.styled(" Route: ", Theme.label().bold()), + Span.styled(" Route: ", Theme.muted()), Span.styled(route.routeId, Style.EMPTY.fg(Theme.baseFg()).bold()))); lines.add(Line.from( - Span.styled(" From: ", Style.EMPTY.dim()), + Span.styled(" From: ", Theme.muted()), Span.raw(route.from != null ? route.from : ""))); String stateLabel = route.state != null ? route.state : ""; Style stateStyle = "Started".equals(route.state) ? Theme.success() : Theme.error(); lines.add(Line.from( - Span.styled(" State: ", Style.EMPTY.dim()), + Span.styled(" State: ", Theme.muted()), Span.styled(stateLabel, stateStyle))); lines.add(Line.from(Span.raw(""))); lines.add(Line.from( - Span.styled(" Uptime: ", Style.EMPTY.dim()), + Span.styled(" Uptime: ", Theme.muted()), Span.raw(route.uptime != null ? route.uptime : ""))); lines.add(Line.from( - Span.styled(" Throughput: ", Style.EMPTY.dim()), + Span.styled(" Throughput: ", Theme.muted()), Span.raw(route.throughput != null ? route.throughput : ""))); if (route.coverage != null) { lines.add(Line.from( - Span.styled(" Coverage: ", Style.EMPTY.dim()), + Span.styled(" Coverage: ", Theme.muted()), Span.raw(route.coverage))); } lines.add(Line.from(Span.raw(""))); int w = numWidth(route.total, route.failed, route.inflight); lines.add(Line.from( - Span.styled(" Total: ", Style.EMPTY.dim()), + Span.styled(" Total: ", Theme.muted()), Span.raw(String.format("%" + w + "d", route.total)))); Style failStyle = route.failed > 0 ? Theme.error().bold() : Style.EMPTY; lines.add(Line.from( - Span.styled(" Failed: ", Style.EMPTY.dim()), + Span.styled(" Failed: ", Theme.muted()), Span.styled(String.format("%" + w + "d", route.failed), failStyle))); lines.add(Line.from( - Span.styled(" Inflight: ", Style.EMPTY.dim()), + Span.styled(" Inflight: ", Theme.muted()), Span.raw(String.format("%" + w + "d", route.inflight)))); lines.add(Line.from(Span.raw(""))); if (route.total > 0) { int tw = numWidth(route.meanTime, route.maxTime, route.minTime); lines.add(Line.from( - Span.styled(" Mean: ", Style.EMPTY.dim()), + Span.styled(" Mean: ", Theme.muted()), Span.raw(String.format("%" + tw + "d ms", route.meanTime)))); lines.add(Line.from( - Span.styled(" Max: ", Style.EMPTY.dim()), + Span.styled(" Max: ", Theme.muted()), Span.raw(String.format("%" + tw + "d ms", route.maxTime)))); lines.add(Line.from( - Span.styled(" Min: ", Style.EMPTY.dim()), + Span.styled(" Min: ", Theme.muted()), Span.raw(String.format("%" + tw + "d ms", route.minTime)))); } if (route.sinceLastCompleted != null || route.sinceLastFailed != null) { lines.add(Line.from(Span.raw(""))); lines.add(Line.from( - Span.styled(" Since last:", Style.EMPTY.dim()))); + Span.styled(" Since last:", Theme.muted()))); if (route.sinceLastCompleted != null) { lines.add(Line.from( - Span.styled(" success: ", Style.EMPTY.dim()), + Span.styled(" success: ", Theme.muted()), Span.raw(route.sinceLastCompleted))); } if (route.sinceLastFailed != null) { lines.add(Line.from( - Span.styled(" fail: ", Style.EMPTY.dim()), + Span.styled(" fail: ", Theme.muted()), Span.styled(route.sinceLastFailed, Theme.error()))); } @@ -913,28 +913,28 @@ class RoutesTab extends AbstractTab { Style.EMPTY.fg(Theme.accent()).bold()))); lines.add(Line.from(Span.raw(""))); lines.add(Line.from( - Span.styled(" URI: ", Style.EMPTY.dim()), + Span.styled(" URI: ", Theme.muted()), Span.raw(topoNode.from != null ? topoNode.from : ""))); if (topoNode.description != null && !topoNode.description.isBlank()) { lines.add(Line.from( - Span.styled(" Path: ", Style.EMPTY.dim()), + Span.styled(" Path: ", Theme.muted()), Span.raw(topoNode.description))); } String connectedRoute = diagram.getConnectedRouteId(routeId); if (connectedRoute != null) { lines.add(Line.from(Span.raw(""))); lines.add(Line.from( - Span.styled(isInbound ? " To route: " : " From route: ", Style.EMPTY.dim()), + Span.styled(isInbound ? " To route: " : " From route: ", Theme.muted()), Span.styled(connectedRoute, Style.EMPTY.fg(Theme.baseFg())))); } if (topoNode.exchangesTotal > 0 || topoNode.exchangesFailed > 0) { lines.add(Line.from(Span.raw(""))); lines.add(Line.from( - Span.styled(" Total: ", Style.EMPTY.dim()), + Span.styled(" Total: ", Theme.muted()), Span.raw(String.valueOf(topoNode.exchangesTotal)))); if (topoNode.exchangesFailed > 0) { lines.add(Line.from( - Span.styled(" Failed: ", Style.EMPTY.dim()), + Span.styled(" Failed: ", Theme.muted()), Span.styled(String.valueOf(topoNode.exchangesFailed), Theme.error().bold()))); } diff --git a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/SpansTab.java b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/SpansTab.java index a7a678886215..2523de6d31e8 100644 --- a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/SpansTab.java +++ b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/SpansTab.java @@ -585,33 +585,33 @@ class SpansTab extends AbstractTab { // Row 1: span identity Style statusStyle = span.isError() ? Theme.error().bold() : Theme.success(); lines.add(Line.from( - Span.styled(" Span: ", Style.EMPTY.dim()), + Span.styled(" Span: ", Theme.muted()), Span.styled(span.spanId(), Style.EMPTY.fg(Theme.baseFg()).bold()), - Span.styled(" Parent: ", Style.EMPTY.dim()), + Span.styled(" Parent: ", Theme.muted()), Span.raw(span.parentSpanId() != null ? span.parentSpanId() : "-"), - Span.styled(" Kind: ", Style.EMPTY.dim()), + Span.styled(" Kind: ", Theme.muted()), Span.raw(span.kind() != null ? span.kind() : ""))); // Row 2: status and duration lines.add(Line.from( - Span.styled(" Status: ", Style.EMPTY.dim()), + Span.styled(" Status: ", Theme.muted()), Span.styled(span.isError() ? "ERROR" : "OK", statusStyle), - Span.styled(" Duration: ", Style.EMPTY.dim()), + Span.styled(" Duration: ", Theme.muted()), Span.raw(span.durationMs() + "ms"))); // Row 3: route, processor context, and scope (for 3rd-party spans) if (span.routeId() != null || span.processorId() != null || !span.isCamelSpan()) { List<Span> ctx = new ArrayList<>(); if (span.routeId() != null) { - ctx.add(Span.styled(" Route: ", Style.EMPTY.dim())); + ctx.add(Span.styled(" Route: ", Theme.muted())); ctx.add(Span.styled(span.routeId(), Theme.label())); } if (span.processorId() != null) { - ctx.add(Span.styled(" Processor: ", Style.EMPTY.dim())); + ctx.add(Span.styled(" Processor: ", Theme.muted())); ctx.add(Span.styled(span.processorId(), Theme.label())); } if (!span.isCamelSpan()) { - ctx.add(Span.styled(" Source: ", Style.EMPTY.dim())); + ctx.add(Span.styled(" Source: ", Theme.muted())); ctx.add(Span.styled(span.scopeName(), Theme.notice())); } lines.add(Line.from(ctx)); @@ -622,7 +622,7 @@ class SpansTab extends AbstractTab { lines.add(Line.from(Span.raw(""))); for (Map.Entry<String, Object> entry : span.attributes().entrySet()) { lines.add(Line.from( - Span.styled(" " + entry.getKey() + ": ", Style.EMPTY.dim()), + Span.styled(" " + entry.getKey() + ": ", Theme.muted()), Span.raw(String.valueOf(entry.getValue())))); } } diff --git a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/SqlTraceTab.java b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/SqlTraceTab.java index 32c2dd2c2bfd..c4ec4d4802a5 100644 --- a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/SqlTraceTab.java +++ b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/SqlTraceTab.java @@ -143,7 +143,7 @@ class SqlTraceTab extends AbstractTableTab { } private void renderKpiStrip(Frame frame, Rect area, IntegrationInfo info) { - Style labelStyle = Style.EMPTY.dim(); + Style labelStyle = Theme.muted(); Style valueStyle = Style.EMPTY.fg(Theme.accent()).bold(); Style warnStyle = Theme.warning().bold(); Style errorStyle = Theme.error().bold(); @@ -310,7 +310,7 @@ class SqlTraceTab extends AbstractTableTab { private void renderDetail(Frame frame, Rect area, SqlTraceInfo si) { List<Line> lines = new ArrayList<>(); - Style labelStyle = Style.EMPTY.fg(Theme.accent()).bold(); + Style labelStyle = Theme.muted(); Style valueStyle = Style.EMPTY; lines.add(Line.from( diff --git a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/StartupTab.java b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/StartupTab.java index 09c96e1ef82b..9c3deceb75ec 100644 --- a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/StartupTab.java +++ b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/StartupTab.java @@ -49,7 +49,7 @@ import static org.apache.camel.dsl.jbang.core.commands.tui.TuiHelper.*; class StartupTab extends AbstractTab { private static final int MOUSE_SCROLL_LINES = 3; - private static final Style LABEL = Style.EMPTY.dim(); + private static final Style LABEL = Theme.muted(); private static final Style VALUE = Style.EMPTY.fg(Theme.baseFg()).bold(); private final ScrollbarState scrollbarState = new ScrollbarState();
