From ea3f2c3f0c6b355eb2f56e700da0d69cfc26cfca Mon Sep 17 00:00:00 2001 From: Ece Ozalp Date: Fri, 19 Nov 2021 14:28:08 -0500 Subject: [PATCH 1/3] updates host risk score decimal count --- .../overview_risky_host_links/risky_hosts_panel_view.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/x-pack/plugins/security_solution/public/overview/components/overview_risky_host_links/risky_hosts_panel_view.tsx b/x-pack/plugins/security_solution/public/overview/components/overview_risky_host_links/risky_hosts_panel_view.tsx index 84864902f75d3..d6673d8a0a508 100644 --- a/x-pack/plugins/security_solution/public/overview/components/overview_risky_host_links/risky_hosts_panel_view.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/overview_risky_host_links/risky_hosts_panel_view.tsx @@ -30,6 +30,7 @@ const columns: Array> = [ align: 'right', field: 'count', name: 'Risk Score', + render: (riskScore) => (isNaN(riskScore) ? riskScore : riskScore.toFixed(2)), sortable: true, truncateText: true, width: '15%', From 0bf89bed5e6bd0f7e11dfc6ddf76a6958a49688d Mon Sep 17 00:00:00 2001 From: Ece Ozalp Date: Fri, 19 Nov 2021 15:17:04 -0500 Subject: [PATCH 2/3] fix function --- .../overview_risky_host_links/risky_hosts_panel_view.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugins/security_solution/public/overview/components/overview_risky_host_links/risky_hosts_panel_view.tsx b/x-pack/plugins/security_solution/public/overview/components/overview_risky_host_links/risky_hosts_panel_view.tsx index d6673d8a0a508..2d7e46b0252a3 100644 --- a/x-pack/plugins/security_solution/public/overview/components/overview_risky_host_links/risky_hosts_panel_view.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/overview_risky_host_links/risky_hosts_panel_view.tsx @@ -30,7 +30,7 @@ const columns: Array> = [ align: 'right', field: 'count', name: 'Risk Score', - render: (riskScore) => (isNaN(riskScore) ? riskScore : riskScore.toFixed(2)), + render: (riskScore) => (isNaN(riskScore) ? riskScore : Number.parseFloat(riskScore).toFixed(2)), sortable: true, truncateText: true, width: '15%', From 63b582a00e075e157c87c2930e1b639388a5df75 Mon Sep 17 00:00:00 2001 From: Ece Ozalp Date: Mon, 29 Nov 2021 10:29:15 -0500 Subject: [PATCH 3/3] changes isNaN to Number.isNaN --- .../overview_risky_host_links/risky_hosts_panel_view.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/security_solution/public/overview/components/overview_risky_host_links/risky_hosts_panel_view.tsx b/x-pack/plugins/security_solution/public/overview/components/overview_risky_host_links/risky_hosts_panel_view.tsx index 2d7e46b0252a3..5f89f261e4246 100644 --- a/x-pack/plugins/security_solution/public/overview/components/overview_risky_host_links/risky_hosts_panel_view.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/overview_risky_host_links/risky_hosts_panel_view.tsx @@ -30,7 +30,8 @@ const columns: Array> = [ align: 'right', field: 'count', name: 'Risk Score', - render: (riskScore) => (isNaN(riskScore) ? riskScore : Number.parseFloat(riskScore).toFixed(2)), + render: (riskScore) => + Number.isNaN(riskScore) ? riskScore : Number.parseFloat(riskScore).toFixed(2), sortable: true, truncateText: true, width: '15%',