Merge remote-tracking branch 'lemoer/pr_status_page_gateway_nexthop'
This commit is contained in:
		
						commit
						a8beae5189
					
				| @ -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') %></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> | ||||
| 
 | ||||
|  | ||||
| @ -55,6 +55,9 @@ msgstr "Weitergeleitet" | ||||
| msgid "Gateway" | ||||
| msgstr "Gateway" | ||||
| 
 | ||||
| msgid "Gateway Nexthop" | ||||
| msgstr "Gateway Nexthop" | ||||
| 
 | ||||
| msgid "IP address" | ||||
| msgstr "IP-Adresse" | ||||
| 
 | ||||
|  | ||||
| @ -46,6 +46,9 @@ msgstr "" | ||||
| msgid "Gateway" | ||||
| msgstr "" | ||||
| 
 | ||||
| msgid "Gateway Nexthop" | ||||
| msgstr "" | ||||
| 
 | ||||
| msgid "IP address" | ||||
| msgstr "" | ||||
| 
 | ||||
|  | ||||
| @ -112,6 +112,20 @@ | ||||
| 		'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)'; | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 
 | ||||
| @ -582,6 +596,9 @@ | ||||
| 		} | ||||
| 
 | ||||
| 		return { | ||||
| 			'get_hostname': function() { | ||||
| 				return hostname.textContent; | ||||
| 			}, | ||||
| 			'update_nodeinfo': function(nodeinfo) { | ||||
| 				var addr = choose_address(nodeinfo.network.addresses); | ||||
| 				if (addr) { | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user