Email alert improvements

- Add ntopng instance name and IP address into the mail subject
- Fix notification button not being hidden on email disable
- Fix input field formats
- Allow to specify an andress in the form "Someone <someone@mailsomehost.com>"
	b.txt
This commit is contained in:
emanuele-f 2018-04-09 13:22:37 +02:00
parent 1adcc909ed
commit 4827e6ab35
5 changed files with 66 additions and 16 deletions

View file

@ -625,7 +625,7 @@ network_alert_functions_description = {
function noHtml(s)
if s == nil then return nil end
local cleaned = s:gsub("<[aA].->(.-)</[aA]>","%1")
:gsub("<[iI].->(.-)</[iI]>","%1")
:gsub("%s*<[iI].->(.-)</[iI]>","%1")
:gsub("<.->(.-)</.->","%1") -- note: this does not handle nested tags
:gsub("^%s*(.-)%s*$", "%1")
return cleaned