mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-02 00:40:10 +00:00
Fixes subnet search in hist data explorer
This commit is contained in:
parent
05a576fe5c
commit
55351fa8b4
1 changed files with 21 additions and 21 deletions
|
|
@ -410,27 +410,6 @@ local function validateNotificationSeverity(tz)
|
|||
return validateChoiceInline({"error","warning","info"})
|
||||
end
|
||||
|
||||
-- #################################################################
|
||||
|
||||
local function validateHost(p)
|
||||
local host = hostkey2hostinfo(p)
|
||||
|
||||
if(host.host ~= nil) and (host.vlan ~= nil)
|
||||
and (isIPv4(host.host) or isIPv6(host.host) or isMacAddress(host.host)) then
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
local function validateMac(p)
|
||||
if isMacAddress(p) then
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
local function validateIPV4(p)
|
||||
return isIPv4(p)
|
||||
end
|
||||
|
|
@ -600,6 +579,27 @@ local function validateNetwork(i)
|
|||
end
|
||||
end
|
||||
|
||||
-- #################################################################
|
||||
|
||||
local function validateHost(p)
|
||||
local host = hostkey2hostinfo(p)
|
||||
|
||||
if(host.host ~= nil) and (host.vlan ~= nil)
|
||||
and (isIPv4(host.host) or isIPv6(host.host) or isMacAddress(host.host)) then
|
||||
return true
|
||||
else
|
||||
return validateNetwork(p)
|
||||
end
|
||||
end
|
||||
|
||||
local function validateMac(p)
|
||||
if isMacAddress(p) then
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
local function validateZoom(zoom)
|
||||
if string.match(zoom, "%d+%a") == zoom then
|
||||
return true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue