From 60e336ef1cfb71340cd09ce42164dfce914290e0 Mon Sep 17 00:00:00 2001 From: Robert Putt Date: Thu, 4 Jul 2024 20:38:37 +0100 Subject: [PATCH] Add TAR1090 and Graphs1090 Frames --- hw_diag/templates/wingbits.html | 6 ++++- hw_diag/templates/wingbits_graph1090.html | 24 +++++++++++++++++ hw_diag/templates/wingbits_tar1090.html | 24 +++++++++++++++++ hw_diag/views/wingbits.py | 32 +++++++++++++++++++++++ 4 files changed, 85 insertions(+), 1 deletion(-) create mode 100644 hw_diag/templates/wingbits_graph1090.html create mode 100644 hw_diag/templates/wingbits_tar1090.html diff --git a/hw_diag/templates/wingbits.html b/hw_diag/templates/wingbits.html index bf6aa263..a025ecff 100644 --- a/hw_diag/templates/wingbits.html +++ b/hw_diag/templates/wingbits.html @@ -41,7 +41,11 @@

Wingbits Configuration


- + +    + Live Map +    + Statistics

diff --git a/hw_diag/templates/wingbits_graph1090.html b/hw_diag/templates/wingbits_graph1090.html new file mode 100644 index 00000000..50a8d640 --- /dev/null +++ b/hw_diag/templates/wingbits_graph1090.html @@ -0,0 +1,24 @@ +{% extends 'template_hyper.html' %} + +{% block title %}Wingbits - GRAPHS1090{% endblock %} + +{% block body %} + + + +{% endblock %} diff --git a/hw_diag/templates/wingbits_tar1090.html b/hw_diag/templates/wingbits_tar1090.html new file mode 100644 index 00000000..847195c7 --- /dev/null +++ b/hw_diag/templates/wingbits_tar1090.html @@ -0,0 +1,24 @@ +{% extends 'template_hyper.html' %} + +{% block title %}Wingbits - TAR1090{% endblock %} + +{% block body %} + + + +{% endblock %} diff --git a/hw_diag/views/wingbits.py b/hw_diag/views/wingbits.py index 3e859cbb..422cc53d 100644 --- a/hw_diag/views/wingbits.py +++ b/hw_diag/views/wingbits.py @@ -65,6 +65,38 @@ def get_wingbits_dashboard(): ) +@WINGBITS.route('/wingbits/tar1090') +@authenticate +@commercial_fleet_only +def get_wingbits_tar1090(): + diagnostics = read_diagnostics_file() + claim_deeplink = claim_miner_deeplink() + now = round(time.time()) + + return render_template( + 'wingbits_tar1090.html', + diagnostics=diagnostics, + claim_deeplink=claim_deeplink, + now=now + ) + + +@WINGBITS.route('/wingbits/graphs1090') +@authenticate +@commercial_fleet_only +def get_wingbits_graphs1090(): + diagnostics = read_diagnostics_file() + claim_deeplink = claim_miner_deeplink() + now = round(time.time()) + + return render_template( + 'wingbits_graph1090.html', + diagnostics=diagnostics, + claim_deeplink=claim_deeplink, + now=now + ) + + @WINGBITS.route('/wingbits', methods=['POST']) @authenticate @commercial_fleet_only