summaryrefslogtreecommitdiff
path: root/web/js/kvm/session.js
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2018-11-16 23:23:54 +0300
committerDevaev Maxim <[email protected]>2018-11-16 23:23:54 +0300
commit0bf39f56e26268b68bb598ae06f6f91cc3bdc0f4 (patch)
treec38ea1120de1ec364d0a0d2b77dd8650646176be /web/js/kvm/session.js
parent127b22b4be62ea94d45f3782d7de2444b0d10ce1 (diff)
metadata in web
Diffstat (limited to 'web/js/kvm/session.js')
-rw-r--r--web/js/kvm/session.js14
1 files changed, 13 insertions, 1 deletions
diff --git a/web/js/kvm/session.js b/web/js/kvm/session.js
index 386c781c..f2906110 100644
--- a/web/js/kvm/session.js
+++ b/web/js/kvm/session.js
@@ -26,7 +26,19 @@ function Session() {
if (http.readyState === 4) {
if (http.status === 200) {
var info = JSON.parse(http.responseText).result;
- $("kvmd-version").innerHTML = "kvmd v" + info.version.kvmd;
+ if (info.meta) {
+ $("about-meta").innerHTML = (
+ "// The server metadata.\n"
+ + "// You can get this json using handle /kvmd/info.\n"
+ + "// In the standard configuration this data\n"
+ + "// is specified in the file /etc/kvmd/meta.yaml.\n\n"
+ + JSON.stringify(info.meta, undefined, 4)
+ );
+ if (info.meta.server && info.meta.server.host) {
+ document.title = "Pi-KVM Session - " + info.meta.server.host;
+ $("kvmd-meta-server-host").innerHTML = "Server: " + info.meta.server.host;
+ }
+ }
$("about-version-kvmd").innerHTML = info.version.kvmd;
$("about-version-streamer").innerHTML = info.version.streamer + " (" + info.streamer + ")";
} else {