diff --git a/make-fake-data.js b/make-fake-data.js index 9bf82e5..f6e56d4 100644 --- a/make-fake-data.js +++ b/make-fake-data.js @@ -50,16 +50,16 @@ function history(length) { return { timestamp: startDate + i, - type: isIPv4 ? 0 : 1, - status: Math.floor(Math.random() * 6) + 1, + type: isIPv4 ? 1 : 2, + status: Math.floor(Math.random() * 6), domain: faker.internet.domainName(), client: isHostname ? faker.internet.domainWord() + ".local" : isIPv4 ? faker.internet.ip() : faker.internet.ipv6(), - dnssec: Math.floor(Math.random() * 5) + 1, - reply: Math.floor(Math.random() * 6) + 1, + dnssec: Math.floor(Math.random() * 5), + reply: Math.floor(Math.random() * 7), response_time: Math.floor(Math.random() * 100) }; }) diff --git a/src/components/log/QueryLog.js b/src/components/log/QueryLog.js index 0a28597..b08a499 100644 --- a/src/components/log/QueryLog.js +++ b/src/components/log/QueryLog.js @@ -170,7 +170,7 @@ const replyTypes = t => [ /** * Convert a query type code to a query type. */ -const queryTypes = ["ERROR", "A", "AAAA", "ANY", "SRV", "SOA", "PTR", "TXT"]; +const queryTypes = ["A", "AAAA", "ANY", "SRV", "SOA", "PTR", "TXT"]; /** * The columns of the Query Log. Some pieces are translated, so you must pass in @@ -204,7 +204,7 @@ const columns = t => [ { Header: t("Type"), id: "type", - accessor: r => queryTypes[r.type], + accessor: r => queryTypes[r.type - 1], width: 50 }, {