diff --git a/scripts/lua/host_details_categories.lua b/scripts/lua/host_details_categories.lua deleted file mode 100644 index 06ac53d326..0000000000 --- a/scripts/lua/host_details_categories.lua +++ /dev/null @@ -1,58 +0,0 @@ --- --- (C) 2013-17 - ntop.org --- - -dirs = ntop.getDirs() -package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path - -require "lua_utils" -require "graph_utils" - -host_ip = _GET["host"] -ifid = _GET["ifid"] - -sendHTTPContentTypeHeader('text/html') - -interface.select(ifid) -host_info = hostkey2hostinfo(host_ip) -host_vlan = host_info["vlan"] -host = interface.getHostInfo(host_info["host"], host_vlan) -host_categories_rrd_creation = ntop.getCache("ntopng.prefs.host_categories_rrd_creation") - -if(host == nil) then - print("
Unable to find "..host_ip.." (data expired ?)
") - return -end - -total = 0 - -vals = {} - -if(host["categories"] ~= nil) then -for k,v in pairs(host["categories"]) do - vals[k] = k - total = total + v - -- print(k) -end -table.sort(vals) -end - - -for _k,_label in pairsByKeys(vals , desc) do - label = getCategoryLabel(_label) - print("") - fname = getRRDName(ifid, hostinfo2hostkey(host_info), "categories/"..label..".rrd") - if ntop.exists(fname) then - print(""..label.."") - else - print(label) - end - print("" .. bytesToSize(host["categories"][_label]) .. "") - print("" .. round((host["categories"][_label] * 100)/total, 2).. " %") -end -print(" NOTE:

") diff --git a/scripts/lua/modules/graph_utils.lua b/scripts/lua/modules/graph_utils.lua index ab1924333a..9ca4b4d968 100644 --- a/scripts/lua/modules/graph_utils.lua +++ b/scripts/lua/modules/graph_utils.lua @@ -1108,8 +1108,6 @@ function singlerrd2json(ifid, host, rrdFile, start_time, end_time, rickshaw_json if(prefixLabel == "Bytes") then prefixLabel = "Traffic" - elseif string.starts(rrdFile, "categories/") then - prefixLabel = prefixLabel.." Traffic" end if(string.contains(rrdFile, "num_") or string.contains(rrdFile, "tcp_") or string.contains(rrdFile, "packets") or string.contains(rrdFile, "drops")) then @@ -1164,8 +1162,7 @@ function singlerrd2json(ifid, host, rrdFile, start_time, end_time, rickshaw_json end if host ~= nil and not string.starts(host, 'profile:') - and protocol_categories[prefixLabel] == nil - and not string.starts(rrdFile, 'categories/') then + and protocol_categories[prefixLabel] == nil then extra_info = extra_info..firstToUpper(n) end