mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 15:39:33 +00:00
Fix link rendering in stackedProgressBars
This commit is contained in:
parent
da6f1c354d
commit
7c90b3b79b
2 changed files with 11 additions and 5 deletions
|
|
@ -206,9 +206,13 @@ function stackedProgressBars(total, bars, other_label, formatter, css_class)
|
|||
cumulative_perc = cumulative_perc + percentage
|
||||
if bar.class == nil then bar.class = "primary" end
|
||||
if bar.style == nil then bar.style = "" end
|
||||
if bar.link ~= nil then res[#res + 1] = [[<a href="]] .. bar.link .. [[">]] end
|
||||
res[#res + 1] = [[
|
||||
<div class="progress-bar bg-]] .. (bar.class) .. [[" role="progressbar" style="width:]] .. percentage .. [[%;]] .. bar.style .. [["></div></a>]]
|
||||
if bar.link ~= nil then
|
||||
res[#res + 1] = [[<a href="]] .. bar.link .. [[" style="width:]] .. percentage .. [[%;]] .. bar.style .. [[">
|
||||
<div class="progress-bar bg-]] .. (bar.class) .. [[" role="progressbar" style="width: 100%"></div></a>]]
|
||||
else
|
||||
res[#res + 1] = [[
|
||||
<div class="progress-bar bg-]] .. (bar.class) .. [[" role="progressbar" style="width:]] .. percentage .. [[%;]] .. bar.style .. [["></div></a>]]
|
||||
end
|
||||
if bar.link ~= nil then res[#res + 1] = [[</a>]] end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue