Compare commits
12 Commits
main
...
webserver-
| Author | SHA1 | Date |
|---|---|---|
|
|
16a317951a | |
|
|
708c2eaa61 | |
|
|
2ecdea2236 | |
|
|
1da8548d8f | |
|
|
929c88dd86 | |
|
|
4b0854d4db | |
|
|
143942386c | |
|
|
3b3678925b | |
|
|
ccc2d7291c | |
|
|
b15a64360d | |
|
|
80d33c18bf | |
|
|
82bf9b9f0a |
|
|
@ -16,6 +16,7 @@ This is version HBMonitor V2
|
|||
cd /opt
|
||||
git clone https://github.com/sp2ong/HBMonv2.git
|
||||
cd HBMonv2
|
||||
git checkout webserver-python
|
||||
chmod +x install.sh
|
||||
./install.sh
|
||||
cp config-SAMPLE.py config.py
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
tr:nth-child(even).log {background-color: #fafafa;text-align: center;}
|
||||
|
||||
a:link {
|
||||
color: #0066ff;
|
||||
|
|
|
|||
|
|
@ -754,8 +754,8 @@ def process_message(_bmessage):
|
|||
f = open(PATH+"templates/lastheard.html", "w")
|
||||
f.write("<br><fieldset style=\"border-radius: 8px; background-color:#f0f0f0f0;margin-left:15px;margin-right:15px;font-size:14px;border-top-left-radius: 10px; border-top-right-radius: 10px;border-bottom-left-radius: 10px; border-bottom-right-radius: 10px;\">\n")
|
||||
f.write("<legend><b><font color=\"#000\"> .: Lastheard :. </font></b></legend>\n")
|
||||
f.write("<table style=\"width:100%; font: 10pt arial, sans-serif\">\n")
|
||||
f.write("<TR style=\" height: 32px;font: 10pt arial, sans-serif;"+THEME_COLOR+"\"><TH>Date</TH><TH>Time</TH><TH>Callsign (DMR-Id)</TH><TH>Name</TH><TH>TG#</TH><TH>TG Name</TH><TH>TX (s)</TH><TH>Slot</TH><TH>System</TH></TR>\n")
|
||||
f.write("<table style=\"width:100%; font: 10pt arial, sans-serif;background-color:#f1f1f1;\">\n")
|
||||
f.write("<TR style=\"height: 32px;font: 10pt arial, sans-serif;"+THEME_COLOR+"\"><TH>Date</TH><TH>Time</TH><TH>Callsign (DMR-Id)</TH><TH>Name</TH><TH>TG#</TH><TH>TG Name</TH><TH>TX (s)</TH><TH>System</TH></TR>\n")
|
||||
with open(LOG_PATH+"lastheard.log", "r") as textfile:
|
||||
for row in islice(reversed(list(csv.reader(textfile))),200):
|
||||
duration=row[1]
|
||||
|
|
@ -766,11 +766,11 @@ def process_message(_bmessage):
|
|||
else:
|
||||
qrz = "<a style=\"font: 9pt arial,sans-serif;font-weight:bold;color:#0066ff;\" target=\"_blank\" href=https://qrz.com/db/"+row[11]+">"+row[11]+"</a></b><span style=\"font: 7pt arial,sans-serif\"> ("+row[10]+")</span>"
|
||||
if len(row) < 13:
|
||||
hline="<TR style=\"background-color:#f9f9f9f9;\"><TD>"+row[0][:10]+"</TD><TD>"+row[0][11:16]+"</TD><TD>"+qrz+"</TD><TD><font color=#002d62><b></b></font></TD><TD><font color=#b5651d><b>"+row[8][2:]+"</b></font></TD><TD><font color=green><b>"+row[9]+"</b></font></TD><TD>"+dur+"</TD><TD>"+row[7][2:]+"</TD><TD>"+row[4]+"</TD></TR>"
|
||||
hline="<TR class=\"log\"><TD>"+row[0][:10]+"</TD><TD>"+row[0][11:16]+"</TD><TD>"+qrz+"</TD><TD><font color=#002d62><b></b></font></TD><TD><font color=#b5651d><b>"+row[8][2:]+"</b></font></TD><TD><font color=green><b>"+row[9]+"</b></font></TD><TD>"+dur+"</TD><TD>"+row[4]+"</TD></TR>"
|
||||
my_list.append(row[10])
|
||||
n += 1
|
||||
else:
|
||||
hline="<TR style=\"background-color:#f9f9f9f9;\"><TD>"+row[0][:10]+"</TD><TD>"+row[0][11:16]+"</TD><TD>"+qrz+"</TD><TD><font color=#002d62><b>"+row[12]+"</b></font></TD><TD><font color=#b5651d><b>"+row[8][2:]+"</b></font></TD><TD><font color=green><b>"+row[9]+"</b></font></TD><TD>"+dur+"</TD><TD>"+row[7][2:]+"</TD><TD>"+row[4]+"</TD></TR>"
|
||||
hline="<TR class=\"log\"><TD>"+row[0][:10]+"</TD><TD>"+row[0][11:16]+"</TD><TD>"+qrz+"</TD><TD><font color=#002d62><b>"+row[12]+"</b></font></TD><TD><font color=#b5651d><b>"+row[8][2:]+"</b></font></TD><TD><font color=green><b>"+row[9]+"</b></font></TD><TD>"+dur+"</TD><TD>"+row[4]+"</TD></TR>"
|
||||
my_list.append(row[10])
|
||||
n += 1
|
||||
f.write(hline+"\n")
|
||||
|
|
|
|||
|
|
@ -2,4 +2,6 @@ Twisted
|
|||
dmr_utils3
|
||||
bitstring
|
||||
autobahn
|
||||
jinja2
|
||||
jinja2==2.11.3
|
||||
markupsafe==2.0.1
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -14,12 +14,12 @@
|
|||
<tr style="background-color:#f9f9f9f9;line-height:1.4;">
|
||||
{% if _cdata[1]['TRX'] == "RX" %}
|
||||
<td style="font-weight:bold; padding-left: 20px; text-align:left;color:#464646;">M: {{_master}}</td>
|
||||
<td style="font: 9.5pt arial, sans-serif;font-weight: 600;color:#0d1a81;">{{ _cdata[1]['SUB']|safe }} [<span style="align-items: center;justify-content:center;font-size: 8pt;font-weight:600;color:brown;">TS {{ 1 if _cdata[1]['TS'] == True else 2 }}</span>]</td>
|
||||
<td style="font: 9.5pt arial, sans-serif;font-weight: 600;color:#0d1a81;">{{ _cdata[1]['SUB']|safe }}</td>
|
||||
<td style="font: 9.5pt arial, sans-serif;font-weight: 600;color:#b5651d;">{{ _cdata[1]['DEST']|safe }}</td>
|
||||
{% endif %}
|
||||
{% if _cdata[2]['TRX'] == "RX" %}
|
||||
<td style="font-weight:bold; padding-left: 20px; text-align:left;color:#464646">M: {{_master}}</td>
|
||||
<td style="font: 9.5pt arial, sans-serif;font-weight: 600;color:#0d1a81;">{{ _cdata[2]['SUB']|safe }} [<span style="align-items: center;justify-content:center;font-size: 8pt;font-weight:600;color:brown;">TS {{ 1 if _cdata[1]['TS'] == True else 2 }}</span>]</td>
|
||||
<td style="font: 9.5pt arial, sans-serif;font-weight: 600;color:#0d1a81;">{{ _cdata[2]['SUB']|safe }}</td>
|
||||
<td style="font: 9.5pt arial, sans-serif;font-weight: 600;color:#b5651d;">{{ _cdata[2]['DEST']|safe }}</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
|
|
@ -39,12 +39,12 @@
|
|||
<tr style="background-color:#f9f9f9f9;line-height:1.4;">
|
||||
{% if _pdata[1]['TRX'] == "RX" %}
|
||||
<td style="font-weight:bold; padding-left: 20px; text-align:left;color:#464646;">P: {{_peer}} </td>
|
||||
<td style="font: 9.5pt arial, sans-serif;font-weight: 600;color:#0d1a81;">{{ _pdata[1]['SUB']|safe }} [<span style="align-items: center;justify-content:center;font-size: 8pt;font-weight:600;color:brown;">TS {{ 1 if _pdata[1]['TS'] == True else 2 }}</span>]</td>
|
||||
<td style="font: 9.5pt arial, sans-serif;font-weight: 600;color:#0d1a81;">{{ _pdata[1]['SUB']|safe }}</td>
|
||||
<td style="font: 9.5pt arial, sans-serif;font-weight: 600;color:#b5651d;">{{ _pdata[1]['DEST']|safe }}</td>
|
||||
{% endif %}
|
||||
{% if _pdata[2]['TRX'] == "RX" %}
|
||||
<td style="font-weight:bold; padding-left: 20px; text-align:left;color:#464646;">P: {{_peer}} </td>
|
||||
<td style="font: 9.5pt arial, sans-serif;font-weight: 600;color:#0d1a81;">{{ _pdata[2]['SUB']|safe }} [<span style="align-items: center;justify-content:center;font-size: 8pt;font-weight:600;color:brown;">TS {{ 1 if _pdata[1]['TS'] == True else 2 }}</span>]</td>
|
||||
<td style="font: 9.5pt arial, sans-serif;font-weight: 600;color:#0d1a81;">{{ _pdata[2]['SUB']|safe }}</td>
|
||||
<td style="font: 9.5pt arial, sans-serif;font-weight: 600;color:#b5651d;">{{ _pdata[2]['DEST']|safe }}</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
|
|
@ -66,7 +66,7 @@
|
|||
<tr style="background-color:#f9f9f9f9;line-height:1.6;">
|
||||
<td style="font-weight:bold; padding-left: 20px; text-align:left;"> {{ _openbridge}} </td>
|
||||
<td colspan=2 style="background-color:#f9f9f9f9; font: 9pt arial, sans-serif; font-weight: 600; color:#464646;">
|
||||
{% for entry in _table['OPENBRIDGES'][_openbridge]['STREAMS'] if _table['OPENBRIDGES'][_openbridge]['STREAMS'][entry][0] == 'RX' %}[<span style="color:#008000;">{{ _table['OPENBRIDGES'][_openbridge]['STREAMS'][entry][0] }}</span>: <font color=#0065ff> {{ _table['OPENBRIDGES'][_openbridge]['STREAMS'][entry][1] }}</font> >> <font color=#b5651d> {{ _table['OPENBRIDGES'][_openbridge]['STREAMS'][entry][2] }}</font>] {% endfor %}
|
||||
{% for entry in _table['OPENBRIDGES'][_openbridge]['STREAMS'] if _table['OPENBRIDGES'][_openbridge]['STREAMS'][entry][0] == 'RX' %}[<font color=#0065ff> {{ _table['OPENBRIDGES'][_openbridge]['STREAMS'][entry][1] }}</font> >> <font color=#b5651d> {{ _table['OPENBRIDGES'][_openbridge]['STREAMS'][entry][2] }}</font>] {% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
|
|
@ -114,7 +114,7 @@
|
|||
<div style="text-align:left;"><span style="color:#464646;font-weight:600;line-height:1.8;"> PEERS:</span></div>
|
||||
<div style="text-align:left;font:9.5pt arial, sans-serif;font-weight:bold;margin-left:25px; margin-right:25px;line-height:1.6;white-space:normal;">
|
||||
{% for _peer, _pdata in _table['PEERS'].items() %}
|
||||
<span class="tooltip" style="border-bottom: 1px dotted white;{{'background-color:#8ecfb4; color:#464646;' if _table['PEERS'][_peer]['STATS']['CONNECTION'] == 'YES' else 'background-color:#ff0000; color:white;'}}"><b> {{_peer}} </b>
|
||||
<span class="tooltip" style="bmargin-bottom:6px;order-bottom: 1px dotted white;{{'background-color:#8ecfb4; color:#464646;' if _table['PEERS'][_peer]['STATS']['CONNECTION'] == 'YES' else 'background-color:#ff0000; color:white;'}}"><b> {{_peer}} </b>
|
||||
{% if _table['PEERS'][_peer]['STATS']['CONNECTION'] == 'YES' %}
|
||||
<span class="tooltiptext" style="top:120%;left:50%;margin-left:-70%;width:100px;padding: 2px 0;">
|
||||
<center><font color=white>Connected</font></center>
|
||||
|
|
|
|||
Loading…
Reference in New Issue