From e6a87839d6f07a7484ba482d4a998b8f68bf7758 Mon Sep 17 00:00:00 2001 From: VakarisZ Date: Mon, 26 Jul 2021 11:45:29 +0300 Subject: [PATCH] Island UI: add keys to items in ransomware report, breach section --- .../src/components/report-components/common/RenderArrays.js | 6 ++++-- .../report-components/ransomware/BreachSection.tsx | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/monkey/monkey_island/cc/ui/src/components/report-components/common/RenderArrays.js b/monkey/monkey_island/cc/ui/src/components/report-components/common/RenderArrays.js index f06ee4849..692484f27 100644 --- a/monkey/monkey_island/cc/ui/src/components/report-components/common/RenderArrays.js +++ b/monkey/monkey_island/cc/ui/src/components/report-components/common/RenderArrays.js @@ -24,11 +24,13 @@ export let renderLimitedArray = function (array, } else { element = (<>{array[i]}); } - elements.push(
{element}
); + elements.push(
{element}
); } let remainder = array.length - limit; if(remainder > 0){ - elements.push(
 and {remainder} more
); + elements.push(
+  and {remainder} more +
); } return elements } diff --git a/monkey/monkey_island/cc/ui/src/components/report-components/ransomware/BreachSection.tsx b/monkey/monkey_island/cc/ui/src/components/report-components/ransomware/BreachSection.tsx index 0cf23dfdd..abf7eb277 100644 --- a/monkey/monkey_island/cc/ui/src/components/report-components/ransomware/BreachSection.tsx +++ b/monkey/monkey_island/cc/ui/src/components/report-components/ransomware/BreachSection.tsx @@ -25,7 +25,7 @@ function BreachSection() { function getBreachSectionBody(machines) { let machineList = []; for(let i = 0; i < machines.length; i++){ - machineList.push(
  • {getMachine(machines[i])}
  • ); + machineList.push(getMachine(machines[i])); } return (
    @@ -39,10 +39,10 @@ function getBreachSectionBody(machines) { function getMachine(machine) { return ( - <> +
  • {machine['hostname']} ({renderLimitedArray(machine['ip_addresses'], 2, 'ip-address')}) at {machine['start_time']} - +
  • ) }