mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 15:39:33 +00:00
* Integrate modified nvd3 library with zoom and multicharts working support * Fix count in RRD driver * Initial chart ajax migration * Update nvd3 with zoom stack support * Fix RRD listSeries with directories * Work in progress graphs * Compatibility fix * Initial support for schema based api * Add missing script * Fix listSeries for existance check * Implement topk timseries api * Implement topk queries and fix labels and formats * Migrate interface top sender and receivers * Migrate charts to new API * Move timeseries list for menu inside respective scripts * Add support for extended labels * Fix missing fields while chaning graph resolution Also Rename drawRRD in drawGraphs * Fix historical tabs * Add missing time fence in influx topk * Add graphs support for custom statistics visualization * Initial support for graphs statistics footer * Implement statistics in single graphs for RRD driver * Move sampling function into the driver and fix graph statistics * Fix max/min value offset * Implement influxdb sampling use built-in FILL * Implement stats and total serie in influxdb driver * Update nvd3 with multiChart fixes * Update nvd3 with new multiChart fixes * RRD driver fixes * Move metrics type from single metric to schema * Handle ajax errors and empty data in charts * Fix flow device interfaces graphs * Use timeserie label as timeseries dropdown text * Implement topk aggregation into one data serie * ts_utils module now provides all the schemas * Migrate ntop.exist(rrd) to ts_utils.exist * Fix timeseries dropdown label * L4 protos fixes for charts * Migrate getProtoVolume to new API * Integrate nvd3 fix for tooltip position * Initial community graphs migration to timseries API * Fix community timeseries dropdown and historical tabs * Hide total serie by default * Remove l4 protos from topk charts
141 lines
3.2 KiB
Lua
141 lines
3.2 KiB
Lua
--
|
|
-- (C) 2013-18 - ntop.org
|
|
--
|
|
|
|
dirs = ntop.getDirs()
|
|
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
|
|
|
|
require "lua_utils"
|
|
|
|
sendHTTPContentTypeHeader('text/html')
|
|
|
|
if (group_col == nil) then
|
|
group_col = "asn"
|
|
end
|
|
|
|
ntop.dumpFile(dirs.installdir .. "/httpdocs/inc/header.inc")
|
|
|
|
active_page = "hosts"
|
|
dofile(dirs.installdir .. "/scripts/lua/inc/menu.lua")
|
|
|
|
print [[
|
|
<hr>
|
|
<div id="table-vlan"></div>
|
|
<script>
|
|
var url_update = "]]
|
|
print (ntop.getHttpPrefix())
|
|
print [[/lua/get_vlans_data.lua]]
|
|
|
|
print ('";')
|
|
ntop.dumpFile(dirs.installdir .. "/httpdocs/inc/vlan_stats_id.inc")
|
|
|
|
print [[
|
|
$("#table-vlan").datatable({
|
|
title: "VLAN List",
|
|
url: url_update ,
|
|
]]
|
|
|
|
print('title: "'..i18n("vlan_stats.vlans")..'",\n')
|
|
print ('rowCallback: function ( row ) { return vlan_table_setID(row); },')
|
|
|
|
-- Set the preference table
|
|
preference = tablePreferences("rows_number",_GET["perPage"])
|
|
if (preference ~= "") then print ('perPage: '..preference.. ",\n") end
|
|
|
|
-- Automatic default sorted. NB: the column must exist.
|
|
print ('sort: [ ["' .. getDefaultTableSort("vlan") ..'","' .. getDefaultTableSortOrder("vlan").. '"] ],')
|
|
|
|
|
|
print [[
|
|
showPagination: true,
|
|
columns: [
|
|
{
|
|
title: "Key",
|
|
field: "key",
|
|
hidden: true,
|
|
css: {
|
|
textAlign: 'center'
|
|
}
|
|
},
|
|
{
|
|
title: "]] print(i18n("vlan_stats.vlan_id")) print[[",
|
|
field: "column_vlan",
|
|
sortable: true,
|
|
css: {
|
|
textAlign: 'left'
|
|
}
|
|
},
|
|
]]
|
|
|
|
|
|
print [[
|
|
{
|
|
title: "]] print(i18n("chart")) print[[",
|
|
field: "column_chart",
|
|
sortable: false,
|
|
css: {
|
|
textAlign: 'center'
|
|
}
|
|
|
|
},
|
|
{
|
|
title: "]] print(i18n("hosts_stats.hosts")) print[[",
|
|
field: "column_hosts",
|
|
sortable: true,
|
|
css: {
|
|
textAlign: 'center'
|
|
}
|
|
|
|
},
|
|
{
|
|
title: "]] print(i18n("show_alerts.alerts")) print[[",
|
|
field: "column_alerts",
|
|
sortable: false,
|
|
css: {
|
|
textAlign: 'center'
|
|
}
|
|
},
|
|
{
|
|
title: "]] print(i18n("seen_since")) print[[",
|
|
field: "column_since",
|
|
sortable: true,
|
|
css: {
|
|
textAlign: 'center'
|
|
}
|
|
|
|
},
|
|
]]
|
|
|
|
print [[
|
|
{
|
|
title: "]] print(i18n("breakdown")) print[[",
|
|
field: "column_breakdown",
|
|
sortable: false,
|
|
css: {
|
|
textAlign: 'center'
|
|
}
|
|
},
|
|
{
|
|
title: "]] print(i18n("throughput")) print[[",
|
|
field: "column_thpt",
|
|
sortable: true,
|
|
css: {
|
|
textAlign: 'right'
|
|
}
|
|
},
|
|
{
|
|
title: "]] print(i18n("traffic")) print[[",
|
|
field: "column_traffic",
|
|
sortable: true,
|
|
css: {
|
|
textAlign: 'right'
|
|
}
|
|
}
|
|
]
|
|
});
|
|
|
|
|
|
</script>
|
|
]]
|
|
|
|
dofile(dirs.installdir .. "/scripts/lua/inc/footer.lua")
|