-- -- (C) 2013-18 - ntop.org -- local dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path require "lua_utils" local template = require "template_utils" local page = _GET["page"] or _POST["page"] sendHTTPContentTypeHeader('text/html') ntop.dumpFile(dirs.installdir .. "/httpdocs/inc/header.inc") dofile(dirs.installdir .. "/scripts/lua/inc/menu.lua") if _POST and table.len(_POST) > 0 and isAdministrator() then local delete_data_utils = require "delete_data_utils" local host_info = url2hostinfo(_POST) local res = delete_data_utils.delete_host(_POST["ifid"], host_info) local err_msgs = {} for what, what_res in pairs(res) do if what_res["status"] ~= "OK" then err_msgs[#err_msgs + 1] = i18n(delete_data_utils.status_to_i18n(what_res["status"])) end end if #err_msgs == 0 then print('
×'..i18n('delete_data.delete_ok', {host = hostinfo2hostkey(host_info)})..'
') else print('
×'..i18n('delete_data.delete_failed', {host = hostinfo2hostkey(host_info)})..' '..table.concat(err_msgs, ' ')..'
') end end print( template.gen("modal_confirm_dialog.html", { dialog = { id = "delete_data", action = "delete_data()", title = i18n("manage_data.delete"), message = i18n("delete_data.delete_confirmation", {host = ''}), confirm = i18n("delete") } }) ) print[[

]] print(i18n("manage_data.manage_data")) print[[


]] print [[

]] print(i18n("manage_data.export")) print[[

]] print(i18n("manage_data.hosts")) print[[:
]] print(i18n('notes')) print[[ ]] print("
") -- closes
print [[

]] print(i18n("manage_data.delete")) print[[


]] print(i18n('notes')) print[[
  • ]] print(i18n('delete_data.note_persistent_data')) print[[
]] print("
") -- closes
print[[ ]] dofile(dirs.installdir .. "/scripts/lua/inc/footer.lua")