diff --git a/cameleer3-server-app/src/main/java/com/cameleer3/server/app/storage/PostgresExecutionStore.java b/cameleer3-server-app/src/main/java/com/cameleer3/server/app/storage/PostgresExecutionStore.java index 61de0828..b2086b08 100644 --- a/cameleer3-server-app/src/main/java/com/cameleer3/server/app/storage/PostgresExecutionStore.java +++ b/cameleer3-server-app/src/main/java/com/cameleer3/server/app/storage/PostgresExecutionStore.java @@ -73,8 +73,9 @@ public class PostgresExecutionStore implements ExecutionStore { application_name, route_id, depth, parent_processor_id, status, start_time, end_time, duration_ms, error_message, error_stacktrace, input_body, output_body, input_headers, output_headers, attributes, - loop_index, loop_size, split_index, split_size, multicast_index) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?::jsonb, ?::jsonb, ?::jsonb, ?, ?, ?, ?, ?) + loop_index, loop_size, split_index, split_size, multicast_index, + resolved_endpoint_uri) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?::jsonb, ?::jsonb, ?::jsonb, ?, ?, ?, ?, ?, ?) ON CONFLICT (execution_id, processor_id, start_time) DO UPDATE SET status = EXCLUDED.status, end_time = COALESCE(EXCLUDED.end_time, processor_executions.end_time), @@ -90,7 +91,8 @@ public class PostgresExecutionStore implements ExecutionStore { loop_size = COALESCE(EXCLUDED.loop_size, processor_executions.loop_size), split_index = COALESCE(EXCLUDED.split_index, processor_executions.split_index), split_size = COALESCE(EXCLUDED.split_size, processor_executions.split_size), - multicast_index = COALESCE(EXCLUDED.multicast_index, processor_executions.multicast_index) + multicast_index = COALESCE(EXCLUDED.multicast_index, processor_executions.multicast_index), + resolved_endpoint_uri = COALESCE(EXCLUDED.resolved_endpoint_uri, processor_executions.resolved_endpoint_uri) """, processors.stream().map(p -> new Object[]{ p.executionId(), p.processorId(), p.processorType(), @@ -102,7 +104,8 @@ public class PostgresExecutionStore implements ExecutionStore { p.inputBody(), p.outputBody(), p.inputHeaders(), p.outputHeaders(), p.attributes(), p.loopIndex(), p.loopSize(), p.splitIndex(), p.splitSize(), - p.multicastIndex() + p.multicastIndex(), + p.resolvedEndpointUri() }).toList()); } @@ -160,7 +163,8 @@ public class PostgresExecutionStore implements ExecutionStore { rs.getObject("loop_size") != null ? rs.getInt("loop_size") : null, rs.getObject("split_index") != null ? rs.getInt("split_index") : null, rs.getObject("split_size") != null ? rs.getInt("split_size") : null, - rs.getObject("multicast_index") != null ? rs.getInt("multicast_index") : null); + rs.getObject("multicast_index") != null ? rs.getInt("multicast_index") : null, + rs.getString("resolved_endpoint_uri")); private static Instant toInstant(ResultSet rs, String column) throws SQLException { Timestamp ts = rs.getTimestamp(column); diff --git a/cameleer3-server-app/src/main/resources/db/migration/V9__resolved_endpoint_uri.sql b/cameleer3-server-app/src/main/resources/db/migration/V9__resolved_endpoint_uri.sql new file mode 100644 index 00000000..e5ec1ea3 --- /dev/null +++ b/cameleer3-server-app/src/main/resources/db/migration/V9__resolved_endpoint_uri.sql @@ -0,0 +1 @@ +ALTER TABLE processor_executions ADD COLUMN resolved_endpoint_uri TEXT; diff --git a/cameleer3-server-core/src/main/java/com/cameleer3/server/core/detail/DetailService.java b/cameleer3-server-core/src/main/java/com/cameleer3/server/core/detail/DetailService.java index 236aafc8..339851d1 100644 --- a/cameleer3-server-core/src/main/java/com/cameleer3/server/core/detail/DetailService.java +++ b/cameleer3-server-core/src/main/java/com/cameleer3/server/core/detail/DetailService.java @@ -63,7 +63,8 @@ public class DetailService { parseAttributes(p.attributes()), p.loopIndex(), p.loopSize(), p.splitIndex(), p.splitSize(), - p.multicastIndex() + p.multicastIndex(), + p.resolvedEndpointUri() )); } diff --git a/cameleer3-server-core/src/main/java/com/cameleer3/server/core/detail/ProcessorNode.java b/cameleer3-server-core/src/main/java/com/cameleer3/server/core/detail/ProcessorNode.java index f071352d..b33dace8 100644 --- a/cameleer3-server-core/src/main/java/com/cameleer3/server/core/detail/ProcessorNode.java +++ b/cameleer3-server-core/src/main/java/com/cameleer3/server/core/detail/ProcessorNode.java @@ -27,6 +27,7 @@ public final class ProcessorNode { private final Integer splitIndex; private final Integer splitSize; private final Integer multicastIndex; + private final String resolvedEndpointUri; private final List children; public ProcessorNode(String processorId, String processorType, String status, @@ -35,7 +36,8 @@ public final class ProcessorNode { Map attributes, Integer loopIndex, Integer loopSize, Integer splitIndex, Integer splitSize, - Integer multicastIndex) { + Integer multicastIndex, + String resolvedEndpointUri) { this.processorId = processorId; this.processorType = processorType; this.status = status; @@ -50,6 +52,7 @@ public final class ProcessorNode { this.splitIndex = splitIndex; this.splitSize = splitSize; this.multicastIndex = multicastIndex; + this.resolvedEndpointUri = resolvedEndpointUri; this.children = new ArrayList<>(); } @@ -71,5 +74,6 @@ public final class ProcessorNode { public Integer getSplitIndex() { return splitIndex; } public Integer getSplitSize() { return splitSize; } public Integer getMulticastIndex() { return multicastIndex; } + public String getResolvedEndpointUri() { return resolvedEndpointUri; } public List getChildren() { return List.copyOf(children); } } diff --git a/cameleer3-server-core/src/main/java/com/cameleer3/server/core/ingestion/IngestionService.java b/cameleer3-server-core/src/main/java/com/cameleer3/server/core/ingestion/IngestionService.java index f07f67a4..4f67aa15 100644 --- a/cameleer3-server-core/src/main/java/com/cameleer3/server/core/ingestion/IngestionService.java +++ b/cameleer3-server-core/src/main/java/com/cameleer3/server/core/ingestion/IngestionService.java @@ -131,7 +131,8 @@ public class IngestionService { toJson(p.getAttributes()), p.getLoopIndex(), p.getLoopSize(), p.getSplitIndex(), p.getSplitSize(), - p.getMulticastIndex() + p.getMulticastIndex(), + p.getResolvedEndpointUri() )); if (p.getChildren() != null) { flat.addAll(flattenProcessors( diff --git a/cameleer3-server-core/src/main/java/com/cameleer3/server/core/storage/ExecutionStore.java b/cameleer3-server-core/src/main/java/com/cameleer3/server/core/storage/ExecutionStore.java index 181dd8f9..2f89074b 100644 --- a/cameleer3-server-core/src/main/java/com/cameleer3/server/core/storage/ExecutionStore.java +++ b/cameleer3-server-core/src/main/java/com/cameleer3/server/core/storage/ExecutionStore.java @@ -38,6 +38,7 @@ public interface ExecutionStore { String attributes, Integer loopIndex, Integer loopSize, Integer splitIndex, Integer splitSize, - Integer multicastIndex + Integer multicastIndex, + String resolvedEndpointUri ) {} } diff --git a/ui/src/api/schema.d.ts b/ui/src/api/schema.d.ts index 43de9ef7..62921ddb 100644 --- a/ui/src/api/schema.d.ts +++ b/ui/src/api/schema.d.ts @@ -1652,6 +1652,7 @@ export interface components { attributes: { [key: string]: string; }; + resolvedEndpointUri?: string; children: components["schemas"]["ProcessorNode"][]; }; DiagramLayout: { @@ -1680,6 +1681,7 @@ export interface components { width?: number; /** Format: double */ height?: number; + endpointUri?: string; }; /** @description OIDC configuration for SPA login flow */ OidcPublicConfigResponse: {