Add links in host custom column

Implements #2860
This commit is contained in:
emanuele-f 2019-09-23 10:31:26 +02:00
parent 856ae1a7a5
commit e2a58a8c3d
2 changed files with 23 additions and 12 deletions

View file

@ -312,8 +312,6 @@ for _key, _value in pairsByKeys(vals, funct) do
record["column_since"] = secondsToTime(now-value["seen.first"] + 1)
record["column_last"] = secondsToTime(now-value["seen.last"] + 1)
local _, custom_column_key = custom_column_utils.getCustomColumnName()
record["column_"..custom_column_key] = custom_column_utils.hostStatsToColumnValue(value, custom_column_key, true)
if((value["throughput_trend_"..throughput_type] ~= nil) and
(value["throughput_trend_"..throughput_type] > 0)) then
@ -385,6 +383,9 @@ for _key, _value in pairsByKeys(vals, funct) do
record["column_breakdown"] = "<div class='progress'><div class='progress-bar progress-bar-warning' style='width: "
.. sent2rcvd .."%;'>Sent</div><div class='progress-bar progress-bar-info' style='width: " .. (100-sent2rcvd) .. "%;'>Rcvd</div></div>"
local _, custom_column_key = custom_column_utils.getCustomColumnName()
record["column_"..custom_column_key] = custom_column_utils.hostStatsToColumnValue(value, custom_column_key, true)
formatted_res[#formatted_res + 1] = record
end -- for