From 34c58c4647dbf640b38aa5449f81c26900aeadf9 Mon Sep 17 00:00:00 2001 From: Waldek Date: Sun, 30 May 2021 18:48:03 +0200 Subject: [PATCH] new version server activity window --- templates/main_table.html | 117 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 templates/main_table.html diff --git a/templates/main_table.html b/templates/main_table.html new file mode 100644 index 0000000..6044056 --- /dev/null +++ b/templates/main_table.html @@ -0,0 +1,117 @@ + +
+ .: Server Activity :.  +{% if _table['MASTERS']|length >0 %} + + + + + + + +{% endif %} +
Active QSO's
+
+ {% for _master in _table['MASTERS'] %} + {% for _client, _cdata in _table['MASTERS'][_master]['PEERS'].items() %} + {% if _cdata[1]['TS'] == True or _cdata[2]['TS'] == True %} + {% if _cdata[1]['TRX'] == "RX" %} + [M: {{ _cdata[1]['CALL']|safe }} +  >> {{ _cdata[1]['TG']|safe }}]  + {% endif %} + {% if _cdata[2]['TRX'] == "RX" %} + [M{{ _cdata[2]['CALL']|safe}} +  >> {{_cdata[2]['TG']|safe}}]  + {% endif %} + {% endif %} + {% endfor %} + {% endfor %} +{% else %} + + + + +
Waiting for data from the Server ...
+ {% endif %} + {% for _peer, _pdata in _table['PEERS'].items() %} + {% if _pdata[1]['TS'] == True or _pdata[2]['TS'] == True %} + {% if _pdata[1]['TRX'] == "RX" %} + [M{{ _pdata[1]['CALL']|safe }} +  >> {{ _pdata[1]['TG']|safe }}]  + {% endif %} + {% if _pdata[2]['TRX'] == "RX" %} + [M{{ _pdata[2]['CALL']|safe }} +  >> {{ _pdata[2]['TG']|safe }}]  + {% endif %} + {% endif %} + {% endfor %} +{% if _table['OPENBRIDGES']|length >0 %} + {% for _openbridge in _table['OPENBRIDGES'] %} + {% set rx = namespace(value=0) %} + {% if _table['OPENBRIDGES'][_openbridge]['STREAMS']|length >0 %} + {% for entry in _table['OPENBRIDGES'][_openbridge]['STREAMS'] if _table['OPENBRIDGES'][_openbridge]['STREAMS'][entry][0]=='RX' %} + {% set rx.value=1 %} + {% endfor %} + {% if rx.value == 1 %} + {% for entry in _table['OPENBRIDGES'][_openbridge]['STREAMS'] if _table['OPENBRIDGES'][_openbridge]['STREAMS'][entry][0] == 'RX' %} [O{{ _table['OPENBRIDGES'][_openbridge]['STREAMS'][entry][1]}} >> TG {{ _table['OPENBRIDGES'][_openbridge]['STREAMS'][entry][2]}}] {% endfor %} + {% endif %} + {% endif %} + {% endfor %} +
+
+{% if _table['SETUP']['LASTHEARD'] == True %} + {% include 'lastheard.html' ignore missing %} +{% endif %} +
+ .: Connected to Server :.  + +{% if _table['MASTERS']|length >0 %} +
+
+
  USERS:
+
+ {% for _master in _table['MASTERS'] %} + {% if _table['MASTERS'][_master]['PEERS']|length >0 %} + {% for _client, _cdata in _table['MASTERS'][_master]['PEERS'].items() %} + + {{_cdata['CALLSIGN']}} + + +    DMR ID: {{ _client }}
+ {% if _cdata['RX_FREQ'] == 'N/A' and _cdata['TX_FREQ'] == 'N/A' %} +    Type: IP Network
+ {% else %} +    Type: Radio ({{ _cdata['SLOTS'] }})
+ {% endif %} +    Hardware: {{_cdata['PACKAGE_ID'] }} +
   Soft_Ver: {{_cdata['SOFTWARE_ID'] }} +
   Info: {{_cdata['LOCATION']}} +
   Master: {{_master}} +
  + {% endfor %} + {% endif %} + {% endfor %} +
+{% endif %} +{% if _table['PEERS']|length >0 %} +
+
  PEERS:
+
+ {% for _peer, _pdata in _table['PEERS'].items() %} +   {{_peer}}   + {% if _table['PEERS'][_peer]['STATS']['CONNECTION'] == 'YES' %} + +
Connected
+
+ {% else %} + +
Disconnected
+
+ {% endif %} +
  + {% endfor %} +
+{% endif %} +
+
+