mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Add REST endpoint rest/v2/get/interface/top/hosts.lua (migrate old script)
This commit is contained in:
parent
b9fc7670ce
commit
844418f928
2 changed files with 110 additions and 0 deletions
|
|
@ -1383,6 +1383,10 @@ end
|
|||
|
||||
-- Convert to the format accepted by the vue Chart/Pie component
|
||||
-- js_formatter: render function (e.g. 'format_bytes')
|
||||
-- Input format (res):
|
||||
-- [ { label = 'xxx', count = yyy }, ... ]
|
||||
-- Output format:
|
||||
-- { labels = [ 'xxx', ...], series = [ yyy, ... ], colors = [ ... ], ... }
|
||||
function graph_utils.convert_pie_data(res, new_charts, js_formatter)
|
||||
if not new_charts then
|
||||
return res
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue