refactor: remove diagramNodeId indirection, use processorId directly
Agent now uses Camel processorId as RouteNode.id, eliminating the nodeId mapping layer. Drop diagram_node_id column (V6 migration), remove from ProcessorRecord/ProcessorNode/IngestionService/DetailService, add /processor-routes endpoint for processorId→routeId lookup, simplify frontend diagram-mapping and ExchangeDetail overlays, replace N diagram fetches in AppConfigPage with single hook. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -47,7 +47,7 @@ public class DetailService {
|
||||
p.processorId(), p.processorType(), p.status(),
|
||||
p.startTime(), p.endTime(),
|
||||
p.durationMs() != null ? p.durationMs() : 0L,
|
||||
p.diagramNodeId(), p.errorMessage(), p.errorStacktrace(),
|
||||
p.errorMessage(), p.errorStacktrace(),
|
||||
parseAttributes(p.attributes())
|
||||
));
|
||||
}
|
||||
|
||||
@@ -19,7 +19,6 @@ public final class ProcessorNode {
|
||||
private final Instant startTime;
|
||||
private final Instant endTime;
|
||||
private final long durationMs;
|
||||
private final String diagramNodeId;
|
||||
private final String errorMessage;
|
||||
private final String errorStackTrace;
|
||||
private final Map<String, String> attributes;
|
||||
@@ -27,7 +26,7 @@ public final class ProcessorNode {
|
||||
|
||||
public ProcessorNode(String processorId, String processorType, String status,
|
||||
Instant startTime, Instant endTime, long durationMs,
|
||||
String diagramNodeId, String errorMessage, String errorStackTrace,
|
||||
String errorMessage, String errorStackTrace,
|
||||
Map<String, String> attributes) {
|
||||
this.processorId = processorId;
|
||||
this.processorType = processorType;
|
||||
@@ -35,7 +34,6 @@ public final class ProcessorNode {
|
||||
this.startTime = startTime;
|
||||
this.endTime = endTime;
|
||||
this.durationMs = durationMs;
|
||||
this.diagramNodeId = diagramNodeId;
|
||||
this.errorMessage = errorMessage;
|
||||
this.errorStackTrace = errorStackTrace;
|
||||
this.attributes = attributes;
|
||||
@@ -52,7 +50,6 @@ public final class ProcessorNode {
|
||||
public Instant getStartTime() { return startTime; }
|
||||
public Instant getEndTime() { return endTime; }
|
||||
public long getDurationMs() { return durationMs; }
|
||||
public String getDiagramNodeId() { return diagramNodeId; }
|
||||
public String getErrorMessage() { return errorMessage; }
|
||||
public String getErrorStackTrace() { return errorStackTrace; }
|
||||
public Map<String, String> getAttributes() { return attributes; }
|
||||
|
||||
@@ -119,7 +119,7 @@ public class IngestionService {
|
||||
for (ProcessorExecution p : processors) {
|
||||
flat.add(new ProcessorRecord(
|
||||
executionId, p.getProcessorId(), p.getProcessorType(),
|
||||
p.getDiagramNodeId(), applicationName, routeId,
|
||||
applicationName, routeId,
|
||||
depth, parentProcessorId,
|
||||
p.getStatus() != null ? p.getStatus().name() : "RUNNING",
|
||||
p.getStartTime() != null ? p.getStartTime() : execStartTime,
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.cameleer3.server.core.storage;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
public interface ExecutionStore {
|
||||
@@ -16,6 +17,8 @@ public interface ExecutionStore {
|
||||
|
||||
List<ProcessorRecord> findProcessors(String executionId);
|
||||
|
||||
Map<String, String> findProcessorRouteMapping(String applicationName);
|
||||
|
||||
record ExecutionRecord(
|
||||
String executionId, String routeId, String agentId, String applicationName,
|
||||
String status, String correlationId, String exchangeId,
|
||||
@@ -28,7 +31,7 @@ public interface ExecutionStore {
|
||||
|
||||
record ProcessorRecord(
|
||||
String executionId, String processorId, String processorType,
|
||||
String diagramNodeId, String applicationName, String routeId,
|
||||
String applicationName, String routeId,
|
||||
int depth, String parentProcessorId, String status,
|
||||
Instant startTime, Instant endTime, Long durationMs,
|
||||
String errorMessage, String errorStacktrace,
|
||||
|
||||
Reference in New Issue
Block a user