CP-6137: Work in Console tab for vGPU (PR-1675)

# HG changeset patch
# User Mihaela Stoica <Mihaela.Stoica@citrix.com>
# Date 1384254998 0
#      Tue Nov 12 11:16:38 2013 +0000
# Node ID 6b3fc3d7a54e58e92ecfe714d19c8dc26b7a0565
# Parent  2cc90cb50e7ff2566f9d0833ad17735922d3f0c9

- Only close the inactive VNC consoles (not RDP) after an interval

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
This commit is contained in:
Konstantina Chremmou 2013-11-14 12:33:02 +00:00
parent c843f5b867
commit e9b6c0699b
3 changed files with 18 additions and 1 deletions

View File

@ -1367,5 +1367,9 @@ namespace XenAdmin.ConsoleView
vncScreen.Source.HasGPUPassthrough && vncScreen.Source.power_state == vm_power_state.Running;
}
internal bool IsVNC
{
get { return vncScreen.UseVNC; }
}
}
}

View File

@ -259,5 +259,10 @@ namespace XenAdmin.ConsoleView
{
vncTabView.setupCD();
}
internal bool IsVNC
{
get { return vncTabView.IsVNC; }
}
}
}

View File

@ -316,6 +316,14 @@ namespace XenAdmin.Controls
activeVMConsoles.Remove(source);
}
public void closeVNCForSource(VM source, bool vncOnly)
{
if (!vncViews.ContainsKey(source) || vncViews[source] == null
|| (vncOnly && !vncViews[source].IsVNC))
return;
closeVNCForSource(source);
}
public bool isVNCPausedForSource(VM source)
{
Program.AssertOnEventThread();
@ -445,7 +453,7 @@ namespace XenAdmin.Controls
try
{
log.DebugFormat("ConsolePanel: closeVNCForSource({0}) in delegate", vm.Name);
closeVNCForSource(vm);
closeVNCForSource(vm, true);
}
catch (Exception exception)
{