gluon-status-page: fix display of non-string values from respondd data
Fixes the display of client counts, which are numbers and not strings
in the respondd data.
Fixes: 3a885a1b22
("gluon-status-page: make "gateway nexthop" a link (#2278)")
This commit is contained in:
parent
0d3fa6b59b
commit
a357278464
File diff suppressed because one or more lines are too long
@ -230,14 +230,13 @@
|
||||
try {
|
||||
var format_result = formats[format](value, valuePrev, diff);
|
||||
switch (typeof format_result) {
|
||||
case "string":
|
||||
elem.textContent = format_result;
|
||||
break;
|
||||
case "object":
|
||||
if (elem.lastChild)
|
||||
elem.removeChild(elem.lastChild);
|
||||
elem.appendChild(format_result);
|
||||
break;
|
||||
default:
|
||||
elem.textContent = format_result;
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
|
Loading…
Reference in New Issue
Block a user