mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Global storage utilization in Runtime Status
This commit is contained in:
parent
0eea23bf5a
commit
a3d370ea7e
6 changed files with 145 additions and 40 deletions
|
|
@ -164,8 +164,10 @@ function stackedProgressBars(total, bars, other_label, formatter)
|
|||
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] = [[
|
||||
<div class="progress-bar progress-bar-]] .. (bar.class) .. [[" role="progressbar" style="width:]] .. percentage .. [[%"></div>]]
|
||||
<div class="progress-bar progress-bar-]] .. (bar.class) .. [[" role="progressbar" style="width:]] .. percentage .. [[%;]] .. bar.style .. [["></div>]]
|
||||
end
|
||||
|
||||
res[#res + 1] = [[
|
||||
|
|
@ -187,7 +189,7 @@ function stackedProgressBars(total, bars, other_label, formatter)
|
|||
end
|
||||
|
||||
for _, bar in ipairs(legend_items) do
|
||||
res[#res + 1] = [[<span><span class="label label-]].. (bar.class) ..[["> </span><span>]] .. bar.title .. " (".. formatter(bar.value) ..")</span></span>"
|
||||
res[#res + 1] = [[<span><span class="label label-]].. (bar.class) ..[[" style="]] .. bar.style .. [["> </span><span>]] .. bar.title .. " (".. formatter(bar.value) ..")</span></span>"
|
||||
end
|
||||
|
||||
return table.concat(res)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue