Add status page #30

Merged
W1CDN merged 36 commits from dashboard-page into main 2023-08-26 19:05:45 -05:00
2 changed files with 6 additions and 8 deletions
Showing only changes of commit f694e65c2a - Show all commits

View File

@ -70,9 +70,8 @@ def main():
try:
# Insert data
sql = "INSERT INTO frames ("+attrib_names+") VALUES ("+attrib_values+")"
logging.debug(sql)
conn.execute(sql, list(a.values()))
logging.debug("Frames table updated")
# TODO update stations table here
# Original intent was to include the id from the frames table,
# but that would mean making another query.
@ -87,11 +86,9 @@ def main():
ON CONFLICT([from]) \
DO UPDATE SET count = count + 1,\
last_heard_unix = excluded.last_heard_unix;"
#print(query3)
logging.debug(query3)
# Insert/update data
conn.execute(query3)
logging.debug("Station table updated")
conn.commit()
#except:
# print("Stations table couldn't be updated.")

View File

@ -12,7 +12,10 @@
</head>
<body>
<h1>{{station_call}} Status</h1>
{{station_lat}}, {{station_lon}}
Station location: {{station_lat}}, {{station_lon}}
<h2> About </h2>
This is a work in progress. See <a href="https://amiok.net/gitea/W1CDN/aprs_tool">https://amiok.net/gitea/W1CDN/aprs_tool</a> for usage.
<h2> Recent RF Packets </h2>
<table>
@ -57,7 +60,5 @@
{% endfor %}
</table>
<h2> Help </h2>
This is a work in progress. See <a href="https://amiok.net/gitea/W1CDN/aprs_tool">https://amiok.net/gitea/W1CDN/aprs_tool</a> for usage.
</body>
</html>