PiHole work #513

This commit is contained in:
Jokob-sk
2023-12-21 21:17:05 +11:00
parent 47a3f7073b
commit 13c68efb8a
9 changed files with 27 additions and 22 deletions

View File

@@ -349,6 +349,7 @@ function sanitize(data)
// -----------------------------------------------------------------------------
function numberArrayFromString(data)
{
console.log(data)
data = JSON.parse(sanitize(data));
return data.replace(/\[|\]/g, '').split(',').map(Number);
}
@@ -516,6 +517,9 @@ function getNameByMacAddress(macAddress) {
// A function used to make the IP address orderable
function formatIPlong(ipAddress) {
const parts = ipAddress.split('.');
console.log(ipAddress)
if (parts.length !== 4) {
throw new Error('Invalid IP address format');
}