Added remediation docs, modified function to get remediation url (#8674)

* Fixed telemetry response format, no impact on base ntopng, different endpoint

* Fixed error

* Added toboolean instead of string compare

* Added ASN name in ASN timeseries page

* Added exportes interfaces page

* Exporters interfaces table config

* Updated dist ref

* Added remediation docs, modified function to get remediation url #8669 #8670 #8395
This commit is contained in:
GabrieleDeri 2024-08-26 14:57:06 +02:00 committed by GitHub
parent 896315e568
commit 7ab51d5f12
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 583 additions and 88 deletions

View file

@ -8,6 +8,7 @@ package.path = dirs.installdir .. "/scripts/lua/modules/alert_store/?.lua;" .. p
require "lua_utils"
local json = require "dkjson"
local dscp_consts = require "dscp_consts"
local flow_risk_utils = require "flow_risk_utils"
local historical_flow_details_formatter = {}
@ -228,7 +229,6 @@ local function format_historical_issue_description(alert_id, score, title, msg,
if (tonumber(alert_risk) == 0) then
alert_src = "ntopng"
else
alert_src = "nDPI"
end
@ -237,10 +237,10 @@ local function format_historical_issue_description(alert_id, score, title, msg,
local severity_id = map_score_to_severity(score)
local severity = alert_consts.alertSeverityById(severity_id)
-- local alert_source = " <span class='badge bg-info'>".. ternary(score_alert.alert_risk, "nDPI", "ntopng") .. "</span>"
local remediation = flow_risk_utils.get_remediation_documentation_link(alert_risk, alert_src)
local html = "<tr><td>" .. (msg or "") .. alert_source .. "</td>" .. '<td align=center><span style="color:' .. severity.color .. '">' .. score .. '</span></td>'
html = html .. "<td>" .. info .. "</td>"
html = html .. "<td>" .. info .. remediation .."</td>"
-- Add Mitre info
local alert_key = alert_consts.getAlertType(alert_id, alert_entities.flow.entity_id)