Compare commits
4 Commits
b7a107d33f
...
88b9faa4f8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
88b9faa4f8 | ||
|
|
59de424ab9 | ||
|
|
d02fa73080 | ||
|
|
f04e77788e |
@@ -204,7 +204,7 @@ public class ClickHouseExecutionStore implements ExecutionStore {
|
|||||||
@Override
|
@Override
|
||||||
public Optional<ExecutionRecord> findById(String executionId) {
|
public Optional<ExecutionRecord> findById(String executionId) {
|
||||||
List<ExecutionRecord> results = jdbc.query("""
|
List<ExecutionRecord> results = jdbc.query("""
|
||||||
SELECT execution_id, route_id, instance_id, application_id, status,
|
SELECT execution_id, route_id, instance_id, application_id, environment, status,
|
||||||
correlation_id, exchange_id, start_time, end_time, duration_ms,
|
correlation_id, exchange_id, start_time, end_time, duration_ms,
|
||||||
error_message, error_stacktrace, diagram_content_hash, engine_level,
|
error_message, error_stacktrace, diagram_content_hash, engine_level,
|
||||||
input_body, output_body, input_headers, output_headers,
|
input_body, output_body, input_headers, output_headers,
|
||||||
@@ -304,6 +304,7 @@ public class ClickHouseExecutionStore implements ExecutionStore {
|
|||||||
emptyToNull(rs.getString("route_id")),
|
emptyToNull(rs.getString("route_id")),
|
||||||
emptyToNull(rs.getString("instance_id")),
|
emptyToNull(rs.getString("instance_id")),
|
||||||
emptyToNull(rs.getString("application_id")),
|
emptyToNull(rs.getString("application_id")),
|
||||||
|
emptyToNull(rs.getString("environment")),
|
||||||
emptyToNull(rs.getString("status")),
|
emptyToNull(rs.getString("status")),
|
||||||
emptyToNull(rs.getString("correlation_id")),
|
emptyToNull(rs.getString("correlation_id")),
|
||||||
emptyToNull(rs.getString("exchange_id")),
|
emptyToNull(rs.getString("exchange_id")),
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ public class DetailService {
|
|||||||
}
|
}
|
||||||
return new ExecutionDetail(
|
return new ExecutionDetail(
|
||||||
exec.executionId(), exec.routeId(), exec.instanceId(),
|
exec.executionId(), exec.routeId(), exec.instanceId(),
|
||||||
exec.applicationId(),
|
exec.applicationId(), exec.environment(),
|
||||||
exec.status(), exec.startTime(), exec.endTime(),
|
exec.status(), exec.startTime(), exec.endTime(),
|
||||||
exec.durationMs() != null ? exec.durationMs() : 0L,
|
exec.durationMs() != null ? exec.durationMs() : 0L,
|
||||||
exec.correlationId(), exec.exchangeId(),
|
exec.correlationId(), exec.exchangeId(),
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import java.util.Map;
|
|||||||
* @param executionId unique execution identifier
|
* @param executionId unique execution identifier
|
||||||
* @param routeId Camel route ID
|
* @param routeId Camel route ID
|
||||||
* @param instanceId agent instance that reported the execution
|
* @param instanceId agent instance that reported the execution
|
||||||
|
* @param environment environment slug this exchange was recorded in
|
||||||
* @param status execution status (COMPLETED, FAILED, RUNNING)
|
* @param status execution status (COMPLETED, FAILED, RUNNING)
|
||||||
* @param startTime execution start time
|
* @param startTime execution start time
|
||||||
* @param endTime execution end time (may be null for RUNNING)
|
* @param endTime execution end time (may be null for RUNNING)
|
||||||
@@ -33,6 +34,7 @@ public record ExecutionDetail(
|
|||||||
String routeId,
|
String routeId,
|
||||||
String instanceId,
|
String instanceId,
|
||||||
String applicationId,
|
String applicationId,
|
||||||
|
String environment,
|
||||||
String status,
|
String status,
|
||||||
Instant startTime,
|
Instant startTime,
|
||||||
Instant endTime,
|
Instant endTime,
|
||||||
|
|||||||
@@ -114,6 +114,7 @@ public class IngestionService {
|
|||||||
|
|
||||||
return new ExecutionRecord(
|
return new ExecutionRecord(
|
||||||
exec.getExchangeId(), exec.getRouteId(), instanceId, applicationId,
|
exec.getExchangeId(), exec.getRouteId(), instanceId, applicationId,
|
||||||
|
null, // environment: legacy PG path; ClickHouse path uses MergedExecution with env resolved from registry
|
||||||
exec.getStatus() != null ? exec.getStatus().name() : "RUNNING",
|
exec.getStatus() != null ? exec.getStatus().name() : "RUNNING",
|
||||||
exec.getCorrelationId(), exec.getExchangeId(),
|
exec.getCorrelationId(), exec.getExchangeId(),
|
||||||
exec.getStartTime(), exec.getEndTime(),
|
exec.getStartTime(), exec.getEndTime(),
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ public interface ExecutionStore {
|
|||||||
|
|
||||||
record ExecutionRecord(
|
record ExecutionRecord(
|
||||||
String executionId, String routeId, String instanceId, String applicationId,
|
String executionId, String routeId, String instanceId, String applicationId,
|
||||||
|
String environment,
|
||||||
String status, String correlationId, String exchangeId,
|
String status, String correlationId, String exchangeId,
|
||||||
Instant startTime, Instant endTime, Long durationMs,
|
Instant startTime, Instant endTime, Long durationMs,
|
||||||
String errorMessage, String errorStacktrace, String diagramContentHash,
|
String errorMessage, String errorStacktrace, String diagramContentHash,
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
"lint": "eslint .",
|
"lint": "eslint .",
|
||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
"generate-api": "openapi-typescript src/api/openapi.json -o src/api/schema.d.ts",
|
"generate-api": "openapi-typescript src/api/openapi.json -o src/api/schema.d.ts",
|
||||||
"generate-api:live": "curl -s http://localhost:8081/api/v1/api-docs -o src/api/openapi.json && openapi-typescript src/api/openapi.json -o src/api/schema.d.ts",
|
"generate-api:live": "curl -s http://192.168.50.86:30090/api/v1/api-docs -o src/api/openapi.json && openapi-typescript src/api/openapi.json -o src/api/schema.d.ts",
|
||||||
"postinstall": "node -e \"const fs=require('fs');fs.mkdirSync('public',{recursive:true});fs.copyFileSync('node_modules/@cameleer/design-system/assets/cameleer-logo.svg','public/favicon.svg')\""
|
"postinstall": "node -e \"const fs=require('fs');fs.mkdirSync('public',{recursive:true});fs.copyFileSync('node_modules/@cameleer/design-system/assets/cameleer-logo.svg','public/favicon.svg')\""
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
3622
ui/src/api/schema.d.ts
vendored
3622
ui/src/api/schema.d.ts
vendored
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,9 @@
|
|||||||
import type { components } from '../../api/schema';
|
import type { components } from '../../api/schema';
|
||||||
|
|
||||||
export type ExecutionDetail = components['schemas']['ExecutionDetail'];
|
export type ExecutionDetail = components['schemas']['ExecutionDetail'] & {
|
||||||
|
/** Environment slug this exchange was recorded in. Added to the backend record; schema.d.ts will pick it up on next openapi regen. */
|
||||||
|
environment?: string;
|
||||||
|
};
|
||||||
export type ProcessorNode = components['schemas']['ProcessorNode'];
|
export type ProcessorNode = components['schemas']['ProcessorNode'];
|
||||||
|
|
||||||
export interface NodeExecutionState {
|
export interface NodeExecutionState {
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import { useCorrelationChain } from '../../api/queries/correlation';
|
|||||||
import { useAgents } from '../../api/queries/agents';
|
import { useAgents } from '../../api/queries/agents';
|
||||||
import { useCatalog } from '../../api/queries/catalog';
|
import { useCatalog } from '../../api/queries/catalog';
|
||||||
import { useCanControl } from '../../auth/auth-store';
|
import { useCanControl } from '../../auth/auth-store';
|
||||||
|
import { useEnvironmentStore } from '../../api/environment-store';
|
||||||
import type { ExecutionDetail } from '../../components/ExecutionDiagram/types';
|
import type { ExecutionDetail } from '../../components/ExecutionDiagram/types';
|
||||||
import { attributeBadgeColor } from '../../utils/attribute-color';
|
import { attributeBadgeColor } from '../../utils/attribute-color';
|
||||||
import { formatDuration, statusLabel } from '../../utils/format-utils';
|
import { formatDuration, statusLabel } from '../../utils/format-utils';
|
||||||
@@ -32,7 +33,12 @@ function statusVariant(s: string): StatusVariant {
|
|||||||
export function ExchangeHeader({ detail, onCorrelatedSelect, onClearSelection }: ExchangeHeaderProps) {
|
export function ExchangeHeader({ detail, onCorrelatedSelect, onClearSelection }: ExchangeHeaderProps) {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const { timeRange } = useGlobalFilters();
|
const { timeRange } = useGlobalFilters();
|
||||||
const { data: chainResult } = useCorrelationChain(detail.correlationId ?? null);
|
const storeEnv = useEnvironmentStore((s) => s.environment);
|
||||||
|
// Prefer the exchange's own env over the selected env — correlated exchanges
|
||||||
|
// always live in the same env as the one being viewed, and the user may have
|
||||||
|
// switched env-picker after opening this detail.
|
||||||
|
const environment = detail.environment ?? storeEnv;
|
||||||
|
const { data: chainResult } = useCorrelationChain(detail.correlationId ?? null, environment);
|
||||||
const chain = chainResult?.data;
|
const chain = chainResult?.data;
|
||||||
const showChain = chain && chain.length > 1;
|
const showChain = chain && chain.length > 1;
|
||||||
const attrs = Object.entries(detail.attributes ?? {});
|
const attrs = Object.entries(detail.attributes ?? {});
|
||||||
|
|||||||
Reference in New Issue
Block a user