Add whitelist/blacklist button to query log rows

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
This commit is contained in:
Mcat12
2017-09-12 22:18:09 -04:00
parent 85f395dace
commit 6cb0f90db2
+15 -1
View File
@@ -129,6 +129,20 @@ const columns = [
{
Header: "Action",
minWidth: 80,
filterable: false
filterable: false,
Cell: data => {
if([1, 4, 5].includes(data.row.status))
return (
<button type="button" className="btn btn-success" onClick={() => api.addWhitelist(data.row.domain)}>
Whitelist
</button>
);
if([2, 3].includes(data.row.status))
return (
<button type="button" className="btn btn-danger" onClick={() => api.addBlacklist(data.row.domain)}>
Blacklist
</button>
);
}
}
];