mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-02 00:40:10 +00:00
Minor fixes for the alerts browser
This commit is contained in:
parent
82c305de53
commit
c4cd6200f9
2 changed files with 4 additions and 11 deletions
|
|
@ -1204,7 +1204,7 @@ function getActiveTabId() {
|
|||
function updateDeleteLabel(tabid) {
|
||||
var label = $("#purgeBtnLabel");
|
||||
var prefix = "]]
|
||||
if not isEmptyString(_GET["entity"]) then print(alertEntityLabel(_GET["entity"], true)) end
|
||||
if not isEmptyString(_GET["entity"]) then print(alertEntityLabel(_GET["entity"], true).." ") end
|
||||
print [[";
|
||||
var val = "";
|
||||
|
||||
|
|
@ -1531,7 +1531,7 @@ $('#buttonOpenDeleteModal').on('click', function() {
|
|||
|
||||
$(".modal-body #modalDeleteAlertsMsg").html(zoomsel.data('msg') + ']]
|
||||
if tonumber(_GET["alert_severity"]) ~= nil then
|
||||
print(' with severity "'..alertTypeLabel(_GET["alert_severity"], true)..'" ')
|
||||
print(' with severity "'..alertSeverityLabel(_GET["alert_severity"], true)..'" ')
|
||||
elseif tonumber(_GET["alert_type"]) ~= nil then
|
||||
print(' with type "'..alertTypeLabel(_GET["alert_type"], true)..'" ')
|
||||
end
|
||||
|
|
|
|||
|
|
@ -2389,16 +2389,9 @@ end
|
|||
|
||||
-- ####################################################
|
||||
|
||||
-- Note: can only handle basic types
|
||||
function tableToJsObject(lua_table)
|
||||
local parts = {}
|
||||
|
||||
for k,v in pairs(lua_table) do
|
||||
if type(v) == 'string' then v = "'"..v.."'" end
|
||||
parts[#parts + 1] = k..":"..v
|
||||
end
|
||||
|
||||
return "{".. table.concat(parts, ", ") .."}"
|
||||
local json = require("dkjson")
|
||||
return json.encode(lua_table, nil)
|
||||
end
|
||||
|
||||
-- ####################################################
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue