novnc: Fix vm console is not working on firefox if language is not English (#4833)

This commit is contained in:
Wei Zhou 2021-03-17 13:10:42 +01:00 committed by GitHub
parent a291dea26a
commit 4c88021f81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 7 deletions

View File

@ -495,8 +495,10 @@ public class ConsoleProxyServlet extends HttpServlet {
if (param.getHypervHost() != null || !ConsoleProxyManager.NoVncConsoleDefault.value()) {
sb.append("/ajax?token=" + encryptor.encryptObject(ConsoleProxyClientParam.class, param));
} else {
sb.append("/resource/noVNC/vnc.html?port=" + ConsoleProxyManager.DEFAULT_NOVNC_PORT + "&token="
+ encryptor.encryptObject(ConsoleProxyClientParam.class, param));
sb.append("/resource/noVNC/vnc.html")
.append("?autoconnect=true")
.append("&port=" + ConsoleProxyManager.DEFAULT_NOVNC_PORT)
.append("&token=" + encryptor.encryptObject(ConsoleProxyClientParam.class, param));
}
// for console access, we need guest OS type to help implement keyboard

View File

@ -333,9 +333,4 @@
<source src="app/sounds/bell.mp3" type="audio/mpeg">
</audio>
</body>
<script type="application/javascript">
window.onload = function() {
document.getElementById("noVNC_connect_button").click();
}
</script>
</html>