Merge pull request #1008 from GaborApatiNagy/master_batch_CP-15714

CP-15714: UI: Change Select Servers Page
This commit is contained in:
Mihaela Stoica 2016-06-01 13:50:56 +01:00
commit 3b58dd1f07
4 changed files with 45 additions and 10 deletions

View File

@ -45,6 +45,7 @@ using XenAdmin.Dialogs;
using System.Drawing;
using XenAdmin.Alerts;
using System.Linq;
using XenAdmin.Actions;
namespace XenAdmin.Wizards.PatchingWizard
@ -181,9 +182,25 @@ namespace XenAdmin.Wizards.PatchingWizard
PageLeaveCancelled(string.Format(Messages.UPDATES_WIZARD_FILE_NOT_FOUND, SelectedNewPatch));
}
}
else //In Automatic Mode
{
var downloadUpdatesAction = new DownloadUpdatesXmlAction(false, true, true);
var dialog = new ActionProgressDialog(downloadUpdatesAction, ProgressBarStyle.Marquee);
dialog.ShowDialog(this.Parent); //Will block until dialog closes, action completed
if (!downloadUpdatesAction.Succeeded)
{
cancel = true;
}
}
}
Updates.CheckForUpdatesCompleted -= CheckForUpdates_CheckForUpdatesCompleted;
if (!cancel) //unsubscribe only if we are really leaving this page
{
Updates.CheckForUpdatesCompleted -= CheckForUpdates_CheckForUpdatesCompleted;
}
base.PageLeave(direction, ref cancel);
}
@ -583,13 +600,7 @@ namespace XenAdmin.Wizards.PatchingWizard
private void AutomaticRadioButton_CheckedChanged(object sender, EventArgs e)
{
if (AutomaticRadioButton.Checked)
{
CheckForUpdatesInProgress = true;
Updates.CheckForUpdates(true);
UpdateEnablement();
}
UpdateEnablement();
}
private void downloadUpdateRadioButton_CheckedChanged(object sender, EventArgs e)

View File

@ -156,13 +156,13 @@ namespace XenAdmin.Wizards.PatchingWizard
if (us[host].Count == 0)
{
row.Enabled = false;
//add tooltip why not
row.Cells[3].ToolTipText = Messages.PATCHINGWIZARD_SELECTSERVERPAGE_SERVER_UP_TO_DATE;
}
}
else
{
row.Enabled = false;
//add tooltip why not
row.Cells[3].ToolTipText = Messages.PATCHINGWIZARD_SELECTSERVERPAGE_SERVER_NOT_AUTO_UPGRADABLE;
}
return;

View File

@ -25990,6 +25990,24 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to This server cannot be updated automatically..
/// </summary>
public static string PATCHINGWIZARD_SELECTSERVERPAGE_SERVER_NOT_AUTO_UPGRADABLE {
get {
return ResourceManager.GetString("PATCHINGWIZARD_SELECTSERVERPAGE_SERVER_NOT_AUTO_UPGRADABLE", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to This server is already up-to-date..
/// </summary>
public static string PATCHINGWIZARD_SELECTSERVERPAGE_SERVER_UP_TO_DATE {
get {
return ResourceManager.GetString("PATCHINGWIZARD_SELECTSERVERPAGE_SERVER_UP_TO_DATE", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Select Servers.
/// </summary>

View File

@ -8985,6 +8985,12 @@ However, there is not enough space to perform the repartitioning, so the current
<data name="PATCHINGWIZARD_SELECTSERVERPAGE_PATCH_NOT_APPLICABLE" xml:space="preserve">
<value>Update not applicable</value>
</data>
<data name="PATCHINGWIZARD_SELECTSERVERPAGE_SERVER_NOT_AUTO_UPGRADABLE" xml:space="preserve">
<value>This server cannot be updated automatically.</value>
</data>
<data name="PATCHINGWIZARD_SELECTSERVERPAGE_SERVER_UP_TO_DATE" xml:space="preserve">
<value>This server is already up-to-date.</value>
</data>
<data name="PATCHINGWIZARD_SELECTSERVERPAGE_TEXT" xml:space="preserve">
<value>Select Servers</value>
</data>