From 2f5652fc18b2860192723106b2d3096ca84fed48 Mon Sep 17 00:00:00 2001 From: Amardeepsingh Siglani Date: Thu, 7 Sep 2023 15:15:53 -0700 Subject: [PATCH] Minor UI updates for correlations page (#712) * minor UI updates Signed-off-by: Amardeepsingh Siglani * add loading state on node click Signed-off-by: Amardeepsingh Siglani --------- Signed-off-by: Amardeepsingh Siglani --- .../pages/Correlations/containers/CorrelationsContainer.tsx | 5 +++-- public/store/CorrelationsStore.ts | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/public/pages/Correlations/containers/CorrelationsContainer.tsx b/public/pages/Correlations/containers/CorrelationsContainer.tsx index 7fd1f5b55..3ef67cfe0 100644 --- a/public/pages/Correlations/containers/CorrelationsContainer.tsx +++ b/public/pages/Correlations/containers/CorrelationsContainer.tsx @@ -219,13 +219,14 @@ export class Correlations extends React.Component -

Correlated Findings()

+

Correlated Findings ({findingCardsData.correlatedFindings.length})

Higher correlation score indicated stronger correlation. diff --git a/public/store/CorrelationsStore.ts b/public/store/CorrelationsStore.ts index f19e5402d..ba2a53240 100644 --- a/public/store/CorrelationsStore.ts +++ b/public/store/CorrelationsStore.ts @@ -271,7 +271,7 @@ export class CorrelationsStore implements ICorrelationsStore { const correlatedFindings = response.response.findings.map((f) => { return { ...allFindings[f.finding], - correlationScore: f.score.toExponential(2), + correlationScore: f.score < 0.01 ? '0.01' : f.score.toFixed(2), }; }); return {