Skip to content

Instantly share code, notes, and snippets.

@gartnera
Created September 2, 2014 14:37
Show Gist options
  • Save gartnera/8975a1be6f002233c024 to your computer and use it in GitHub Desktop.
Save gartnera/8975a1be6f002233c024 to your computer and use it in GitHub Desktop.
VMware force html5 console (paste into console)
function openPopoutConsole(vmName, vmId, vAppName, vmDevicesAvailable, buttonLabels, miscLabels, confirmationLabels, isVmrc) {
if (windowHandles[vmId] != null && !windowHandles[vmId].closed) {
windowHandles[vmId].focus();
return;
}
var defaultConsoleWidth = 720;
var defaultConsoleHeight = 400;
var cssWidth = 0;
var cssHeight = 40;
var totalWidth = defaultConsoleWidth + cssWidth;
var totalHeight = defaultConsoleHeight + cssHeight;
var consoleUrl = '/cloud/WebMKSConsole.html';
var winHandle = window.open(consoleUrl, '', "width="+totalWidth+",height="+totalHeight+",resizable=1,location=0,left=0,top=0");
windowData.set(winHandle, {"vmName" : vmName, "vmId" : vmId, "vAppName" : vAppName, "vmDevicesAvailable" : vmDevicesAvailable, "buttonLabels" : buttonLabels, "miscLabels" : miscLabels, "confirmationLabels" : confirmationLabels});
windowHandles[vmId] = winHandle;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment