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/05/18 14:52:15 UTC
(camel) 25/39: TUI: fall back to nodeLabel when first-event has no endpointUri
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch feat/camel-tui
in repository https://gitbox.apache.org/repos/asf/camel.git
commit de928bbab73a0385dd62a1f261c8ef59ace3dfeb
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon May 18 12:53:54 2026 +0200
TUI: fall back to nodeLabel when first-event has no endpointUri
Real route first-events carry an endpointUri (the from() endpoint) so they
render as from[platform-http:/...]. Synthetic first-events (e.g. rest-openapi
mock mode) have no endpointUri, previously producing from[]. Fall back to
nodeLabel so they display as mock:GET:/path instead.
Co-Authored-By: Claude Sonnet 4.6 <no...@anthropic.com>
---
.../camel/dsl/jbang/core/commands/tui/CamelMonitor.java | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/CamelMonitor.java b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/CamelMonitor.java
index dc5d88cfb91b..caa8bca23788 100644
--- a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/CamelMonitor.java
+++ b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/CamelMonitor.java
@@ -4891,7 +4891,11 @@ public class CamelMonitor extends CamelCommand {
if (entry.first) {
entry.direction = "-->";
String uri = json.getString("endpointUri");
- entry.processor = indent + "from[" + (uri != null ? uri : "") + "]";
+ if (uri != null) {
+ entry.processor = indent + "from[" + uri + "]";
+ } else {
+ entry.processor = indent + (entry.nodeLabel != null ? entry.nodeLabel : "");
+ }
} else if (entry.last) {
entry.direction = "<--";
entry.processor = indent + (entry.nodeLabel != null ? entry.nodeLabel : "");
@@ -5003,7 +5007,11 @@ public class CamelMonitor extends CamelCommand {
String indent = " ".repeat(entry.nodeLevel);
if (entry.first) {
String uri = json.getString("endpointUri");
- entry.processor = indent + "from[" + (uri != null ? uri : "") + "]";
+ if (uri != null) {
+ entry.processor = indent + "from[" + uri + "]";
+ } else {
+ entry.processor = indent + (entry.nodeLabel != null ? entry.nodeLabel : "");
+ }
} else {
entry.processor = indent + (entry.nodeLabel != null ? entry.nodeLabel : "");
}