Merge pull request #161 from MihaelaStoica/CA-141870

CA-141870: Hotfix uploads to all connected servers before asking which servers you want - Fixed
This commit is contained in:
Gabor Apati-Nagy 2014-08-07 14:10:14 +01:00
commit 0e613409c0
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 };