From fa8bc570827cae708266901754712fb0c9a1f1ea Mon Sep 17 00:00:00 2001 From: Maxim Topchu Date: Wed, 5 Sep 2018 18:20:38 +0300 Subject: [PATCH] add reason status --- client/src/components/Logs/index.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/client/src/components/Logs/index.js b/client/src/components/Logs/index.js index 86eeb0ae..a172716f 100644 --- a/client/src/components/Logs/index.js +++ b/client/src/components/Logs/index.js @@ -60,8 +60,20 @@ class Logs extends Component { accessor: 'response', Cell: (row) => { const responses = row.value; - const isFiltered = row ? row.original.reason.indexOf('Filtered') === 0 : false; + const { reason } = row.original; + const isFiltered = row ? reason.indexOf('Filtered') === 0 : false; + const parsedFilteredReason = reason.replace('Filtered', 'Filtered by '); const rule = row && row.original && row.original.rule; + + if (isFiltered) { + return ( +
+ { this.renderTooltip(isFiltered, rule) } + { parsedFilteredReason } +
+ ); + } + if (responses.length > 0) { const liNodes = responses.map((response, index) => (
  • {response}
  • ));