From 47894249deb0071ca632bd6d6445525e0c7659ff 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 | 14 +++++++--- hw_diag/templates/wingbits_graph1090.html | 24 +++++++++++++++++ hw_diag/templates/wingbits_tar1090.html | 24 +++++++++++++++++ hw_diag/views/wingbits.py | 32 +++++++++++++++++++++++ 4 files changed, 90 insertions(+), 4 deletions(-) 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..a97b4b32 100644 --- a/hw_diag/templates/wingbits.html +++ b/hw_diag/templates/wingbits.html @@ -7,7 +7,7 @@

Wingbits Configuration

-
+
{% if error %}
@@ -41,14 +41,20 @@

Wingbits Configuration


- + +    + Live Map +    + Statistics +    + Wingbits Dashboard

-
-
+
+
diff --git a/hw_diag/templates/wingbits_graph1090.html b/hw_diag/templates/wingbits_graph1090.html new file mode 100644 index 00000000..fd3957f8 --- /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..13138f19 --- /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
SDR Operational