mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
[VS] Code rework for port label formatter.
This commit is contained in:
parent
de809c4a24
commit
3a13e42b22
5 changed files with 18 additions and 23 deletions
|
|
@ -1126,6 +1126,17 @@ function vs_utils.is_available()
|
|||
return (#scan_modules > 0)
|
||||
end
|
||||
|
||||
-- **********************************************************
|
||||
|
||||
function vs_utils.format_port_label(port, service_name, protocol)
|
||||
if (isEmptyString(service_name)) then
|
||||
return string.format("%s/%s",port,protocol)
|
||||
else
|
||||
return string.format("%s/%s (%s)",port,protocol,service_name)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
-- **********************************************************
|
||||
|
||||
return vs_utils
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue