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 4 deletions
Showing only changes of commit 8f3b2ae707 - Show all commits

View File

@ -110,8 +110,6 @@ def index():
# Play with function to create station list
stations = unique_stations(get_db_connection())
print(stations)
return render_template('index.html',
station_call = config['Settings']['station_call'],

View File

@ -64,12 +64,16 @@ def main():
try:
# Insert data
conn.execute(sql, list(a.values()))
# TODO update stations table here
conn.commit()
# TODO remove packets that are older ('created') than a limit set in config.ini
# "5 minutes" also works
conn.execute("DELETE FROM frames WHERE created < DATETIME('now', '"+config['Settings']['keep_time']+"')")
conn.commit()
#conn.execute("DELETE FROM frames WHERE created < DATETIME('now', '"+config['Settings']['keep_time']+"')")
#conn.commit()
except:
print("Error with SQLite!")
except: