add reason status

This commit is contained in:
Maxim Topchu 2018-09-05 18:20:38 +03:00
parent 0e99a65687
commit fa8bc57082
1 changed files with 13 additions and 1 deletions

View File

@ -60,8 +60,20 @@ class Logs extends Component {
accessor: 'response', accessor: 'response',
Cell: (row) => { Cell: (row) => {
const responses = row.value; 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; const rule = row && row.original && row.original.rule;
if (isFiltered) {
return (
<div className="logs__row">
{ this.renderTooltip(isFiltered, rule) }
<span>{ parsedFilteredReason }</span>
</div>
);
}
if (responses.length > 0) { if (responses.length > 0) {
const liNodes = responses.map((response, index) => const liNodes = responses.map((response, index) =>
(<li key={index} title={response}>{response}</li>)); (<li key={index} title={response}>{response}</li>));