mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 23:49:33 +00:00
Rework formatAlertMessage json decoding
This commit is contained in:
parent
4c36e7bab4
commit
b6d10f2d2a
2 changed files with 17 additions and 5 deletions
|
|
@ -133,14 +133,15 @@ for _key,_value in ipairs(alerts) do
|
|||
local column_type = alert_consts.alertTypeLabel(tonumber(_value["alert_type"]))
|
||||
local column_count = format_utils.formatValue(tonumber(_value["alert_counter"]))
|
||||
local column_score = format_utils.formatValue(tonumber(_value["score"]))
|
||||
local column_msg = string.gsub(alert_utils.formatAlertMessage(ifid, _value), '"', "'")
|
||||
local alert_info = alert_utils.getAlertInfo(_value)
|
||||
local column_msg = string.gsub(alert_utils.formatAlertMessage(ifid, _value, alert_info), '"', "'")
|
||||
local column_chart = nil
|
||||
|
||||
if ntop.isPro() then
|
||||
local graph_utils = require "graph_utils"
|
||||
|
||||
if graph_utils.getAlertGraphLink then
|
||||
column_chart = graph_utils.getAlertGraphLink(getInterfaceId(ifname), _value)
|
||||
column_chart = graph_utils.getAlertGraphLink(getInterfaceId(ifname), _value, alert_info)
|
||||
if not isEmptyString(column_chart) then
|
||||
column_chart = "<a href='".. column_chart .."'><i class='fas fa-search-plus drilldown-icon'></i></a>"
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue