mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 16:09:32 +00:00
Implements degraded performance badge
This commit is contained in:
parent
55d5912729
commit
5276de4ca8
5 changed files with 61 additions and 3 deletions
|
|
@ -10,6 +10,7 @@ require "lua_utils"
|
|||
local json = require("dkjson")
|
||||
local ts_utils = require("ts_utils_core")
|
||||
local plugins_utils = require("plugins_utils")
|
||||
local periodic_activities_utils = require "periodic_activities_utils"
|
||||
|
||||
sendHTTPHeader('application/json')
|
||||
|
||||
|
|
@ -99,6 +100,10 @@ function dumpInterfaceStats(ifid)
|
|||
end
|
||||
end
|
||||
|
||||
if periodic_activities_utils.have_degraded_performance() then
|
||||
res["degraded_performance"] = true
|
||||
end
|
||||
|
||||
if not userHasRestrictions() then
|
||||
res["num_flows"] = ifstats.stats.flows
|
||||
res["num_hosts"] = ifstats.stats.hosts
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue