updated formatting for realtime status

This commit is contained in:
n0mjs710 2018-11-30 14:31:07 -06:00
parent e33ab618e6
commit 885d2ad60e
2 changed files with 14 additions and 4 deletions

View File

@ -2,28 +2,37 @@
<h4>Master Systems</h4> <h4>Master Systems</h4>
<table style="width:100%; font: 10pt arial, sans-serif"> <table style="width:100%; font: 10pt arial, sans-serif">
<colgroup> <colgroup>
<col style="width: 15%" /> <col style="width: 10%" />
<col style="width: 15%" /> <col style="width: 20%" />
<col style="width: 10%" /> <col style="width: 10%" />
<col style="width: 5%" /> <col style="width: 5%" />
<col style="width: 55%" />
</colgroup> </colgroup>
<tr style="width:100%; font: 10pt arial, sans-serif; background-color:#666666; color:white"> <tr style="width:100%; font: 10pt arial, sans-serif; background-color:#666666; color:white">
<th>HBP System</th> <th>HBP System</th>
<th>ID/Callsign/Location<br>IP:Port/KeepAlives</th> <th>ID/Callsign/Location<br>IP:Port/KeepAlives</th>
<th>Frequency</th> <th>Frequency</th>
<th>ColorCode<br>LinkedTS</th> <th>ColorCode<br>LinkedTS</th>
<th>Realtime Status (to come)</th>
</tr> </tr>
{% for _master in _table['MASTERS'] %} {% for _master in _table['MASTERS'] %}
<tr> <tr>
<td style="font-weight:bold" rowspan="{{ _table['MASTERS'][_master]['PEERS']|(length + 1)*2 }}"> {{ _master}} </td> <td style="font-weight:bold" rowspan="{{ (_table['MASTERS'][_master]['PEERS']|length * 2) +1 }}"> {{ _master}} </td>
</tr> </tr>
{% for _client, _cdata in _table['MASTERS'][_master]['PEERS'].iteritems() %} {% for _client, _cdata in _table['MASTERS'][_master]['PEERS'].iteritems() %}
<tr> <tr>
<td rowspan="2">{{ _client }}, {{ _cdata['CALLSIGN'] }}, {{ _cdata['LOCATION'] }}<br><div style="font: 8pt arial, sans-serif">{{ _cdata['IP'] }}:{{ _cdata['PORT'] }} / {{ _cdata['PINGS_RECEIVED'] }}</div></td> <td rowspan="2">{{ _client }}, {{ _cdata['CALLSIGN'] }}, {{ _cdata['LOCATION'] }}<br><div style="font: 8pt arial, sans-serif">{{ _cdata['IP'] }}:{{ _cdata['PORT'] }} / {{ _cdata['PINGS_RECEIVED'] }}</div></td>
<td rowspan="2">TX: {{ _cdata['RX_FREQ'] }}<br>RX: {{ _cdata['TX_FREQ] }}</td> <td rowspan="2">TX: {{ _cdata['RX_FREQ'] }}<br>RX: {{ _cdata['TX_FREQ'] }}</td>
<td rowspan="2">{{ _cdata['COLORCODE'] }}<br>{{ _cdata['SLOTS'] }}</td> <td rowspan="2">{{ _cdata['COLORCODE'] }}<br>{{ _cdata['SLOTS'] }}</td>
<td>TS1</td>
<tr>
<td>TS2</td>
</tr>
</tr> </tr>
{% endfor %} {% endfor %}
{% endfor %} {% endfor %}

View File

@ -130,6 +130,7 @@ def build_hblink_table(_config):
_stats_table['MASTERS'][_hbp]['PEERS'][int_id(_client)] = {} _stats_table['MASTERS'][_hbp]['PEERS'][int_id(_client)] = {}
_stats_table['MASTERS'][_hbp]['PEERS'][int_id(_client)]['CALLSIGN'] = _hbp_data['PEERS'][_client]['CALLSIGN'] _stats_table['MASTERS'][_hbp]['PEERS'][int_id(_client)]['CALLSIGN'] = _hbp_data['PEERS'][_client]['CALLSIGN']
_stats_table['MASTERS'][_hbp]['PEERS'][int_id(_client)]['TX_FREQ'] = _hbp_data['PEERS'][_client]['TX_FREQ'][:3] + '.' + _hbp_data['PEERS'][_client]['TX_FREQ'][3:7] _stats_table['MASTERS'][_hbp]['PEERS'][int_id(_client)]['TX_FREQ'] = _hbp_data['PEERS'][_client]['TX_FREQ'][:3] + '.' + _hbp_data['PEERS'][_client]['TX_FREQ'][3:7]
_stats_table['MASTERS'][_hbp]['PEERS'][int_id(_client)]['RX_FREQ'] = _hbp_data['PEERS'][_client]['RX_FREQ'][:3] + '.' + _hbp_data['PEERS'][_client]['RX_FREQ'][3:7]
_stats_table['MASTERS'][_hbp]['PEERS'][int_id(_client)]['COLORCODE'] = _hbp_data['PEERS'][_client]['COLORCODE'] _stats_table['MASTERS'][_hbp]['PEERS'][int_id(_client)]['COLORCODE'] = _hbp_data['PEERS'][_client]['COLORCODE']
_slots = _hbp_data['PEERS'][_client]['SLOTS'] _slots = _hbp_data['PEERS'][_client]['SLOTS']
if (_slots <= '2'): if (_slots <= '2'):