diff --git a/package/gluon-status-page/files/lib/gluon/status-page/view/status-page.html b/package/gluon-status-page/files/lib/gluon/status-page/view/status-page.html index 0054e61fc5110727d86f7d550f67109ca5d6a218..cb7aaa11158ffb25ea60b288aee519469448589b 100644 --- a/package/gluon-status-page/files/lib/gluon/status-page/view/status-page.html +++ b/package/gluon-status-page/files/lib/gluon/status-page/view/status-page.html @@ -135,7 +135,7 @@ <tr><th><%:Load average%></th><td><%= statistics('loadavg', 'decimal') %></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><%: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> </table> diff --git a/package/gluon-status-page/javascript/status-page.js b/package/gluon-status-page/javascript/status-page.js index 005a089714f78791ea4f303c8e1789630f5bd0ce..b81d21a70adc56bc1f9aedbb7fe195ab2b73b0b5 100644 --- a/package/gluon-status-page/javascript/status-page.js +++ b/package/gluon-status-page/javascript/status-page.js @@ -113,15 +113,18 @@ return prettyBytes(bytes); }, 'neighbour': function(addr) { + if (!addr) + return ''; + for (var i in interfaces) { var iface = interfaces[i]; var neigh = iface.get_neigh(addr); if (!neigh) continue; - return neigh.get_hostname() + ' (' + i + ')'; + return 'via ' + neigh.get_hostname() + ' (' + i + ')'; } - return addr + ' (unknown iface)'; + return 'via ' + addr + ' (unknown iface)'; } }