mirror of
https://github.com/EDCD/EDDN.git
synced 2025-06-05 18:03:04 +03:00
Allow selection from all our gateways and relays. We currently only have
one of each, but it makes the point that we can deal with more.
This commit is contained in:
parent
cd4f1d69c6
commit
4e57495348
@ -1,6 +1,3 @@
|
||||
gateway_status_url = "http://eddn-gateway.elite-markets.net:8080/stats/";
|
||||
relay_status_url = "http://eddn-relay.elite-markets.net:9090/stats/";
|
||||
|
||||
displayGatewayStats = function(stats) {
|
||||
$("#gateway_inbound_1min").html((stats["inbound"] || {})["1min"] || 0);
|
||||
$("#gateway_inbound_5min").html((stats["inbound"] || {})["5min"] || 0);
|
||||
@ -50,6 +47,18 @@ doUpdate = function(url, success, failure) {
|
||||
failure: failure
|
||||
});
|
||||
}
|
||||
doUpdate(gateway_status_url, displayGatewayStats);
|
||||
doUpdate(relay_status_url, displayRelayStats);
|
||||
setInterval(function() {doUpdate(gateway_status_url, displayGatewayStats); doUpdate(relay_status_url, displayRelayStats)}, 60000);
|
||||
|
||||
getGatewayUrl = function() {
|
||||
return $("#gateway").val();
|
||||
}
|
||||
|
||||
getRelayUrl = function() {
|
||||
return $("#relay").val();
|
||||
}
|
||||
|
||||
$("#gateway").change(function() {alert(); doUpdate(getGatewayUrl(), displayGatewayStats);})
|
||||
$("#relay").change(function() {doUpdate(getRelayUrl(), displayRelayStats);})
|
||||
|
||||
doUpdate(getGatewayUrl(), displayGatewayStats);
|
||||
doUpdate(getRelayUrl(), displayRelayStats);
|
||||
setInterval(function() {doUpdate(getGatewayUrl(), displayGatewayStats); doUpdate(getRelayUrl(), displayRelayStats)}, 60000);
|
@ -31,7 +31,11 @@
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>eddn-gateway.elite-markets.net</td>
|
||||
<td class="form-inline">
|
||||
<select id="gateway" class="form-control">
|
||||
<option value="http://eddn-gateway.elite-markets.net:8080/stats/">eddn-gateway.elite-markets.net</option>
|
||||
</select>
|
||||
</td>
|
||||
<th>1 min</th>
|
||||
<th>5 min</th>
|
||||
<th>60 min</th>
|
||||
@ -62,7 +66,11 @@
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>eddn-relay.elite-markets.net</td>
|
||||
<td class="form-inline">
|
||||
<select id="relay" class="form-control">
|
||||
<option value="http://eddn-relay.elite-markets.net:9090/stats/">eddn-relay.elite-markets.net</option>
|
||||
</select>
|
||||
</td>
|
||||
<th>1 min</th>
|
||||
<th>5 min</th>
|
||||
<th>60 min</th>
|
||||
|
Loading…
x
Reference in New Issue
Block a user