From f1a6daa1d7c7e1492584e2c7076104fc4d71b7eb Mon Sep 17 00:00:00 2001 From: Coleman Kane Date: Wed, 4 Dec 2024 08:54:08 -0500 Subject: [PATCH] [graph] Hide filtered nodes/edges in correlation graphs Right now, these are simply greyed out as "disabled". However, when we filter items from the correlation graphs, we want it to "clean up" the graph. So, hide the affected nodes+edges from view so we can explore just the correlated items we include in the filters. --- opencti-platform/opencti-front/src/utils/Graph.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencti-platform/opencti-front/src/utils/Graph.js b/opencti-platform/opencti-front/src/utils/Graph.js index 57513a98d331..1a56d2557f19 100644 --- a/opencti-platform/opencti-front/src/utils/Graph.js +++ b/opencti-platform/opencti-front/src/utils/Graph.js @@ -477,7 +477,10 @@ export const buildCorrelationData = ( filterAdjust.markedBy, filterAdjust.createdBy, ); - const thisReportNodes = thisReportOriginalNodes.map((n) => R.assoc('disabled', filteredNodesIds.includes(n.id), n)); + const thisReportNodes = R.filter( + (n) => !filteredNodesIds.includes(n.id), + thisReportOriginalNodes, + ); const thisReportLinkNodes = R.filter( (n) => n[key] && n.parent_types && n[key].edges.length > 1, thisReportNodes,