mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 01:32:18 +02:00
noVNC: make show dot configurable (#11741)
This commit is contained in:
parent
9cc88b8dcc
commit
3159fa7d84
@ -56,6 +56,10 @@ public interface ConsoleProxyManager extends Manager, ConsoleProxyService {
|
||||
ConfigKey<Boolean> NoVncConsoleSourceIpCheckEnabled = new ConfigKey<>(ConfigKey.CATEGORY_ADVANCED, Boolean.class, "novnc.console.sourceip.check.enabled", "false",
|
||||
"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);
|
||||
|
||||
ConfigKey<Boolean> NoVncConsoleShowDot = new ConfigKey<>(Boolean.class, "novnc.console.show.dot", ConfigKey.CATEGORY_ADVANCED, "true",
|
||||
"If true, in noVNC console a dot cursor will be shown when the remote server provides no local cursor, or provides a fully-transparent (invisible) cursor.",
|
||||
true, ConfigKey.Scope.Zone, null);
|
||||
|
||||
ConfigKey<String> ConsoleProxyServiceOffering = new ConfigKey<>(String.class, "consoleproxy.service.offering", "Console Proxy", null,
|
||||
"Uuid of the service offering used by console proxy; if NULL - system offering will be used", true, ConfigKey.Scope.Zone, null);
|
||||
|
||||
|
||||
@ -1572,7 +1572,7 @@ public class ConsoleProxyManagerImpl extends ManagerBase implements ConsoleProxy
|
||||
public ConfigKey<?>[] getConfigKeys() {
|
||||
return new ConfigKey<?>[] { ConsoleProxySslEnabled, NoVncConsoleDefault, NoVncConsoleSourceIpCheckEnabled, ConsoleProxyServiceOffering,
|
||||
ConsoleProxyCapacityStandby, ConsoleProxyCapacityScanInterval, ConsoleProxyCmdPort, ConsoleProxyRestart, ConsoleProxyUrlDomain, ConsoleProxySessionMax, ConsoleProxySessionTimeout, ConsoleProxyDisableRpFilter, ConsoleProxyLaunchMax,
|
||||
ConsoleProxyManagementLastState, ConsoleProxyServiceManagementState };
|
||||
ConsoleProxyManagementLastState, ConsoleProxyServiceManagementState, NoVncConsoleShowDot };
|
||||
}
|
||||
|
||||
protected ConsoleProxyStatus parseJsonToConsoleProxyStatus(String json) throws JsonParseException {
|
||||
|
||||
@ -89,6 +89,8 @@ import com.cloud.vm.dao.VMInstanceDetailsDao;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
|
||||
import static com.cloud.consoleproxy.ConsoleProxyManager.NoVncConsoleShowDot;
|
||||
|
||||
public class ConsoleAccessManagerImpl extends ManagerBase implements ConsoleAccessManager {
|
||||
|
||||
@Inject
|
||||
@ -565,8 +567,9 @@ public class ConsoleAccessManagerImpl extends ManagerBase implements ConsoleAcce
|
||||
if (param.getHypervHost() != null || !ConsoleProxyManager.NoVncConsoleDefault.value()) {
|
||||
sb.append("/ajax?token=").append(token);
|
||||
} else {
|
||||
String showDot = NoVncConsoleShowDot.valueIn(vm.getDataCenterId()) ? "true" : "false";
|
||||
sb.append("/resource/noVNC/vnc.html")
|
||||
.append("?autoconnect=true&show_dot=true")
|
||||
.append("?autoconnect=true&show_dot=").append(showDot)
|
||||
.append("&port=").append(vncPort)
|
||||
.append("&token=").append(token);
|
||||
if (requiresVncOverWebSocketConnection(vm, hostVo) && StringUtils.isNotBlank(locale)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user