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 {
|
try {
|
||||||
var format_result = formats[format](value, valuePrev, diff);
|
var format_result = formats[format](value, valuePrev, diff);
|
||||||
switch (typeof format_result) {
|
switch (typeof format_result) {
|
||||||
case "string":
|
|
||||||
elem.textContent = format_result;
|
|
||||||
break;
|
|
||||||
case "object":
|
case "object":
|
||||||
if (elem.lastChild)
|
if (elem.lastChild)
|
||||||
elem.removeChild(elem.lastChild);
|
elem.removeChild(elem.lastChild);
|
||||||
elem.appendChild(format_result);
|
elem.appendChild(format_result);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
elem.textContent = format_result;
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
|
Loading…
Reference in New Issue
Block a user