feat: combine process diagram and processor table into toggled card
Dashboard L3 now shows a single Processor Metrics card with Diagram/Table toggle buttons. The diagram shows native tooltips on hover with full processor metrics (avg, p99, invocations, error rate, % time). Also fixes: - Chart x-axis uses actual timestamps instead of bucket indices - formatDurationShort uses locale formatting with max 3 decimals Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -102,6 +102,18 @@ export function DiagramNode({
|
||||
style={{ cursor: 'pointer' }}
|
||||
opacity={isSkipped ? 0.35 : undefined}
|
||||
>
|
||||
{/* Processor metrics tooltip */}
|
||||
{heatmapEntry && (
|
||||
<title>{[
|
||||
`${node.id}${heatmapEntry.processorType ? ` (${heatmapEntry.processorType})` : ''}`,
|
||||
`Avg: ${heatmapEntry.avgDurationMs.toLocaleString(undefined, { maximumFractionDigits: 3 })}ms`,
|
||||
`P99: ${heatmapEntry.p99DurationMs.toLocaleString(undefined, { maximumFractionDigits: 3 })}ms`,
|
||||
`Time: ${heatmapEntry.pctOfRoute.toFixed(1)}%`,
|
||||
heatmapEntry.totalCount != null ? `Invocations: ${heatmapEntry.totalCount.toLocaleString()}` : '',
|
||||
heatmapEntry.errorRate != null ? `Errors: ${(heatmapEntry.errorRate * 100).toFixed(2)}%` : '',
|
||||
].filter(Boolean).join('\n')}</title>
|
||||
)}
|
||||
|
||||
{/* Selection ring */}
|
||||
{isSelected && (
|
||||
<rect
|
||||
|
||||
@@ -21,6 +21,10 @@ export interface LatencyHeatmapEntry {
|
||||
p99DurationMs: number;
|
||||
/** Percentage of total route time this processor consumes (0-100) */
|
||||
pctOfRoute: number;
|
||||
/** Additional fields for diagram tooltip (optional — populated by dashboard) */
|
||||
processorType?: string;
|
||||
totalCount?: number;
|
||||
errorRate?: number;
|
||||
}
|
||||
|
||||
export interface ProcessDiagramProps {
|
||||
|
||||
Reference in New Issue
Block a user