mirror of
https://github.com/gosticks/web.git
synced 2026-12-03 17:51:39 +00:00
+15
-16
@@ -71,6 +71,14 @@ export default class QueryLog extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
const status = {
|
||||
"1": "Blocked",
|
||||
"2": "Allowed (forwarded)",
|
||||
"3": "Allowed (cached)",
|
||||
"4": "Blocked (wildcard)",
|
||||
"5": "Blocked (blacklist)"
|
||||
};
|
||||
|
||||
const columns = [
|
||||
{
|
||||
Header: "Time",
|
||||
@@ -108,22 +116,13 @@ const columns = [
|
||||
id: "status",
|
||||
accessor: r => r[4],
|
||||
width: 140,
|
||||
Cell: row => {
|
||||
switch(row.value) {
|
||||
case 1:
|
||||
return "Blocked";
|
||||
case 2:
|
||||
return "Allowed (forwarded)";
|
||||
case 3:
|
||||
return "Allowed (cached)";
|
||||
case 4:
|
||||
return "Blocked (wildcard)";
|
||||
case 5:
|
||||
return "Blocked (blacklist)";
|
||||
default:
|
||||
return "Unknown";
|
||||
}
|
||||
}
|
||||
Cell: row => status[row.value],
|
||||
filterMethod: (filter, row) =>
|
||||
status[row[filter.id]]
|
||||
.toLowerCase()
|
||||
.includes(
|
||||
filter.value.toLowerCase()
|
||||
)
|
||||
},
|
||||
{
|
||||
Header: "Action",
|
||||
|
||||
Reference in New Issue
Block a user