mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-05 02:16:39 +00:00
parent
d9bba4b4b2
commit
d3dda0bb82
38 changed files with 217 additions and 145 deletions
|
|
@ -166,6 +166,24 @@ end
|
|||
|
||||
-- ################################################################################
|
||||
|
||||
-- @brief Given a flow status identified by `status_key`, returns an icon associated to the severity
|
||||
-- @param `status_key` A flow status identified
|
||||
-- @param `status info`, A human readable (localized) status info
|
||||
-- @return The HTML with icon and ALT text, or empty if no icon is available
|
||||
function flow_consts.getStatusIcon(status_key, status_info)
|
||||
local status_def = status_by_id[tonumber(status_key)]
|
||||
|
||||
-- If the status has no severity associated or the severity has no icon, then return
|
||||
if not status_def or not status_def.alert_severity or not status_def.alert_severity.icon then
|
||||
return ""
|
||||
end
|
||||
|
||||
-- Return the icon
|
||||
return "<i class='"..status_def.alert_severity.icon.."' style='color: "..status_def.alert_severity.color..";' title='"..noHtml(status_info) .."'></i> "
|
||||
end
|
||||
|
||||
-- ################################################################################
|
||||
|
||||
function flow_consts.getStatusTitle(status_key)
|
||||
local status_def = status_by_id[tonumber(status_key)]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue