From 4374e73a2ca03fa957823dcd6ae719c5ab030d9b Mon Sep 17 00:00:00 2001 From: Mcat12 Date: Mon, 31 Dec 2018 18:22:52 -0500 Subject: [PATCH] Split status and DNSSEC data into separate columns This makes searching much simpler Signed-off-by: Mcat12 --- src/components/log/QueryLog.js | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/src/components/log/QueryLog.js b/src/components/log/QueryLog.js index 49dda0e..742ce0b 100644 --- a/src/components/log/QueryLog.js +++ b/src/components/log/QueryLog.js @@ -207,7 +207,7 @@ const status = t => [ * you must pass in the translation function before using the message array. */ const dnssec = t => [ - "", // Unspecified, which means DNSSEC is off, so nothing should be shown + "N/A", // Unspecified, which means DNSSEC is off, so nothing should be shown t("Secure"), t("Insecure"), t("Bogus"), @@ -215,6 +215,15 @@ const dnssec = t => [ t("Unknown") ]; +const dnssecColor = [ + "", // Unspecified, which means DNSSEC is off, so the initial color should be shown + "green", + "orange", + "red", + "red", + "red" +]; + /** * Convert a reply type code to a reply type. The unknown type is translated, so * you must pass in the translation function before using the message array. @@ -306,19 +315,20 @@ const columns = t => [ { Header: t("Status"), id: "status", - accessor: r => ({ code: r.status, dnssec: r.dnssec }), + accessor: r => r.status, width: 140, + Cell: row => status(t)[row.value] + }, + { + Header: "DNSSEC", + id: "dnssec", + accessor: r => r.dnssec, + width: 90, Cell: row => ( - - {status(t)[row.value.code]} -
- {dnssec(t)[row.value.dnssec]} -
- ), - filterMethod: (filter, row) => { - const rowStatus = status(t)[row[filter.id].code].toLowerCase(); - return rowStatus.includes(filter.value.toLowerCase()); - } +
+ {dnssec(t)[row.value]} +
+ ) }, { Header: t("Reply"),