summaryrefslogtreecommitdiffstats
path: root/gui/static
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2015-03-15 19:23:39 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2015-06-19 10:26:02 +0200
commit752fa808e3f148f45b689a026f0e703c83b83d92 (patch)
tree3347c04c69e65a1945a3da1f9d61f9c441169611 /gui/static
parentc31a5cab786b79dc781f80fa3f9dae8376a2ed84 (diff)
downloaddabmux-752fa808e3f148f45b689a026f0e703c83b83d92.tar.gz
dabmux-752fa808e3f148f45b689a026f0e703c83b83d92.tar.bz2
dabmux-752fa808e3f148f45b689a026f0e703c83b83d92.zip
Add a statistics page to gui
Diffstat (limited to 'gui/static')
-rw-r--r--gui/static/stats.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/gui/static/stats.js b/gui/static/stats.js
new file mode 100644
index 0000000..7b07099
--- /dev/null
+++ b/gui/static/stats.js
@@ -0,0 +1,17 @@
+var updatefunc = function(event) {
+ $('#statdata p').remove();
+ $.getJSON('/stats.json', function(result) {
+ $.each(result, function(name) {
+ // TODO: use a hidden template inside the DOM instead
+ // of building the HTML here
+ $("<p></p>")
+ .append(result[name]['inputstat']['num_underruns'])
+ .appendTo('#statdata');
+ });
+ });
+}
+
+// Handle clicks on the to change visiblity of panes
+setInterval(updatefunc, 1000);
+
+