fix(ui): correlated exchange click updates local state instead of navigating
All checks were successful
CI / cleanup-branch (push) Has been skipped
CI / build (push) Successful in 55s
CI / docker (push) Successful in 53s
CI / deploy-feature (push) Has been skipped
CI / deploy (push) Successful in 37s

This commit is contained in:
hsiegeln
2026-03-28 15:26:01 +01:00
parent 3d86d57a80
commit d32bde58e2
2 changed files with 12 additions and 5 deletions

View File

@@ -9,6 +9,7 @@ import styles from './ExchangeHeader.module.css';
interface ExchangeHeaderProps {
detail: ExecutionDetail;
onCorrelatedSelect?: (executionId: string, applicationName: string, routeId: string) => void;
}
type StatusVariant = 'success' | 'error' | 'running' | 'warning';
@@ -37,7 +38,7 @@ function formatDuration(ms: number): string {
return `${ms}ms`;
}
export function ExchangeHeader({ detail }: ExchangeHeaderProps) {
export function ExchangeHeader({ detail, onCorrelatedSelect }: ExchangeHeaderProps) {
const navigate = useNavigate();
const { data: chainResult } = useCorrelationChain(detail.correlationId ?? null);
const chain = chainResult?.data;
@@ -106,8 +107,8 @@ export function ExchangeHeader({ detail }: ExchangeHeaderProps) {
<button
className={`${styles.chainNode} ${statusCls} ${isCurrent ? styles.chainNodeCurrent : ''}`}
onClick={() => {
if (!isCurrent) {
navigate(`/exchanges/${ce.applicationName ?? detail.applicationName}/${ce.routeId}/${ce.executionId}`);
if (!isCurrent && onCorrelatedSelect) {
onCorrelatedSelect(ce.executionId, ce.applicationName ?? detail.applicationName, ce.routeId);
}
}}
title={`${ce.executionId}\n${ce.routeId} \u2014 ${formatDuration(ce.durationMs)}`}