Native VNC creds
This commit is contained in:
parent
06a686eb79
commit
905cac3877
|
|
@ -44,6 +44,24 @@
|
|||
location.href = "https://www.priceyak.com/expired";
|
||||
}, 1000 * 3600 * 12);
|
||||
</script>
|
||||
|
||||
<style type="text/css">
|
||||
#zn-creds {
|
||||
display: none;
|
||||
color:white;
|
||||
padding-left: 5px;
|
||||
font-size: 20px;
|
||||
font-family: monospace;
|
||||
}
|
||||
#zn-show-creds {
|
||||
color:white;
|
||||
padding-left: 5px;
|
||||
font-size: 20px;
|
||||
}
|
||||
.zn-creds-left {
|
||||
padding-right: 20px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body style="margin: 0px;">
|
||||
|
|
@ -86,6 +104,11 @@
|
|||
<div>
|
||||
<a target="_blank" id="zn-download-link" style="display: none; color:white; padding-left: 5px; font-size: 20px;" href="#">Access your downloaded files here</a>
|
||||
</div>
|
||||
<div><a id="zn-show-creds" href="#">Show VNC Credentials</a></div>
|
||||
<table id="zn-creds"><tbody>
|
||||
<tr><td class="zn-creds-left">VNC Host: </td><td id="zn-creds-host"></td></tr>
|
||||
<tr><td class="zn-creds-left">VNC Password: </td><td id="zn-creds-password"></td></tr>
|
||||
</tbody></table>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
@ -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);
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue