From 183d78b027ca67ce1a4c6bc6e6b51eb1f8260f6c Mon Sep 17 00:00:00 2001 From: Alan Bernstein Date: Wed, 26 Apr 2017 14:16:39 -0500 Subject: [PATCH] Show version string in header --- webui/assets/main.js | 13 +++++++++++++ webui/index.html | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/webui/assets/main.js b/webui/assets/main.js index 0e7ed8d99..4ac04fbb4 100644 --- a/webui/assets/main.js +++ b/webui/assets/main.js @@ -218,6 +218,18 @@ class REPL { } +function populate_version() { + var xhr = new XMLHttpRequest(); + xhr.open('GET', '/version') + var node = document.getElementById('server-version') + + xhr.onload = function() { + version = JSON.parse(xhr.responseText)['version'] + node.innerHTML = version + } + xhr.send(null) +} + function setNav(e) { // toggle the nav buttons document.getElementsByClassName("nav-active")[0].classList.remove("nav-active") @@ -258,6 +270,7 @@ Date.prototype.timeNow = function () { return ((this.getHours() < 10)?"0":"") + this.getHours() +":"+ ((this.getMinutes() < 10)?"0":"") + this.getMinutes() +":"+ ((this.getSeconds() < 10)?"0":"") + this.getSeconds(); } +populate_version() const input = document.getElementById('query') const output = document.getElementById('outputs') diff --git a/webui/index.html b/webui/index.html index 1e3346d26..f12d8a841 100644 --- a/webui/index.html +++ b/webui/index.html @@ -11,7 +11,7 @@
- Support +