From af732a3406b461aea2a09b2eb5d836a7269d1651 Mon Sep 17 00:00:00 2001 From: Steve N4IRS Date: Fri, 9 Nov 2018 14:52:12 -0500 Subject: [PATCH] Expand reported LinkTS data --- web_tables.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/web_tables.py b/web_tables.py index e20ad0c..c256449 100755 --- a/web_tables.py +++ b/web_tables.py @@ -20,7 +20,7 @@ from __future__ import print_function -# Standard modules +# Standard modules import logging import sys @@ -111,7 +111,13 @@ def build_hblink_table(_config): _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:6] _stats_table['MASTERS'][_hbp]['PEERS'][int_id(_client)]['COLORCODE'] = _hbp_data['PEERS'][_client]['COLORCODE'] - _stats_table['MASTERS'][_hbp]['PEERS'][int_id(_client)]['SLOTS'] = _hbp_data['PEERS'][_client]['SLOTS'] if (0 < _hbp_data['PEERS'][_client]['SLOTS'] < 3) else 'Both' + _slots = _hbp_data['PEERS'][_client]['SLOTS'] + if (_slots <= '2'): + _stats_table['MASTERS'][_hbp]['PEERS'][int_id(_client)]['SLOTS'] = _slots + elif (_slots == '3'): + _stats_table['MASTERS'][_hbp]['PEERS'][int_id(_client)]['SLOTS'] = 'BOTH' + else: + _stats_table['MASTERS'][_hbp]['PEERS'][int_id(_client)]['SLOTS'] = 'DMO' _stats_table['MASTERS'][_hbp]['PEERS'][int_id(_client)]['LOCATION'] = _hbp_data['PEERS'][_client]['LOCATION'] _stats_table['MASTERS'][_hbp]['PEERS'][int_id(_client)]['CONNECTION'] = _hbp_data['PEERS'][_client]['CONNECTION'] _stats_table['MASTERS'][_hbp]['PEERS'][int_id(_client)]['IP'] = _hbp_data['PEERS'][_client]['IP']