diff --git a/rx/templates/index.html b/rx/templates/index.html index 5414aba..8b64a09 100644 --- a/rx/templates/index.html +++ b/rx/templates/index.html @@ -26,6 +26,18 @@ setup_fft_plot(); + $.ajax({ + // Get Wenet configuration information + url: "get_config", + dataType: 'json', + async: true, + success: function(data) { + // Update the current version field. + $('#wenet-version').text("Wenet RX v" + data.version); + $('#my-callsign').text(data.callsign); + } + }); + // Handle an image update. socket.on('image_update', function(msg) { if(document.visibilityState == "hidden"){ @@ -250,7 +262,7 @@
-

Wenet Dashboard

+

Wenet RX

@@ -263,7 +275,10 @@

SNR: 0 dB

-
+
+
N0CALL
+
+
diff --git a/rx/wenetserver.py b/rx/wenetserver.py index 0fbd51e..8c4bdc1 100644 --- a/rx/wenetserver.py +++ b/rx/wenetserver.py @@ -64,6 +64,14 @@ def flask_index(): """ Render main index page """ return flask.render_template('index.html') +@app.route("/get_config") +def serve_config(): + """ Return Configuration Information """ + global my_callsign + return json.dumps({ + "version": WENET_VERSION, + "callsign": my_callsign + }) @app.route("/latest.jpg") def serve_latest_image():