fix(ui): correlated exchange click updates local state instead of navigating
This commit is contained in:
@@ -22,6 +22,10 @@ export default function ExchangesPage() {
|
||||
setSelected(exchange);
|
||||
}, []);
|
||||
|
||||
const handleCorrelatedSelect = useCallback((executionId: string, applicationName: string, routeId: string) => {
|
||||
setSelected({ executionId, applicationName, routeId });
|
||||
}, []);
|
||||
|
||||
const handleSplitterDown = useCallback((e: React.PointerEvent) => {
|
||||
e.currentTarget.setPointerCapture(e.pointerId);
|
||||
const container = containerRef.current;
|
||||
@@ -57,6 +61,7 @@ export default function ExchangesPage() {
|
||||
appId={selected.applicationName}
|
||||
routeId={selected.routeId}
|
||||
exchangeId={selected.executionId}
|
||||
onCorrelatedSelect={handleCorrelatedSelect}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -69,9 +74,10 @@ interface DiagramPanelProps {
|
||||
appId: string;
|
||||
routeId: string;
|
||||
exchangeId: string;
|
||||
onCorrelatedSelect: (executionId: string, applicationName: string, routeId: string) => void;
|
||||
}
|
||||
|
||||
function DiagramPanel({ appId, routeId, exchangeId }: DiagramPanelProps) {
|
||||
function DiagramPanel({ appId, routeId, exchangeId, onCorrelatedSelect }: DiagramPanelProps) {
|
||||
const navigate = useNavigate();
|
||||
const { timeRange } = useGlobalFilters();
|
||||
const timeFrom = timeRange.start.toISOString();
|
||||
@@ -101,7 +107,7 @@ function DiagramPanel({ appId, routeId, exchangeId }: DiagramPanelProps) {
|
||||
if (detail) {
|
||||
return (
|
||||
<>
|
||||
<ExchangeHeader detail={detail} />
|
||||
<ExchangeHeader detail={detail} onCorrelatedSelect={onCorrelatedSelect} />
|
||||
<ExecutionDiagram
|
||||
executionId={exchangeId}
|
||||
executionDetail={detail}
|
||||
|
||||
Reference in New Issue
Block a user