Native VNC creds
This commit is contained in:
parent
06a686eb79
commit
905cac3877
|
|
@ -44,6 +44,24 @@
|
||||||
location.href = "https://www.priceyak.com/expired";
|
location.href = "https://www.priceyak.com/expired";
|
||||||
}, 1000 * 3600 * 12);
|
}, 1000 * 3600 * 12);
|
||||||
</script>
|
</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>
|
</head>
|
||||||
|
|
||||||
<body style="margin: 0px;">
|
<body style="margin: 0px;">
|
||||||
|
|
@ -86,6 +104,11 @@
|
||||||
<div>
|
<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>
|
<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>
|
||||||
|
<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>
|
</div>
|
||||||
|
|
||||||
|
|
@ -266,6 +289,7 @@
|
||||||
|
|
||||||
password = WebUtil.getConfigVar('password', '');
|
password = WebUtil.getConfigVar('password', '');
|
||||||
path = WebUtil.getConfigVar('path', 'websockify');
|
path = WebUtil.getConfigVar('path', 'websockify');
|
||||||
|
var vncPort = WebUtil.getConfigVar('vncport', '');
|
||||||
|
|
||||||
// If a token variable is passed in, set the parameter in a cookie.
|
// If a token variable is passed in, set the parameter in a cookie.
|
||||||
// This is used by nova-novncproxy.
|
// This is used by nova-novncproxy.
|
||||||
|
|
@ -319,6 +343,12 @@
|
||||||
}
|
}
|
||||||
window.history.replaceState({}, document.title, window.location.pathname + "?rid=" + rid);
|
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);
|
rfb.connect(host, port, password, path);
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue