Skip to content
Snippets Groups Projects
Commit 55eff45f authored by lemoer's avatar lemoer
Browse files

gluon-status-page: prettify nextnode when node is offline

parent 07ebac6a
No related branches found
No related tags found
No related merge requests found
...@@ -135,7 +135,7 @@ ...@@ -135,7 +135,7 @@
<tr><th><%:Load average%></th><td><%= statistics('loadavg', 'decimal') %></td></tr> <tr><th><%:Load average%></th><td><%= statistics('loadavg', 'decimal') %></td></tr>
<tr><th><%:RAM%></th><td><%= statistics('memory', 'memory') %></td></tr> <tr><th><%:RAM%></th><td><%= statistics('memory', 'memory') %></td></tr>
<tr><th><%:Filesystem%></th><td><%= statistics('rootfs_usage', 'percent') %></td></tr> <tr><th><%:Filesystem%></th><td><%= statistics('rootfs_usage', 'percent') %></td></tr>
<tr><th><%:Gateway%></th><td><%= statistics('gateway') %><br />via <%= statistics('gateway_nexthop', 'neighbour') %></td></tr> <tr><th><%:Gateway%></th><td><%= statistics('gateway') %><br /><%= statistics('gateway_nexthop', 'neighbour') %></td></tr>
<tr><th><%:Clients%></th><td><%= statistics('clients/total') %></td></tr> <tr><th><%:Clients%></th><td><%= statistics('clients/total') %></td></tr>
</table> </table>
......
...@@ -113,15 +113,18 @@ ...@@ -113,15 +113,18 @@
return prettyBytes(bytes); return prettyBytes(bytes);
}, },
'neighbour': function(addr) { 'neighbour': function(addr) {
if (!addr)
return '';
for (var i in interfaces) { for (var i in interfaces) {
var iface = interfaces[i]; var iface = interfaces[i];
var neigh = iface.get_neigh(addr); var neigh = iface.get_neigh(addr);
if (!neigh) if (!neigh)
continue; continue;
return neigh.get_hostname() + ' (' + i + ')'; return 'via ' + neigh.get_hostname() + ' (' + i + ')';
} }
return addr + ' (unknown iface)'; return 'via ' + addr + ' (unknown iface)';
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment