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 <mihaela.stoica@citrix.com>
This commit is contained in:
Mihaela Stoica 2014-08-07 12:52:14 +01:00
parent 2244b2e43c
commit 564b65fbb5
3 changed files with 21 additions and 2 deletions

View File

@ -409,8 +409,6 @@ namespace XenAdmin.TabPages
if (hosts.Count > 0)
{
wizard.SelectServers(hosts);
if (wizard.CurrentStepTabPage.EnableNext())
wizard.NextStep();
}
else
{

View File

@ -81,6 +81,7 @@ namespace XenAdmin.Wizards.PatchingWizard
public void SelectServers(List<Host> selectedServers)
{
PatchingWizard_SelectServers.SelectServers(selectedServers);
PatchingWizard_SelectServers.DisableUnselectedServers();
}
protected override void UpdateWizardContent(XenTabPage senderPage)

View File

@ -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 };