CA-285215: Cancel button should be enabled on the Patching wizard when the update installation is in progress

- also fixing an error on the patching wizard where a null reference exception is thrown if, when the wizard is cancelled, the host where an update has been uploaded is not connected anymore

Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
This commit is contained in:
Mihaela Stoica 2018-04-05 12:47:27 +01:00 committed by Konstantina Chremmou
parent e85954fb75
commit 1925fc9ec4
3 changed files with 3 additions and 3 deletions

View File

@ -384,7 +384,7 @@ namespace XenAdmin.Wizards.PatchingWizard
{
if (PatchingWizard_UploadPage.AllIntroducedPoolUpdates != null && PatchingWizard_UploadPage.AllIntroducedPoolUpdates.Count > 0)
{
return PatchingWizard_UploadPage.AllIntroducedPoolUpdates.Keys.Select(GetCleanUpPoolUpdateAction).ToList();
return PatchingWizard_UploadPage.AllIntroducedPoolUpdates.Keys.Where(u => u.Connection != null && u.Connection.IsConnected).Select(GetCleanUpPoolUpdateAction).ToList();
}
return new List<AsyncAction>();

View File

@ -105,7 +105,7 @@ namespace XenAdmin.Wizards.PatchingWizard
return _nextEnabled;
}
private bool _cancelEnabled;
private bool _cancelEnabled = true;
public override bool EnableCancel()
{
return _cancelEnabled;

View File

@ -114,7 +114,7 @@ namespace XenAdmin.Wizards.PatchingWizard
return _nextEnabled;
}
private bool _cancelEnabled;
private bool _cancelEnabled = true;
public override bool EnableCancel()
{
return _cancelEnabled;