From 580b7357d5fe53e01c8845aec348fbae255b5e7f Mon Sep 17 00:00:00 2001
From: Martin Weinelt <martin@darmstadt.freifunk.net>
Date: Sun, 1 Dec 2019 16:22:34 +0100
Subject: [PATCH] Revert gluon-status-page gateway_nexthop changes

This reverts commits
- caf2dd037ba4b560a0794ce87d6a230e7a6cbcf8.
- 07ebac6a49a288a3f5b7c7fc4e45a38b265ff929
- 55eff45f96b435de2d3d94a0189ff99473e7828d

I accidentally pushed these commits as I had them lying around on a
dirty checkout I did testing on.
---
 .../lib/gluon/status-page/view/status-page.html |  2 +-
 package/gluon-status-page/i18n/de.po            |  3 ---
 .../i18n/gluon-status-page.pot                  |  3 ---
 .../gluon-status-page/javascript/status-page.js | 17 -----------------
 4 files changed, 1 insertion(+), 24 deletions(-)

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 cb7aaa111..6e18b010d 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 /><%= statistics('gateway_nexthop', 'neighbour') %></td></tr>
+					<tr><th><%:Gateway%></th><td><%= statistics('gateway') %></td></tr>
 					<tr><th><%:Clients%></th><td><%= statistics('clients/total') %></td></tr>
 				</table>
 
diff --git a/package/gluon-status-page/i18n/de.po b/package/gluon-status-page/i18n/de.po
index 5caebfde5..ef0374c07 100644
--- a/package/gluon-status-page/i18n/de.po
+++ b/package/gluon-status-page/i18n/de.po
@@ -55,9 +55,6 @@ msgstr "Weitergeleitet"
 msgid "Gateway"
 msgstr "Gateway"
 
-msgid "Gateway Nexthop"
-msgstr "Gateway Nexthop"
-
 msgid "IP address"
 msgstr "IP-Adresse"
 
diff --git a/package/gluon-status-page/i18n/gluon-status-page.pot b/package/gluon-status-page/i18n/gluon-status-page.pot
index e471e8789..766a5de80 100644
--- a/package/gluon-status-page/i18n/gluon-status-page.pot
+++ b/package/gluon-status-page/i18n/gluon-status-page.pot
@@ -46,9 +46,6 @@ msgstr ""
 msgid "Gateway"
 msgstr ""
 
-msgid "Gateway Nexthop"
-msgstr ""
-
 msgid "IP address"
 msgstr ""
 
diff --git a/package/gluon-status-page/javascript/status-page.js b/package/gluon-status-page/javascript/status-page.js
index b81d21a70..e3405cf6c 100644
--- a/package/gluon-status-page/javascript/status-page.js
+++ b/package/gluon-status-page/javascript/status-page.js
@@ -112,20 +112,6 @@
 		'bytes': function(bytes) {
 			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 'via ' + neigh.get_hostname() + ' (' + i + ')';
-			}
-
-			return 'via ' + addr + ' (unknown iface)';
-		}
 	}
 
 
@@ -596,9 +582,6 @@
 		}
 
 		return {
-			'get_hostname': function() {
-				return hostname.textContent;
-			},
 			'update_nodeinfo': function(nodeinfo) {
 				var addr = choose_address(nodeinfo.network.addresses);
 				if (addr) {
-- 
GitLab