diff --git a/aprsd/flask.py b/aprsd/flask.py index d69e34c..7714cb1 100644 --- a/aprsd/flask.py +++ b/aprsd/flask.py @@ -5,6 +5,7 @@ from logging import NullHandler from logging.handlers import RotatingFileHandler import sys +import aprsd from aprsd import messaging, packets, plugin, stats, utils import flask import flask_classful @@ -49,6 +50,7 @@ class APRSDFlask(flask_classful.FlaskView): "index.html", initial_stats=stats, callsign=self.config["aprs"]["login"], + version=aprsd.__version__, config_json=json.dumps(self.config), ) diff --git a/aprsd/web/static/css/index.css b/aprsd/web/static/css/index.css index 64a30c3..95e4c8a 100644 --- a/aprsd/web/static/css/index.css +++ b/aprsd/web/static/css/index.css @@ -1,29 +1,20 @@ body { - display: grid; - grid-template-rows: auto 1fr auto; background: #eeeeee; margin: 2em; - padding: 0; text-align: center; font-family: system-ui, sans-serif; - height: 100vh; } -header { - padding: 2em; - height: 10vh; - margin: 10px; -} - -#main { - padding: 2em; - height: 80vh; -} footer { padding: 2em; text-align: center; height: 10vh; } + +.ui.segment { + background: #eeeeee; +} + #graphs { display: grid; width: 100%; diff --git a/aprsd/web/static/js/charts.js b/aprsd/web/static/js/charts.js index 6de71b3..24285ff 100644 --- a/aprsd/web/static/js/charts.js +++ b/aprsd/web/static/js/charts.js @@ -191,6 +191,9 @@ function update_stats( data ) { function update_packets( data ) { var packetsdiv = $("#packetsDiv"); //nuke the contents first, then add to it. + if (size_dict(packet_list) == 0 && size_dict(data) > 0) { + packetsdiv.html('') + } jQuery.each(data, function(i, val) { if ( packet_list.hasOwnProperty(i) == false ) { packet_list[i] = val; diff --git a/aprsd/web/templates/index.html b/aprsd/web/templates/index.html index 345e85f..b4246f9 100644 --- a/aprsd/web/templates/index.html +++ b/aprsd/web/templates/index.html @@ -48,54 +48,60 @@ -
-
APRSD
-
{{ callsign }}
-
-
-
+
+

APRSD {{ version }}

+
-
- -