Skip to content

Commit

Permalink
Used standard formatting name function for hosts
Browse files Browse the repository at this point in the history
  • Loading branch information
MatteoBiscosi committed Oct 21, 2024
1 parent b345422 commit 68d20b0
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions scripts/lua/host_details.lua
Original file line number Diff line number Diff line change
Expand Up @@ -740,21 +740,8 @@ else
print("<tr><th>" .. i18n("name") .. "</th>")

if (isAdministrator()) then
local n
local method = "http"

if (host.names.tls ~= nil) then
n = host.names.tls
method = "https"
elseif (host.names.http ~= nil) then
n = host.names.http
elseif (host.names.resolved ~= nil) then
n = host.names.resolved
else
n = getIpUrl(host["ip"])
end

print("<td colspan=2><A class='ntopng-external-link' href=\"" .. method .. "://" .. n ..
local n = hostinfo2label(host, true)
print("<td colspan=2><A class='ntopng-external-link' href=\"http://" .. n ..
"\"> <span id=name>")
else
print("<td colspan=2>")
Expand Down

0 comments on commit 68d20b0

Please sign in to comment.