This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch CAMEL-23648-run-folder
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 364459e5076355d8894f0485fe1c37bacc258cac
Author: Claus Ibsen <[email protected]>
AuthorDate: Mon Jun 1 10:46:44 2026 +0200

    CAMEL-23648: camel-jbang - TUI show Stopped status when all routes are 
stopped
    
    Co-Authored-By: Claude Opus 4.6 <[email protected]>
---
 .../org/apache/camel/dsl/jbang/core/commands/tui/OverviewTab.java | 8 ++++++--
 1 file changed, 6 insertions(+), 2 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 4d6bd5f034ca..f3cdde78f263 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
@@ -190,7 +190,11 @@ class OverviewTab implements MonitorTab {
                         Cell.from(Span.styled("", dimStyle)),
                         Cell.from(Span.styled("", dimStyle))));
             } else {
-                Style statusStyle = switch (extractState(info.state)) {
+                String stateText = extractState(info.state);
+                if ("Running".equals(stateText) && info.routeStarted == 0 && 
info.routeTotal > 0) {
+                    stateText = "Stopped";
+                }
+                Style statusStyle = switch (stateText) {
                     case "Started", "Running" -> Style.EMPTY.fg(Color.GREEN);
                     case "Stopped" -> Style.EMPTY.fg(Color.LIGHT_RED);
                     default -> Style.EMPTY.fg(Color.YELLOW);
@@ -211,7 +215,7 @@ class OverviewTab implements MonitorTab {
                         Cell.from(nameLine),
                         Cell.from(info.camelVersion != null ? 
info.camelVersion : ""),
                         centerCell(info.ready != null ? info.ready : "", 5),
-                        Cell.from(Span.styled(extractState(info.state), 
statusStyle)),
+                        Cell.from(Span.styled(stateText, statusStyle)),
                         Cell.from(info.ago != null ? info.ago : ""),
                         rightCell(info.routeStarted + "/" + info.routeTotal, 
7),
                         rightCell(info.throughput != null ? info.throughput : 
"", 8),

Reply via email to