mirror of
https://github.com/gosticks/web.git
synced 2026-12-03 17:51:39 +00:00
Add client hostname to random history data
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
This commit is contained in:
+2
-1
@@ -36,11 +36,12 @@ function history(length) {
|
||||
return {
|
||||
"history": (new Array(length)).fill(null).map((_, i) => {
|
||||
const isIPv4 = faker.random.boolean();
|
||||
const isHostname = faker.random.boolean();
|
||||
return [
|
||||
startDate + i,
|
||||
isIPv4 ? "IPv4" : "IPv6",
|
||||
faker.internet.domainName(),
|
||||
isIPv4 ? faker.internet.ip() : faker.internet.ipv6(),
|
||||
isHostname ? faker.internet.domainWord() + ".local" : isIPv4 ? faker.internet.ip() : faker.internet.ipv6(),
|
||||
Math.floor(Math.random() * 5) + 1
|
||||
];
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user