mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-01 00:19:33 +00:00
Double counter cleanup
This commit is contained in:
parent
5c2f560b84
commit
8758232169
1 changed files with 2 additions and 6 deletions
|
|
@ -161,15 +161,11 @@ function stackedProgressBars(total, bars, other_label, formatter)
|
|||
-- The bars
|
||||
res[#res + 1] = [[<div class="progress">]]
|
||||
|
||||
local sum = 0
|
||||
for _, bar in ipairs(bars) do
|
||||
sum = sum + bar.value
|
||||
end
|
||||
if total > sum then total = sum end
|
||||
for _, bar in ipairs(bars) do cumulative = cumulative + bar.value end
|
||||
if cumulative > total then total = cumulative end
|
||||
|
||||
for _, bar in ipairs(bars) do
|
||||
local percentage = round(bar.value * 100 / total, 2)
|
||||
cumulative = cumulative + bar.value
|
||||
if bar.class == nil then bar.class = "primary" end
|
||||
if bar.style == nil then bar.style = "" end
|
||||
res[#res + 1] = [[
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue