Implements configurable UI displayed string length

Implements #1159
This commit is contained in:
Simone Mainardi 2017-07-21 13:00:44 +02:00
parent 85da10af61
commit fcd007a5e9
10 changed files with 32 additions and 23 deletions

View file

@ -15,7 +15,6 @@ perPage = _GET["perPage"]
sortColumn = _GET["sortColumn"]
sortOrder = _GET["sortOrder"]
protocol = _GET["protocol"]
long_names = _GET["long_names"]
criteria = _GET["criteria"]
-- Host comparison parameters
@ -47,16 +46,6 @@ end
-- Get from redis the throughput type bps or pps
throughput_type = getThroughputType()
if(long_names == nil) then
long_names = false
else
if(long_names == "1") then
long_names = true
else
long_names = false
end
end
criteria_key = nil
sortPrefs = "hosts"
if(criteria ~= nil) then
@ -260,11 +249,7 @@ for _key, _value in pairsByKeys(vals, funct) do
value["name"] = key
end
if(long_names) then
print(value["name"])
else
print(shortHostName(value["name"]))
end
print(shortHostName(value["name"]))
if(value["ip"] ~= nil) then
label = getHostAltName(value["ip"])