This is an automated email from the ASF dual-hosted git repository.
rohit pushed a commit to branch 4.15
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.15 by this push:
new 4c88021 novnc: Fix vm console is not working on firefox if language
is not English (#4833)
4c88021 is described below
commit 4c88021f816ad4443f2ead3f8a05742ff83ee01a
Author: Wei Zhou <[email protected]>
AuthorDate: Wed Mar 17 13:10:42 2021 +0100
novnc: Fix vm console is not working on firefox if language is not English
(#4833)
---
server/src/main/java/com/cloud/servlet/ConsoleProxyServlet.java | 6 ++++--
systemvm/agent/noVNC/vnc.html | 5 -----
2 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/server/src/main/java/com/cloud/servlet/ConsoleProxyServlet.java
b/server/src/main/java/com/cloud/servlet/ConsoleProxyServlet.java
index 3cbb5f4..622a4c8 100644
--- a/server/src/main/java/com/cloud/servlet/ConsoleProxyServlet.java
+++ b/server/src/main/java/com/cloud/servlet/ConsoleProxyServlet.java
@@ -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
diff --git a/systemvm/agent/noVNC/vnc.html b/systemvm/agent/noVNC/vnc.html
index a244a7d..04c0029 100644
--- a/systemvm/agent/noVNC/vnc.html
+++ b/systemvm/agent/noVNC/vnc.html
@@ -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>