mirror of
https://github.com/gosticks/web.git
synced 2026-10-06 06:37:07 +00:00
Merge pull request #124 from pi-hole/fix/history-fake-query-type
Fix some query types in fake data getting shown as "ERROR"
This commit is contained in:
+4
-4
@@ -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)
|
||||
};
|
||||
})
|
||||
|
||||
@@ -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
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user