CP-15576: Hide containers options that aren't available for Windows Server

- Container pause is not available if the the container is on a Windows VM.
- Processes is not available if the the container is on a Windows VM.

Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
This commit is contained in:
Mihaela Stoica 2016-02-12 16:48:52 +00:00
parent 12700a638a
commit cd8ed2d686
2 changed files with 2 additions and 2 deletions

View File

@ -63,7 +63,7 @@ namespace XenAdmin.Commands
private static bool CanExecute(DockerContainer dockerContainer)
{
return dockerContainer.power_state == vm_power_state.Running;
return dockerContainer.power_state == vm_power_state.Running && !dockerContainer.Parent.IsWindows;
}
protected override void ExecuteCore(SelectedItemCollection selection)

View File

@ -1384,7 +1384,7 @@ namespace XenAdmin
ShowTab(TabPagePhysicalStorage, !multi && !SearchMode && ((isHostSelected && isHostLive) || isPoolSelected));
ShowTab(TabPageNetwork, !multi && !SearchMode && (isVMSelected || (isHostSelected && isHostLive) || isPoolSelected));
ShowTab(TabPageNICs, !multi && !SearchMode && ((isHostSelected && isHostLive)));
ShowTab(TabPageDockerProcess, !multi && !SearchMode && isDockerContainerSelected);
ShowTab(TabPageDockerProcess, !multi && !SearchMode && isDockerContainerSelected && !(SelectionManager.Selection.First as DockerContainer).Parent.IsWindows);
ShowTab(TabPageDockerDetails, !multi && !SearchMode && isDockerContainerSelected);
bool isPoolOrLiveStandaloneHost = isPoolSelected || (isHostSelected && isHostLive && selectionPool == null);