From 50cb68776956f4131bab1282ee81f7354dec8c79 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Tue, 13 Jul 2021 12:09:47 -0400 Subject: [PATCH] Island: Change colors of ransomware table text If some files were encrypted, warning text color should be used. If all files were encrypted, danger text color should be used. --- .../report-components/ransomware/FileEncryptionTable.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/monkey/monkey_island/cc/ui/src/components/report-components/ransomware/FileEncryptionTable.tsx b/monkey/monkey_island/cc/ui/src/components/report-components/ransomware/FileEncryptionTable.tsx index 270b214a0..cfb9ab3f3 100644 --- a/monkey/monkey_island/cc/ui/src/components/report-components/ransomware/FileEncryptionTable.tsx +++ b/monkey/monkey_island/cc/ui/src/components/report-components/ransomware/FileEncryptionTable.tsx @@ -54,9 +54,13 @@ function renderFileEncryptionStats(successful: number, total: number) { let textClassName = '' if(successful > 0) { - textClassName = 'text-success' + if (successful === total) { + textClassName = 'text-danger' + } else { + textClassName = 'text-warning' + } } else { - textClassName = 'text-danger' + textClassName = 'text-success' } return (

{successful} out of {total}

);