mirror of
https://github.com/ShaYmez/HBmonitor.git
synced 2024-11-21 15:41:52 -05:00
begin working on OBP and Peer systems
This commit is contained in:
parent
e153abc3f2
commit
2d2ed8c938
@ -56,34 +56,48 @@
|
||||
<h4>Client Systems</h4>
|
||||
<table style="width:100%; font: 10pt arial, sans-serif">
|
||||
<colgroup>
|
||||
<col style="width: 10%" />
|
||||
<col style="width: 20%" />
|
||||
<col style="width: 15%" />
|
||||
<col style="width: 15%" />
|
||||
<col style="width: 8%" />
|
||||
<col style="width: 4%" />
|
||||
<col style="width: 3%" />
|
||||
<col style="width: 10%" />
|
||||
<col style="width: 15%" />
|
||||
<col style="width: 15%" />
|
||||
<col style="width: 10%" />
|
||||
<col style="width: 15%" />
|
||||
</colgroup>
|
||||
<tr style="width:100%; font: 10pt arial, sans-serif; background-color:#666666; color:white">
|
||||
<th>HBP System</th>
|
||||
<th>Client Radio ID</th>
|
||||
<th>Callsign</th>
|
||||
<th>Connection</th>
|
||||
<th>Ping Sent</th>
|
||||
<th>Ping Ack</th>
|
||||
<th>Master</th>
|
||||
<th>ID/Callsign/Location<br>Master IP:Port</th>
|
||||
<th>Connected<br>Sent/Ack/Missed</th>
|
||||
<th>LinkedTS</th>
|
||||
<th>Slot</th>
|
||||
<th>Call<br>Type</th>
|
||||
<th>Source<br>Subscriber</th>
|
||||
<th>Source<br>Peer</th>
|
||||
<th>Destination</th>
|
||||
</tr>
|
||||
|
||||
{% for _client in _table['PEERS'] %}
|
||||
{% for _peer in _table['PEERS'] %}
|
||||
|
||||
<tr>
|
||||
<td style="font-weight:bold"> {{ _client}} </td>
|
||||
<td>{{ _table['PEERS'][_client]['RADIO_ID'] }}</td>
|
||||
<td>{{ _table['PEERS'][_client]['CALLSIGN'] }}</td>
|
||||
<td style={{ 'background-color:#00ff00' if _table['PEERS'][_client]['STATS']['CONNECTION'] == 'YES' else ';background-color:#ff0000' }}>{{ _table['PEERS'][_client]['STATS']['CONNECTION'] }}</td>
|
||||
<td>{{ _table['PEERS'][_client]['STATS']['PINGS_SENT'] }}</td>
|
||||
<td>{{ _table['PEERS'][_client]['STATS']['PINGS_ACKD'] }}</td>
|
||||
<td>{{ _table['PEERS'][_client]['MASTER_IP'] }}</td>
|
||||
<td style="font-weight:bold" rowspan="2"> {{ _peer}}</td>
|
||||
<td rowspan="2">{{ _table['PEERS'][_peer]['RADIO_ID'] }}, {{_table['PEERS'][_peer]['CALLSIGN']}}, {{_table['PEERS'][_peer]['LOCATION']}}<br><div style="font: 8pt arial, sans-serif">Master: {{ _table['PEERS'][_peer]['MASTER_IP'] }}:{{ _table['PEERS'][_peer]['MASTER_PORT'] }}</div></td>
|
||||
<td rowspan="2"; style={{ 'background-color:#00ff00' if _table['PEERS'][_peer]['STATS']['CONNECTION'] == 'YES' else ';background-color:#ff0000' }}>{{ _table['PEERS'][_peer]['STATS']['CONNECTED'] }}<br>{{ _table['PEERS'][_peer]['STATS']['PINGS_SENT'] }}/{{ _table['PEERS'][_peer]['STATS']['PINGS_ACKD'] }}/{{ _table['PEERS'][_peer]['STATS']['PINGS_SENT'] - _table['PEERS'][_peer]['STATS']['PINGS_ACKD'] }}</td>
|
||||
<td rowspan="2"></td>
|
||||
|
||||
<td>TS1</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<tr>
|
||||
<td>TS2</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
@ -91,33 +105,21 @@
|
||||
<h4>OpenBridge Systems</h4>
|
||||
<table style="width:100%; font: 10pt arial, sans-serif">
|
||||
<colgroup>
|
||||
<col style="width: 20%" />
|
||||
<col style="width: 15%" />
|
||||
<col style="width: 15%" />
|
||||
<col style="width: 10%" />
|
||||
<col style="width: 15%" />
|
||||
<col style="width: 15%" />
|
||||
<col style="width: 10%" />
|
||||
<col style="width: 75%" />
|
||||
</colgroup>
|
||||
<tr style="width:100%; font: 10pt arial, sans-serif; background-color:#666666; color:white">
|
||||
<th>OpenBridge System</th>
|
||||
<th>Network ID</th>
|
||||
<th>Target IP</th>
|
||||
<th>Target Port</th>
|
||||
<th />
|
||||
<th />
|
||||
<th />
|
||||
<th>Network ID<br>Target IP:Port</th>
|
||||
<th>Active Calls</th>
|
||||
</tr>
|
||||
|
||||
{% for _openbridge in _table['OPENBRIDGES'] %}
|
||||
|
||||
<tr>
|
||||
<td style="font-weight:bold"> {{ _openbridge}} </td>
|
||||
<td>{{ _table['OPENBRIDGES'][_openbridge]['NETWORK_ID'] }}</td>
|
||||
<td>{{ _table['OPENBRIDGES'][_openbridge]['TARGET_IP'] }}</td>
|
||||
<td>{{ _table['OPENBRIDGES'][_openbridge]['TARGET_PORT'] }}</td>
|
||||
<th />
|
||||
<th />
|
||||
<td>{{ _table['OPENBRIDGES'][_openbridge]['NETWORK_ID'] }}<br><div style="font: 8pt arial, sans-serif">{{ _table['OPENBRIDGES'][_openbridge]['TARGET_IP'] }}:{{ _table['OPENBRIDGES'][_openbridge]['TARGET_PORT'] }}</div></td>
|
||||
<th />
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
@ -201,8 +201,12 @@ def build_hblink_table(_config, _stats_table):
|
||||
elif _hbp_data['MODE'] == 'PEER':
|
||||
_stats_table['PEERS'][_hbp] = {}
|
||||
_stats_table['PEERS'][_hbp]['CALLSIGN'] = _hbp_data['CALLSIGN']
|
||||
_stats_table['PEERS'][_hbp]['LOCATION'] = _hbp_data['LOCATION']
|
||||
_stats_table['PEERS'][_hbp]['RADIO_ID'] = int_id(_hbp_data['RADIO_ID'])
|
||||
_stats_table['PEERS'][_hbp]['MASTER_IP'] = _hbp_data['MASTER_IP']
|
||||
_stats_table['PEERS'][_hbp]['MASTER_PORT'] = _hbp_data['MASTER_PORT']
|
||||
_stats_table['PEERS'][_hbp]['CONNECTION'] = 'YES' #_hbp_data['CONNECTION']
|
||||
_stats_table['PEERS'][_hbp]['CONNECTED'] = 'now' #since(_hbp_data['CONNECTED'])
|
||||
_stats_table['PEERS'][_hbp]['STATS'] = _hbp_data['STATS']
|
||||
|
||||
# Process OpenBridge systems
|
||||
@ -323,15 +327,6 @@ def rts_update(p):
|
||||
timeSlot = int(p[7])
|
||||
destination = int(p[8])
|
||||
|
||||
'''
|
||||
if trx == 'RX':
|
||||
color = '00ff00'
|
||||
elif trx == 'TX':
|
||||
color = 'ff0000'
|
||||
else:
|
||||
color = '0000ff'
|
||||
'''
|
||||
|
||||
if system in CTABLE['MASTERS']:
|
||||
for peer in CTABLE['MASTERS'][system]['PEERS']:
|
||||
if sourcePeer == peer:
|
||||
@ -358,9 +353,17 @@ def rts_update(p):
|
||||
CTABLE['MASTERS'][system]['PEERS'][peer][timeSlot]['SRC'] = ''
|
||||
CTABLE['MASTERS'][system]['PEERS'][peer][timeSlot]['DEST'] = ''
|
||||
|
||||
else:
|
||||
logger.warning('tried to update a tranmission for a peer not yet listed: system %s, action %s, callType %s, tx/rx %s, streamid %s, sourcePeer %s, sourceSub %s, timeSlot %s, destination %s ', system, action, callType, trx, streamId, sourcePeer, sourceSub, timeSlot, destination)
|
||||
|
||||
if system in CTABLE['OPENBRIDGES']:
|
||||
pass
|
||||
|
||||
if system in CTABLE['PEERS']:
|
||||
pass
|
||||
|
||||
build_stats()
|
||||
else:
|
||||
logger.warning('tried to update a tranmission for a peer not yet listed')
|
||||
|
||||
#
|
||||
# PROCESS IN COMING MESSAGES AND TAKE THE CORRECT ACTION DEPENING ON THE OPCODE
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user