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 3e1a05fcaa1a camel-tui: Show infra UI URL column and use clickable 
hyperlinks
3e1a05fcaa1a is described below

commit 3e1a05fcaa1a5dd6c8e9df9d7d6347c71a78a59f
Author: Claus Ibsen <[email protected]>
AuthorDate: Tue Jul 28 13:52:53 2026 +0200

    camel-tui: Show infra UI URL column and use clickable hyperlinks
    
    Add UI column to infra services table showing uiUrl from the service
    JSON (e.g. Artemis web console). Reorder columns to match integration
    table: STATUS before PORT. URLs use OSC 8 terminal hyperlinks for
    click support. HTTP tab detail and probe URL also use hyperlinks.
    
    Co-Authored-By: Claude Opus 4.6 <[email protected]>
    Signed-off-by: Claus Ibsen <[email protected]>
---
 .../camel/dsl/jbang/core/commands/tui/HttpTab.java |  8 ++++++--
 .../dsl/jbang/core/commands/tui/OverviewTab.java   | 22 ++++++++++++++++++----
 2 files changed, 24 insertions(+), 6 deletions(-)

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 7eab78d39ad9..565d1ec33287 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
@@ -882,7 +882,7 @@ class HttpTab extends AbstractTableTab {
         String fullUrl = (probeBaseUrl != null ? probeBaseUrl : "") + 
probePathState.text();
         Rect urlArea = new Rect(innerX + labelW, row, fieldW, 1);
         frame.renderWidget(Paragraph.from(Line.from(
-                Span.styled(fullUrl, Style.EMPTY.dim()))), urlArea);
+                Span.styled(fullUrl, Theme.info().dim().hyperlink(fullUrl)))), 
urlArea);
 
         // Path input
         row++;
@@ -1292,7 +1292,11 @@ class HttpTab extends AbstractTableTab {
         Title detailTitle = Title.from(Line.from(titleSpans));
 
         List<Line> lines = new ArrayList<>();
-        addDetailLine(lines, "URL", ep.url);
+        if (ep.url != null && !ep.url.isEmpty()) {
+            lines.add(Line.from(
+                    Span.styled(String.format("  %-10s ", "URL:"), 
Theme.muted()),
+                    Span.styled(ep.url, Theme.info().hyperlink(ep.url))));
+        }
         addDetailLine(lines, "Consumes", ep.consumes);
         addDetailLine(lines, "Produces", ep.produces);
         String sourceStr;
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 0b800326d620..57adf2ef5871 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
@@ -953,21 +953,25 @@ class OverviewTab extends AbstractTab {
                         Cell.from(Span.styled(info.pid, dimStyle)),
                         Cell.from(Span.styled(vanishAlias, dimStyle)),
                         Cell.from(Span.styled("", dimStyle)),
-                        Cell.from(Span.styled("", dimStyle)),
                         Cell.from(Span.styled(TuiIcons.STOPPED + " Stopped", 
Theme.error().dim())),
+                        Cell.from(Span.styled("", dimStyle)),
+                        Cell.from(Span.styled("", dimStyle)),
                         Cell.from(Span.styled("", dimStyle))).style(rowBg));
             } else {
                 String statusText = info.alive ? "Running" : "Stopped";
                 String infraAlias = TuiIcons.INFRA + "  " + info.alias;
                 String version = info.serviceVersion != null ? 
info.serviceVersion : "";
                 String port = extractInfraPort(info);
+                String uiUrl = extractInfraUiUrl(info);
                 String desc = info.description != null ? info.description : "";
                 infraRows.add(Row.from(
                         Cell.from(info.pid),
                         Cell.from(Span.styled(infraAlias, Theme.notice())),
                         Cell.from(version),
-                        rightCell(port, 7),
                         Cell.from(Span.styled(statusText, statusStyle)),
+                        rightCell(port, 7),
+                        Cell.from(Span.styled(uiUrl,
+                                uiUrl.isEmpty() ? Style.EMPTY : 
Theme.info().hyperlink(uiUrl))),
                         Cell.from(desc)).style(rowBg));
             }
         }
@@ -976,8 +980,9 @@ class OverviewTab extends AbstractTab {
                 Cell.from(Span.styled("PID", Style.EMPTY.bold())),
                 Cell.from(Span.styled(infraSortLabel("SERVICE", "service"), 
infraSortStyle("service"))),
                 Cell.from(Span.styled(infraSortLabel("VERSION", "version"), 
infraSortStyle("version"))),
-                rightCell(infraSortLabel("PORT", "port"), 7, 
infraSortStyle("port")),
                 Cell.from(Span.styled(infraSortLabel("STATUS", "status"), 
infraSortStyle("status"))),
+                rightCell(infraSortLabel("PORT", "port"), 7, 
infraSortStyle("port")),
+                Cell.from(Span.styled("UI", Style.EMPTY.bold())),
                 Cell.from(Span.styled("DESCRIPTION", Style.EMPTY.bold())));
 
         Table.Builder infraBuilder = Table.builder()
@@ -987,8 +992,9 @@ class OverviewTab extends AbstractTab {
                         Constraint.length(8),
                         Constraint.fill(),
                         Constraint.length(16),
-                        Constraint.length(7),
                         Constraint.length(10),
+                        Constraint.length(7),
+                        Constraint.length(26),
                         Constraint.fill())
                 .highlightSpacing(Table.HighlightSpacing.ALWAYS)
                 
.block(Block.builder().borderType(BorderType.ROUNDED).borders(Borders.ALL)
@@ -1016,6 +1022,14 @@ class OverviewTab extends AbstractTab {
         return "";
     }
 
+    private static String extractInfraUiUrl(InfraInfo info) {
+        Object url = info.properties.get("uiUrl");
+        if (url != null) {
+            return String.valueOf(url);
+        }
+        return "";
+    }
+
     @Override
     public void renderFooter(List<Span> spans) {
         hint(spans, "q", "quit");

Reply via email to