From 564b65fbb583555b8bce88b311460180aa967823 Mon Sep 17 00:00:00 2001 From: Mihaela Stoica Date: Thu, 7 Aug 2014 12:52:14 +0100 Subject: [PATCH] CA-141870: Hotfix uploads to all connected servers before asking which servers you want - Fixed Updates view: on pressing Download and Install, open the wizard at "Servers" page, select all the servers that the patch applies to, and disable all the others. Signed-off-by: Mihaela Stoica --- XenAdmin/TabPages/ManageUpdatesPage.cs | 2 -- .../Wizards/PatchingWizard/PatchingWizard.cs | 1 + .../PatchingWizard_SelectServers.cs | 20 +++++++++++++++++++ 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/XenAdmin/TabPages/ManageUpdatesPage.cs b/XenAdmin/TabPages/ManageUpdatesPage.cs index 1a44ce429..532b8895a 100644 --- a/XenAdmin/TabPages/ManageUpdatesPage.cs +++ b/XenAdmin/TabPages/ManageUpdatesPage.cs @@ -409,8 +409,6 @@ namespace XenAdmin.TabPages if (hosts.Count > 0) { wizard.SelectServers(hosts); - if (wizard.CurrentStepTabPage.EnableNext()) - wizard.NextStep(); } else { diff --git a/XenAdmin/Wizards/PatchingWizard/PatchingWizard.cs b/XenAdmin/Wizards/PatchingWizard/PatchingWizard.cs index 88a2e9d3b..f823d4de8 100644 --- a/XenAdmin/Wizards/PatchingWizard/PatchingWizard.cs +++ b/XenAdmin/Wizards/PatchingWizard/PatchingWizard.cs @@ -81,6 +81,7 @@ namespace XenAdmin.Wizards.PatchingWizard public void SelectServers(List selectedServers) { PatchingWizard_SelectServers.SelectServers(selectedServers); + PatchingWizard_SelectServers.DisableUnselectedServers(); } protected override void UpdateWizardContent(XenTabPage senderPage) diff --git a/XenAdmin/Wizards/PatchingWizard/PatchingWizard_SelectServers.cs b/XenAdmin/Wizards/PatchingWizard/PatchingWizard_SelectServers.cs index a7284f69d..809f88e0e 100644 --- a/XenAdmin/Wizards/PatchingWizard/PatchingWizard_SelectServers.cs +++ b/XenAdmin/Wizards/PatchingWizard/PatchingWizard_SelectServers.cs @@ -394,6 +394,17 @@ namespace XenAdmin.Wizards.PatchingWizard } } + public void DisableUnselectedServers() + { + foreach (PatchingHostsDataGridViewRow row in dataGridViewHosts.Rows) + { + if (row.Enabled && row.CheckValue == UNCHECKED) + { + row.Enabled = false; + } + } + } + #endregion private void buttonSelectAll_Click(object sender, EventArgs e) @@ -684,6 +695,15 @@ namespace XenAdmin.Wizards.PatchingWizard } } + public int CheckValue + { + get { + return Tag is Pool || (Tag is Host && !_hasPool) + ? (int) Cells[POOL_CHECKBOX_COL].Value + : (int) Cells[POOL_ICON_HOST_CHECKBOX_COL].Value; + } + } + private void SetupCells() { _poolCheckBoxCell = new DataGridViewCheckBoxCell { ThreeState = true };