From 49ff0d2b9ae4982d4352b668b8d7085ed72f2d4e Mon Sep 17 00:00:00 2001 From: Ildar Kamalov Date: Tue, 30 Oct 2018 18:10:05 +0300 Subject: [PATCH] Added green background for whitelist rows --- client/src/components/Logs/index.js | 13 ++++++++++++- client/src/components/ui/ReactTable.css | 4 ++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/client/src/components/Logs/index.js b/client/src/components/Logs/index.js index 6bb062f7..23409f6e 100644 --- a/client/src/components/Logs/index.js +++ b/client/src/components/Logs/index.js @@ -223,8 +223,19 @@ class Logs extends Component { if (!rowInfo) { return {}; } + + if (rowInfo.original.reason.indexOf('Filtered') === 0) { + return { + className: 'red', + }; + } else if (rowInfo.original.reason === 'NotFilteredWhiteList') { + return { + className: 'green', + }; + } + return { - className: (rowInfo.original.reason.indexOf('Filtered') === 0 ? 'red' : ''), + className: '', }; }} />); diff --git a/client/src/components/ui/ReactTable.css b/client/src/components/ui/ReactTable.css index bdcf3576..e1de27b4 100644 --- a/client/src/components/ui/ReactTable.css +++ b/client/src/components/ui/ReactTable.css @@ -11,3 +11,7 @@ .rt-tr-group .red { background-color: #fff4f2; } + +.rt-tr-group .green { + background-color: #f1faf3; +}