status: Show uplinks
This commit is contained in:
parent
3de9ee4fa8
commit
56a8ce63de
|
|
@ -60,11 +60,6 @@ function addr_loc_port(s)
|
|||
return s.substr(s.lastIndexOf(':') + 1);
|
||||
}
|
||||
|
||||
function username_link(s)
|
||||
{
|
||||
return '<a href="http://aprs.fi/?call=' + s + '" target="_blank">' + htmlent(s) + "</a>";
|
||||
}
|
||||
|
||||
function conv_verified(c, k)
|
||||
{
|
||||
if (c['verified'] == 3)
|
||||
|
|
@ -306,26 +301,9 @@ var val_convert = {
|
|||
'since_connect': dur_str,
|
||||
'since_last_read': dur_str,
|
||||
'addr_rem_shown': conv_none,
|
||||
'username': username_link,
|
||||
'addr_loc': addr_loc_port
|
||||
};
|
||||
|
||||
var uplink_cols = {
|
||||
'username': 'Server ID',
|
||||
'addr_rem_shown': 'Address',
|
||||
'mode': 'Mode',
|
||||
't_connect': 'Connected',
|
||||
'since_connect': 'Up',
|
||||
'since_last_read': 'Last in',
|
||||
'show_app_name': 'Software',
|
||||
'pkts_tx': 'Packets Tx',
|
||||
'pkts_rx': 'Packets Rx',
|
||||
'bytes_tx': 'Bytes Tx',
|
||||
'bytes_rx': 'Bytes Rx',
|
||||
'bytes_rates': 'Tx/Rx bytes/s',
|
||||
'obuf_q': 'OutQ'
|
||||
};
|
||||
|
||||
/* applications which typically have a port 14501 status port - can be linked */
|
||||
var linkable = {
|
||||
'aprsc': 1,
|
||||
|
|
@ -994,6 +972,22 @@ var cols_listener = {
|
|||
'bytes_rates': 'Tx/Rx bytes/s'
|
||||
};
|
||||
|
||||
var cols_uplinks = {
|
||||
'username': 'Server ID',
|
||||
'addr': 'Address',
|
||||
'mode': 'Mode',
|
||||
't_connect': 'Connected',
|
||||
'since_connect': 'Up',
|
||||
'since_last_read': 'Last in',
|
||||
'show_app_name': 'Software',
|
||||
'pkts_tx': 'Packets Tx',
|
||||
'pkts_rx': 'Packets Rx',
|
||||
'bytes_tx': 'Bytes Tx',
|
||||
'bytes_rx': 'Bytes Rx',
|
||||
'bytes_rates': 'Tx/Rx bytes/s',
|
||||
'obuf_q': 'OutQ'
|
||||
};
|
||||
|
||||
var cols_peers = {
|
||||
'username': 'Server ID',
|
||||
'addr_rem': 'Address',
|
||||
|
|
@ -1046,6 +1040,7 @@ app.controller('aprscc', [ '$scope', '$http', 'graphs', function($scope, $http,
|
|||
'keys_dupecheck_variations': keys_dupecheck_variations,
|
||||
'key_translate': key_translate,
|
||||
'cols_listener': cols_listener,
|
||||
'cols_uplinks': cols_uplinks,
|
||||
'cols_peers': cols_peers,
|
||||
'cols_clients': cols_clients
|
||||
};
|
||||
|
|
|
|||
|
|
@ -111,10 +111,39 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class='row' ng-cloak>
|
||||
<div class='row' ng-cloak ng-show='status.uplinks.length > 0'>
|
||||
<div class='col-md-12 col-sm-12'>
|
||||
<h4>Uplinks</h4>
|
||||
<div class='table-responsive' ng-show='status.uplinks'>
|
||||
<table class='table table-hover table-condensed table-striped'>
|
||||
<tr>
|
||||
<th ng-repeat="(k, v) in setup.cols_uplinks">{{ v }}</th>
|
||||
</tr>
|
||||
<tr ng-repeat="c in status.uplinks">
|
||||
<td>{{ c.username }}</td>
|
||||
<td>{{ c.addr_rem }}</td>
|
||||
<td>{{ c.mode }}</td>
|
||||
<td>{{ c.t_connect | duration }}</td>
|
||||
<td>{{ c.since_connect | duration }}</td>
|
||||
<td>{{ c.since_last_read | duration }}</td>
|
||||
<td>{{ c.app_name }} {{ c.app_version }}</td>
|
||||
<td>{{ c.pkts_tx }}</td>
|
||||
<td>{{ c.pkts_rx }}</td>
|
||||
<td>{{ c.bytes_tx }}</td>
|
||||
<td>{{ c.bytes_rx }}</td>
|
||||
<td><span ng-show='status.tick_dif'>{{ (c.bytes_tx - status_prev.clients_id[c.id].bytes_tx) / status.tick_dif | ratestr }}
|
||||
/ {{ (c.bytes_rx - status_prev.clients_id[c.id].bytes_rx) / status.tick_dif | ratestr }}</span></td>
|
||||
<td>{{ c.obuf_q }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='row' ng-cloak ng-show='status.peers.length > 0'>
|
||||
<div class='col-md-12 col-sm-12'>
|
||||
<h4>Peers</h4>
|
||||
<div class='table-responsive' ng-show='status.peers'>
|
||||
<div class='table-responsive'>
|
||||
<table class='table table-hover table-condensed table-striped'>
|
||||
<tr>
|
||||
<th ng-repeat="(k, v) in setup.cols_peers"
|
||||
|
|
|
|||
Loading…
Reference in New Issue