updated formatting to prepare for complete subscriber info

This commit is contained in:
n0mjs710 2018-12-12 19:48:11 -06:00
parent 10671c05de
commit f5517000ce
2 changed files with 25 additions and 54 deletions

View File

@ -1,24 +1,14 @@
<h3>HBlink Status Tables:</h3>
<table style="width:100%; font: 10pt arial, sans-serif">
<colgroup>
<col style="width: 15%" />
<col style="width: 30%" />
<col style="width: 10%" />
<col style="width: 4%" />
<col style="width: 4%" />
<col style="width: 12%" />
<col style="width: 15%" />
<col style="width: 10%" />
</colgroup>
<tr style="width:100%; font: 10pt arial, sans-serif; background-color:#666666; color:white">
<th>Homebrew Protocol<br>Master Systems</th>
<th>ID/Callsign/Location<br>IP:Port/Time Connected</th>
<th>Frequency</th>
<th>CC<br>LinkedTS</th>
<th>Slot</th>
<th>Call<br>Type</th>
<th>Source<br>Subscriber</th>
<th>Destination</th>
<table style="table-layout:fixed;width:100%; font: 10pt arial, sans-serif">
<tr style="font: 10pt arial, sans-serif; background-color:#666666; color:white">
<th style='width: 150px;'>Homebrew Protocol<br>Master Systems</th>
<th style='width: 250px;'>ID/Callsign/Location<br>IP:Port/Time Connected</th>
<th style='width: 100px;'>Frequency</th>
<th style='width: 70px;'>CC<br>LinkedTS</th>
<th style='width: 45px;'>Slot</th>
<th style='width: 20%;'>Call<br>Type</th>
<th style='width: 60%;'>Source<br>Subscriber</th>
<th style='width: 20%;'>Destination</th>
</tr>
{% for _master in _table['MASTERS'] %}
@ -48,26 +38,16 @@
{% endfor %}
</table>
<br>
<table style="width:100%; font: 10pt arial, sans-serif">
<colgroup>
<col style="width: 15%" />
<col style="width: 30%" />
<col style="width: 10%" />
<col style="width: 4%" />
<col style="width: 4%" />
<col style="width: 12%" />
<col style="width: 15%" />
<col style="width: 10%" />
</colgroup>
<tr style="width:100%; font: 10pt arial, sans-serif; background-color:#666666; color:white">
<th>Homebrew Protocol<br>Peer Systems</th>
<th>ID/Callsign/Location<br>Master IP:Port</th>
<th>Connected<br>TX/RX/Lost</th>
<th>LinkedTS</th>
<th>Slot</th>
<th>Call<br>Type</th>
<th>Source<br>Subscriber</th>
<th>Destination</th>
<table style="table-layout:fixed;width:100%; font: 10pt arial, sans-serif">
<tr style="font: 10pt arial, sans-serif; background-color:#666666; color:white">
<th style='width: 150px;'>Homebrew Protocol<br>Peer Systems</th>
<th style='width: 250px;'>ID/Callsign/Location<br>Master IP:Port</th>
<th style='width: 100px;'>Connected<br>TX/RX/Lost</th>
<th style='width: 70px;'>LinkedTS</th>
<th style='width: 45px;'>Slot</th>
<th style='width: 20%;'>Call<br>Type</th>
<th style='width: 60%;'>Source<br>Subscriber</th>
<th style='width: 20%;'>Destination</th>
</tr>
{% for _peer, _pdata in _table['PEERS'].iteritems() %}
@ -91,16 +71,11 @@
{% endfor %}
</table>
<br>
<table style="width:100%; font: 10pt arial, sans-serif">
<colgroup>
<col style="width: 10%" />
<col style="width: 20%" />
<col style="width: 70%" />
</colgroup>
<table style="table-layout:fixed;width:100%; font: 10pt arial, sans-serif">
<tr style="width:100%; font: 10pt arial, sans-serif; background-color:#666666; color:white">
<th>OpenBridge Systems</th>
<th>Network ID<br>Target IP:Port</th>
<th>Active Calls</th>
<th style='width: 150px;'>OpenBridge Systems</th>
<th style='width: 250px;'>Network ID<br>Target IP:Port</th>
<th style='width: 100%;'>Active Calls</th>
</tr>
{% for _openbridge in _table['OPENBRIDGES'] %}

View File

@ -244,10 +244,9 @@ def build_hblink_table(_config, _stats_table):
def update_hblink_table(_config, _stats_table):
# Is there a system in HBlink's config monitor doesn't know about?
for _hbp in _config:
add_list = []
if _config[_hbp]['MODE'] == 'MASTER':
for _peer in _config[_hbp]['PEERS']:
if int_id(_peer) not in _stats_table['MASTERS'][_hbp]['PEERS']:
if int_id(_peer) not in _stats_table['MASTERS'][_hbp]['PEERS'] and _config[_hbp]['PEERS'][_peer]['CONNECTION'] == 'YES':
logger.info('Adding peer to CTABLE that has registerred: %s', int_id(_peer))
add_hb_peer(_config[_hbp]['PEERS'][_peer], _stats_table['MASTERS'][_hbp]['PEERS'], _peer)
@ -379,9 +378,6 @@ 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']:
if action == 'START':
CTABLE['OPENBRIDGES'][system]['STREAMS'][streamId] = (alias_call(sourceSub, subscriber_ids), destination)