Fixes missing formatting in tables

This commit is contained in:
MatteoBiscosi 2022-10-05 11:02:36 +02:00
parent 760b5a2c52
commit 4b9938be9a
5 changed files with 23 additions and 15 deletions

View file

@ -2103,6 +2103,8 @@ function iec104_typeids2str(c)
return(c)
end
-- ##############################################
function format_device_name(device_ip, short_version)
local device_name = device_ip
@ -2122,6 +2124,20 @@ end
-- ##############################################
-- This function, given a record and a name return a standard formatted value
-- and if the value is 0, an empty string is returned
-- e.g. 1000 -> 1,000 | 0 ->
function format_high_num_value_for_tables(record, name)
local formatted_record = format_utils.formatValue(record[name] or 0)
if formatted_record == '0' then
formatted_record = ''
end
return formatted_record
end
-- ##############################################
require "lua_utils_print"
require "lua_utils_get"
require "lua_utils_gui"