Implement timeseries tabular view

This commit is contained in:
emanuele-f 2018-09-20 20:18:55 +02:00
parent e64c2c8fd7
commit 0872c162b5
10 changed files with 143 additions and 63 deletions

View file

@ -127,6 +127,21 @@ function percentageBar(total, value, valueLabel)
end
end
-- ########################################################
function makeProgressBar(percentage)
-- nan check
if percentage ~= percentage then
return ""
end
local perc_int = round(percentage)
return '<span style="width: 70%; float:left"><div class="progress"><div class="progress-bar progress-bar-warning" aria-valuenow="'..
perc_int ..'" aria-valuemin="0" aria-valuemax="100" style="width: '.. perc_int ..'%;"></div></div></span><span style="width: 30%; margin-left: 15px;">'..
round(percentage, 1) ..' %</span>'
end
-- ########################################################
-- label, relative_difference, seconds