|
@@ -10,7 +10,7 @@ interface NodeProps {
|
|
|
level: number;
|
|
level: number;
|
|
|
highlightLeafNames: Set<string> | null; // null = no filter active
|
|
highlightLeafNames: Set<string> | null; // null = no filter active
|
|
|
subtreeHighlightNodeIds: Set<string> | null;
|
|
subtreeHighlightNodeIds: Set<string> | null;
|
|
|
- sourceNodeNames: Set<string> | null;
|
|
|
|
|
|
|
+ sourceNodeIds: Set<string> | null;
|
|
|
nodeMetricsMap: Record<string, { reqCount: number; procCount: number; capCount: number; toolCount: number; nodeCount: number }>;
|
|
nodeMetricsMap: Record<string, { reqCount: number; procCount: number; capCount: number; toolCount: number; nodeCount: number }>;
|
|
|
dimensionColor: string; // hex color for the node's dimension
|
|
dimensionColor: string; // hex color for the node's dimension
|
|
|
focusedTreeNodeId?: string | number | null;
|
|
focusedTreeNodeId?: string | number | null;
|
|
@@ -24,7 +24,7 @@ function nodeHasHighlightedLeaf(node: any, highlightLeafNames: Set<string> | nul
|
|
|
return node.children.some((child: any) => nodeHasHighlightedLeaf(child, highlightLeafNames));
|
|
return node.children.some((child: any) => nodeHasHighlightedLeaf(child, highlightLeafNames));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-function HorizontalTreeNode({ node, onSelect, selectedId, level, highlightLeafNames, subtreeHighlightNodeIds, sourceNodeNames, nodeMetricsMap, dimensionColor, focusedTreeNodeId = null }: NodeProps) {
|
|
|
|
|
|
|
+function HorizontalTreeNode({ node, onSelect, selectedId, level, highlightLeafNames, subtreeHighlightNodeIds, sourceNodeIds, nodeMetricsMap, dimensionColor, focusedTreeNodeId = null }: NodeProps) {
|
|
|
const [expanded, setExpanded] = useState(true);
|
|
const [expanded, setExpanded] = useState(true);
|
|
|
const [hoveredMetric, setHoveredMetric] = useState<null | { key: string; count: number; colorClass: string; x: number; y: number }>(null);
|
|
const [hoveredMetric, setHoveredMetric] = useState<null | { key: string; count: number; colorClass: string; x: number; y: number }>(null);
|
|
|
const hasChildren = node.children && node.children.length > 0;
|
|
const hasChildren = node.children && node.children.length > 0;
|
|
@@ -36,7 +36,7 @@ function HorizontalTreeNode({ node, onSelect, selectedId, level, highlightLeafNa
|
|
|
const inHighlight = nodeHasHighlightedLeaf(node, highlightLeafNames);
|
|
const inHighlight = nodeHasHighlightedLeaf(node, highlightLeafNames);
|
|
|
const isLeafHighlighted = highlightLeafNames && highlightLeafNames.has(node.name);
|
|
const isLeafHighlighted = highlightLeafNames && highlightLeafNames.has(node.name);
|
|
|
const isInSubtreeHighlight = subtreeHighlightNodeIds?.has(String(node.id)) ?? false;
|
|
const isInSubtreeHighlight = subtreeHighlightNodeIds?.has(String(node.id)) ?? false;
|
|
|
- const isSourceNode = sourceNodeNames?.has(node.name) ?? false;
|
|
|
|
|
|
|
+ const isSourceNode = sourceNodeIds?.has(String(node.id)) ?? false;
|
|
|
const isSelected =
|
|
const isSelected =
|
|
|
selectedId !== null &&
|
|
selectedId !== null &&
|
|
|
selectedId !== undefined &&
|
|
selectedId !== undefined &&
|
|
@@ -141,7 +141,7 @@ function HorizontalTreeNode({ node, onSelect, selectedId, level, highlightLeafNa
|
|
|
level={level + 1}
|
|
level={level + 1}
|
|
|
highlightLeafNames={highlightLeafNames}
|
|
highlightLeafNames={highlightLeafNames}
|
|
|
subtreeHighlightNodeIds={subtreeHighlightNodeIds}
|
|
subtreeHighlightNodeIds={subtreeHighlightNodeIds}
|
|
|
- sourceNodeNames={sourceNodeNames}
|
|
|
|
|
|
|
+ sourceNodeIds={sourceNodeIds}
|
|
|
nodeMetricsMap={nodeMetricsMap}
|
|
nodeMetricsMap={nodeMetricsMap}
|
|
|
dimensionColor={dimensionColor}
|
|
dimensionColor={dimensionColor}
|
|
|
focusedTreeNodeId={focusedTreeNodeId}
|
|
focusedTreeNodeId={focusedTreeNodeId}
|
|
@@ -169,7 +169,7 @@ export function CategoryTree({
|
|
|
selectedId,
|
|
selectedId,
|
|
|
highlightLeafNames = null,
|
|
highlightLeafNames = null,
|
|
|
subtreeHighlightNodeIds = null,
|
|
subtreeHighlightNodeIds = null,
|
|
|
- sourceNodeNames = null,
|
|
|
|
|
|
|
+ sourceNodeIds = null,
|
|
|
nodeMetricsMap = {},
|
|
nodeMetricsMap = {},
|
|
|
filterLabel,
|
|
filterLabel,
|
|
|
onClearFilter,
|
|
onClearFilter,
|
|
@@ -187,7 +187,7 @@ export function CategoryTree({
|
|
|
selectedId: any;
|
|
selectedId: any;
|
|
|
highlightLeafNames?: Set<string> | null;
|
|
highlightLeafNames?: Set<string> | null;
|
|
|
subtreeHighlightNodeIds?: Set<string> | null;
|
|
subtreeHighlightNodeIds?: Set<string> | null;
|
|
|
- sourceNodeNames?: Set<string> | null;
|
|
|
|
|
|
|
+ sourceNodeIds?: Set<string> | null;
|
|
|
nodeMetricsMap?: Record<string, { reqCount: number; procCount: number; capCount: number; toolCount: number; nodeCount: number }>;
|
|
nodeMetricsMap?: Record<string, { reqCount: number; procCount: number; capCount: number; toolCount: number; nodeCount: number }>;
|
|
|
filterLabel?: string | null;
|
|
filterLabel?: string | null;
|
|
|
onClearFilter?: () => void;
|
|
onClearFilter?: () => void;
|
|
@@ -313,7 +313,7 @@ export function CategoryTree({
|
|
|
level={1}
|
|
level={1}
|
|
|
highlightLeafNames={highlightLeafNames}
|
|
highlightLeafNames={highlightLeafNames}
|
|
|
subtreeHighlightNodeIds={subtreeHighlightNodeIds}
|
|
subtreeHighlightNodeIds={subtreeHighlightNodeIds}
|
|
|
- sourceNodeNames={sourceNodeNames}
|
|
|
|
|
|
|
+ sourceNodeIds={sourceNodeIds}
|
|
|
nodeMetricsMap={nodeMetricsMap}
|
|
nodeMetricsMap={nodeMetricsMap}
|
|
|
dimensionColor={color.hex}
|
|
dimensionColor={color.hex}
|
|
|
focusedTreeNodeId={focusedTreeNodeId}
|
|
focusedTreeNodeId={focusedTreeNodeId}
|