Skip to content

Commit 3418328

Browse files
committed
noVNC: make show dot configurable
1 parent ec533cd commit 3418328

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

server/src/main/java/com/cloud/consoleproxy/ConsoleProxyManager.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ public interface ConsoleProxyManager extends Manager, ConsoleProxyService {
5656
ConfigKey<Boolean> NoVncConsoleSourceIpCheckEnabled = new ConfigKey<>(ConfigKey.CATEGORY_ADVANCED, Boolean.class, "novnc.console.sourceip.check.enabled", "false",
5757
"If true, The source IP to access novnc console must be same as the IP in request to management server for console URL. Needs to reconnect CPVM to management server when this changes (via restart CPVM, or management server, or cloud service in CPVM)", false);
5858

59+
ConfigKey<Boolean> NoVncConsoleShowDot = new ConfigKey<>(ConfigKey.CATEGORY_ADVANCED, Boolean.class, "novnc.console.show.dot", "true",
60+
"If true, a dot cursor should be shown when the remote server provides no local cursor, or provides a fully-transparent (invisible) cursor.", false);
61+
5962
ConfigKey<String> ConsoleProxyServiceOffering = new ConfigKey<>(String.class, "consoleproxy.service.offering", "Console Proxy", null,
6063
"Uuid of the service offering used by console proxy; if NULL - system offering will be used", true, ConfigKey.Scope.Zone, null);
6164

server/src/main/java/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1572,7 +1572,7 @@ public String getConfigComponentName() {
15721572
public ConfigKey<?>[] getConfigKeys() {
15731573
return new ConfigKey<?>[] { ConsoleProxySslEnabled, NoVncConsoleDefault, NoVncConsoleSourceIpCheckEnabled, ConsoleProxyServiceOffering,
15741574
ConsoleProxyCapacityStandby, ConsoleProxyCapacityScanInterval, ConsoleProxyCmdPort, ConsoleProxyRestart, ConsoleProxyUrlDomain, ConsoleProxySessionMax, ConsoleProxySessionTimeout, ConsoleProxyDisableRpFilter, ConsoleProxyLaunchMax,
1575-
ConsoleProxyManagementLastState, ConsoleProxyServiceManagementState };
1575+
ConsoleProxyManagementLastState, ConsoleProxyServiceManagementState, NoVncConsoleShowDot };
15761576
}
15771577

15781578
protected ConsoleProxyStatus parseJsonToConsoleProxyStatus(String json) throws JsonParseException {

server/src/main/java/org/apache/cloudstack/consoleproxy/ConsoleAccessManagerImpl.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@
9090
import java.util.concurrent.ScheduledExecutorService;
9191
import java.util.concurrent.TimeUnit;
9292

93+
import static com.cloud.consoleproxy.ConsoleProxyManager.NoVncConsoleShowDot;
94+
9395
public class ConsoleAccessManagerImpl extends ManagerBase implements ConsoleAccessManager {
9496

9597
@Inject
@@ -515,8 +517,9 @@ private String generateConsoleAccessUrl(String rootUrl, ConsoleProxyClientParam
515517
if (param.getHypervHost() != null || !ConsoleProxyManager.NoVncConsoleDefault.value()) {
516518
sb.append("/ajax?token=" + token);
517519
} else {
520+
String showDot = NoVncConsoleShowDot.valueIn(vm.getDataCenterId()) ? "true" : "false";
518521
sb.append("/resource/noVNC/vnc.html")
519-
.append("?autoconnect=true&show_dot=true")
522+
.append("?autoconnect=true&show_dot=").append(showDot)
520523
.append("&port=" + vncPort)
521524
.append("&token=" + token);
522525
if (requiresVncOverWebSocketConnection(vm, hostVo) && details != null && details.getValue() != null) {

0 commit comments

Comments
 (0)