mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 23:49:33 +00:00
Adds the ability to set a custom Google Maps API key
Users can now generate a custom Google Maps API key and set it via ntopng Preferences page. Addresses #646
This commit is contained in:
parent
52974784c0
commit
2c693cb0c1
5 changed files with 38 additions and 6 deletions
|
|
@ -952,6 +952,16 @@ function isIPv6(ip)
|
|||
return true
|
||||
end
|
||||
|
||||
function addGoogleMapsScript()
|
||||
local g_maps_key = ntop.getCache('ntopng.prefs.google_apis_browser_key')
|
||||
if g_maps_key ~= nil and g_maps_key~= "" then
|
||||
g_maps_key = "&key="..g_maps_key
|
||||
else
|
||||
g_maps_key = ""
|
||||
end
|
||||
print("<script src=\"https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"..g_maps_key.."\"></script>\n")
|
||||
end
|
||||
|
||||
function addLogoSvg()
|
||||
print [[
|
||||
<svg width="103px" height="50px" viewBox="0 0 103 50" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue