From 905cac387721d2ce2b89bf91c41d89ce3a2493f1 Mon Sep 17 00:00:00 2001 From: Eric Swanson Date: Tue, 15 May 2018 16:23:10 -0700 Subject: [PATCH] Native VNC creds --- vnc_auto.html | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/vnc_auto.html b/vnc_auto.html index f8ce458b..8798614e 100644 --- a/vnc_auto.html +++ b/vnc_auto.html @@ -44,6 +44,24 @@ location.href = "https://www.priceyak.com/expired"; }, 1000 * 3600 * 12); + + @@ -86,6 +104,11 @@
+
Show VNC Credentials
+ + + +
VNC Host:
VNC Password:
@@ -266,6 +289,7 @@ password = WebUtil.getConfigVar('password', ''); path = WebUtil.getConfigVar('path', 'websockify'); + var vncPort = WebUtil.getConfigVar('vncport', ''); // If a token variable is passed in, set the parameter in a cookie. // This is used by nova-novncproxy. @@ -319,6 +343,12 @@ } window.history.replaceState({}, document.title, window.location.pathname + "?rid=" + rid); + document.getElementById('zn-creds-host').innerHTML = window.location.hostname + ":" + vncPort; + document.getElementById('zn-creds-password').innerHTML = password; + document.getElementById('zn-show-creds').addEventListener('click', function() { + document.getElementById('zn-creds').style.display = "block"; + }); + rfb.connect(host, port, password, path); };