Merge pull request #1897 from SimonFair/device_list-updates

Fix noVNC Scaling.
This commit is contained in:
tom mortensen
2024-10-20 09:50:07 -07:00
committed by GitHub
3 changed files with 3 additions and 3 deletions

View File

@@ -81,7 +81,7 @@ foreach ($vms as $vm) {
if ($vmrcport > 0) {
$wsport = $lv->domain_get_ws_port($res);
$vmrcprotocol = $lv->domain_get_vmrc_protocol($res);
if ($vmrcprotocol == "vnc") $vmrcscale = "&scale=auto"; else $vmrcscale = "";
if ($vmrcprotocol == "vnc") $vmrcscale = "&resize=scale"; else $vmrcscale = "";
$vmrcurl = autov('/plugins/dynamix.vm.manager/'.$vmrcprotocol.'.html',true).$vmrcscale.'&autoconnect=true&host='._var($_SERVER,'HTTP_HOST');
if ($vmrcprotocol == "spice") $vmrcurl .= '&vmname='. urlencode($vm) .'&port=/wsproxy/'.$vmrcport.'/'; else $vmrcurl .= '&port=&path=/wsproxy/'.$wsport.'/';
$graphics = strtoupper($vmrcprotocol).":".$vmrcport."\n";

View File

@@ -133,7 +133,7 @@ case 'domain-start-console':
$vmrcurl = autov('/plugins/dynamix.vm.manager/'.$protocol.'.html',true).'&autoconnect=true&host='._var($_SERVER,'HTTP_HOST');
if ($protocol == "spice") $vmrcurl .= '&vmname='. urlencode($domName) .'&port=/wsproxy/'.$vmrcport.'/'; else $vmrcurl .= '&port=&path=/wsproxy/'.$wsport.'/';
}
if ($protocol == "vnc") $vmrcscale = "&scale=auto"; else $vmrcscale = "";
if ($protocol == "vnc") $vmrcscale = "&resize=scale"; else $vmrcscale = "";
$arrResponse['vmrcurl'] = $vmrcurl.$vmrcscale;
break;

View File

@@ -96,7 +96,7 @@ if ($_POST['vms']) {
if ($vmrcport > 0) {
$wsport = $lv->domain_get_ws_port($res);
$vmrcprotocol = $lv->domain_get_vmrc_protocol($res) ;
if ($vmrcprotocol == "vnc") $vmrcscale = "&scale=auto"; else $vmrcscale = "";
if ($vmrcprotocol == "vnc") $vmrcscale = "&resize=scale"; else $vmrcscale = "";
$vmrcurl = autov('/plugins/dynamix.vm.manager/'.$vmrcprotocol.'.html',true).$vmrcscale.'&autoconnect=true&host=' . $_SERVER['HTTP_HOST'] ;
if ($vmrcprotocol == "spice") $vmrcurl .= '&vmname='. urlencode($vm) . '&port=/wsproxy/'.$vmrcport.'/' ; else $vmrcurl .= '&port=&path=/wsproxy/' . $wsport . '/';
} elseif ($vmrcport == -1 || $autoport) {