CP-35687: Detach update mechanism from update wizard (#2812)

* CP-35687: Detach update mechanism from update wizard
Signed-off-by: Ji Jiang <ji.jiang@citrix.com>

* CP-35687 part 2: Removed updates mechanism.
* Corrections as per code review.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
This commit is contained in:
Joey 2021-05-21 15:13:45 +01:00 committed by GitHub
parent 88c923b11c
commit a56a383ec0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
38 changed files with 645 additions and 2533 deletions

View File

@ -68,23 +68,23 @@ namespace XenAdmin.Commands
protected override bool CanExecuteCore(SelectedItemCollection selection)
{
return ConnectionsManager.XenConnectionsCopy.Any(xenConnection => xenConnection.IsConnected);
return ConnectionsManager.XenConnectionsCopy.Any(c => c.IsConnected && Helpers.PostStockholm(c));
}
public override Image ContextMenuImage
protected override string GetCantExecuteReasonCore(IXenObject item)
{
get
{
return Images.StaticImages._000_HostUnpatched_h32bit_16;
}
var connected = ConnectionsManager.XenConnectionsCopy.Where(c => c.IsConnected).ToList();
if (connected.Count > 0 && connected.All(c => !Helpers.PostStockholm(c)))
return string.Format(Messages.INSTALL_PENDING_UPDATES_DISABLED_REASON,
BrandManager.BrandConsole, BrandManager.ProductBrand,
BrandManager.ProductVersion82, BrandManager.LegacyConsole);
return base.GetCantExecuteReasonCore(item);
}
public override string ContextMenuText
{
get
{
return Messages.INSTALL_PENDING_UPDATES;
}
}
public override Image ContextMenuImage => Images.StaticImages._000_HostUnpatched_h32bit_16;
public override string ContextMenuText => Messages.INSTALL_PENDING_UPDATES;
}
}

View File

@ -75,7 +75,6 @@ namespace XenAdmin.Core
internal struct CFU
{
public bool AllowXenCenterUpdates;
public bool AllowPatchesUpdates;
public bool AllowXenServerUpdates;
}
@ -134,7 +133,6 @@ namespace XenAdmin.Core
CFU = new CFU
{
AllowXenCenterUpdates = Properties.Settings.Default.AllowXenCenterUpdates,
AllowPatchesUpdates = Properties.Settings.Default.AllowPatchesUpdates,
AllowXenServerUpdates = Properties.Settings.Default.AllowXenServerUpdates
},
Proxy = new Proxy

View File

@ -96,12 +96,11 @@ namespace XenAdmin.Core
if (Properties.Settings.Default.AllowXenCenterUpdates ||
Properties.Settings.Default.AllowXenServerUpdates ||
Properties.Settings.Default.AllowPatchesUpdates || force || forceRefresh)
force || forceRefresh)
{
var action = CreateDownloadUpdatesXmlAction(
Properties.Settings.Default.AllowXenCenterUpdates || force,
Properties.Settings.Default.AllowXenServerUpdates || force,
Properties.Settings.Default.AllowPatchesUpdates || force);
Properties.Settings.Default.AllowXenServerUpdates || force);
action.Completed += actionCompleted;

View File

@ -30,58 +30,32 @@ namespace XenAdmin.Dialogs.OptionsPages
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(UpdatesOptionsPage));
this.UpdatesTableLayoutPanel = new System.Windows.Forms.TableLayoutPanel();
this.XenCenterGroupBox = new XenAdmin.Controls.DecentGroupBox();
this.AllowXenCenterUpdatesCheckBox = new System.Windows.Forms.CheckBox();
this.XenServerGroupBox = new XenAdmin.Controls.DecentGroupBox();
this.AllowXenServerUpdatesCheckBox = new System.Windows.Forms.CheckBox();
this.AllowXenServerPatchesCheckBox = new System.Windows.Forms.CheckBox();
this.AllowXenCenterUpdatesCheckBox = new System.Windows.Forms.CheckBox();
this.UpdatesBlurb = new System.Windows.Forms.Label();
this.UpdatesTableLayoutPanel.SuspendLayout();
this.XenCenterGroupBox.SuspendLayout();
this.XenServerGroupBox.SuspendLayout();
this.SuspendLayout();
//
// UpdatesTableLayoutPanel
//
resources.ApplyResources(this.UpdatesTableLayoutPanel, "UpdatesTableLayoutPanel");
this.UpdatesTableLayoutPanel.BackColor = System.Drawing.Color.Transparent;
this.UpdatesTableLayoutPanel.Controls.Add(this.XenCenterGroupBox, 0, 2);
this.UpdatesTableLayoutPanel.Controls.Add(this.XenServerGroupBox, 0, 1);
this.UpdatesTableLayoutPanel.Controls.Add(this.UpdatesBlurb, 0, 0);
this.UpdatesTableLayoutPanel.Controls.Add(this.AllowXenCenterUpdatesCheckBox, 0, 1);
this.UpdatesTableLayoutPanel.Controls.Add(this.AllowXenServerUpdatesCheckBox, 0, 2);
this.UpdatesTableLayoutPanel.Name = "UpdatesTableLayoutPanel";
//
// XenCenterGroupBox
//
resources.ApplyResources(this.XenCenterGroupBox, "XenCenterGroupBox");
this.XenCenterGroupBox.Controls.Add(this.AllowXenCenterUpdatesCheckBox);
this.XenCenterGroupBox.Name = "XenCenterGroupBox";
this.XenCenterGroupBox.TabStop = false;
//
// AllowXenCenterUpdatesCheckBox
//
resources.ApplyResources(this.AllowXenCenterUpdatesCheckBox, "AllowXenCenterUpdatesCheckBox");
this.AllowXenCenterUpdatesCheckBox.Name = "AllowXenCenterUpdatesCheckBox";
this.AllowXenCenterUpdatesCheckBox.UseVisualStyleBackColor = true;
//
// XenServerGroupBox
//
resources.ApplyResources(this.XenServerGroupBox, "XenServerGroupBox");
this.XenServerGroupBox.Controls.Add(this.AllowXenServerUpdatesCheckBox);
this.XenServerGroupBox.Controls.Add(this.AllowXenServerPatchesCheckBox);
this.XenServerGroupBox.Name = "XenServerGroupBox";
this.XenServerGroupBox.TabStop = false;
//
// AllowXenServerUpdatesCheckBox
//
resources.ApplyResources(this.AllowXenServerUpdatesCheckBox, "AllowXenServerUpdatesCheckBox");
this.AllowXenServerUpdatesCheckBox.Name = "AllowXenServerUpdatesCheckBox";
this.AllowXenServerUpdatesCheckBox.UseVisualStyleBackColor = true;
//
// AllowXenServerPatchesCheckBox
// AllowXenCenterUpdatesCheckBox
//
resources.ApplyResources(this.AllowXenServerPatchesCheckBox, "AllowXenServerPatchesCheckBox");
this.AllowXenServerPatchesCheckBox.Name = "AllowXenServerPatchesCheckBox";
this.AllowXenServerPatchesCheckBox.UseVisualStyleBackColor = true;
resources.ApplyResources(this.AllowXenCenterUpdatesCheckBox, "AllowXenCenterUpdatesCheckBox");
this.AllowXenCenterUpdatesCheckBox.Name = "AllowXenCenterUpdatesCheckBox";
this.AllowXenCenterUpdatesCheckBox.UseVisualStyleBackColor = true;
//
// UpdatesBlurb
//
@ -96,10 +70,6 @@ namespace XenAdmin.Dialogs.OptionsPages
this.Name = "UpdatesOptionsPage";
this.UpdatesTableLayoutPanel.ResumeLayout(false);
this.UpdatesTableLayoutPanel.PerformLayout();
this.XenCenterGroupBox.ResumeLayout(false);
this.XenCenterGroupBox.PerformLayout();
this.XenServerGroupBox.ResumeLayout(false);
this.XenServerGroupBox.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
@ -108,11 +78,8 @@ namespace XenAdmin.Dialogs.OptionsPages
#endregion
private System.Windows.Forms.TableLayoutPanel UpdatesTableLayoutPanel;
private XenAdmin.Controls.DecentGroupBox XenCenterGroupBox;
private System.Windows.Forms.CheckBox AllowXenCenterUpdatesCheckBox;
private XenAdmin.Controls.DecentGroupBox XenServerGroupBox;
private System.Windows.Forms.CheckBox AllowXenServerUpdatesCheckBox;
private System.Windows.Forms.CheckBox AllowXenServerPatchesCheckBox;
private System.Windows.Forms.Label UpdatesBlurb;
private System.Windows.Forms.CheckBox AllowXenServerUpdatesCheckBox;
private System.Windows.Forms.CheckBox AllowXenCenterUpdatesCheckBox;
}
}

View File

@ -38,15 +38,10 @@ namespace XenAdmin.Dialogs.OptionsPages
{
public partial class UpdatesOptionsPage : UserControl, IOptionsPage
{
private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
public UpdatesOptionsPage()
{
InitializeComponent();
UpdatesBlurb.Text = string.Format(UpdatesBlurb.Text, BrandManager.BrandConsole, BrandManager.ProductBrand);
XenServerGroupBox.Text = string.Format(XenServerGroupBox.Text, BrandManager.ProductBrand);
XenCenterGroupBox.Text = string.Format(XenCenterGroupBox.Text, BrandManager.BrandConsole);
AllowXenServerPatchesCheckBox.Text = string.Format(AllowXenServerPatchesCheckBox.Text, BrandManager.ProductBrand);
AllowXenServerUpdatesCheckBox.Text = string.Format(AllowXenServerUpdatesCheckBox.Text, BrandManager.ProductBrand);
AllowXenCenterUpdatesCheckBox.Text = string.Format(AllowXenCenterUpdatesCheckBox.Text, BrandManager.BrandConsole);
}
@ -59,7 +54,6 @@ namespace XenAdmin.Dialogs.OptionsPages
AllowXenCenterUpdatesCheckBox.Checked = Properties.Settings.Default.AllowXenCenterUpdates;
// XenServer updates
AllowXenServerPatchesCheckBox.Checked = Properties.Settings.Default.AllowPatchesUpdates;
AllowXenServerUpdatesCheckBox.Checked = Properties.Settings.Default.AllowXenServerUpdates;
}
@ -75,19 +69,15 @@ namespace XenAdmin.Dialogs.OptionsPages
public void Save()
{
bool checkXenCenterUpdates = AllowXenCenterUpdatesCheckBox.Checked != Properties.Settings.Default.AllowXenCenterUpdates;
bool checkPatchUpdates = AllowXenServerPatchesCheckBox.Checked != Properties.Settings.Default.AllowPatchesUpdates;
bool checkVersionUpdates = AllowXenServerUpdatesCheckBox.Checked != Properties.Settings.Default.AllowXenServerUpdates;
if (checkXenCenterUpdates)
Properties.Settings.Default.AllowXenCenterUpdates = AllowXenCenterUpdatesCheckBox.Checked;
if (checkPatchUpdates)
Properties.Settings.Default.AllowPatchesUpdates = AllowXenServerPatchesCheckBox.Checked;
if (checkVersionUpdates)
Properties.Settings.Default.AllowXenServerUpdates = AllowXenServerUpdatesCheckBox.Checked;
if(checkXenCenterUpdates || checkPatchUpdates || checkVersionUpdates)
if(checkXenCenterUpdates || checkVersionUpdates)
Updates.CheckForUpdates(false, true);
}

View File

@ -128,196 +128,13 @@
<data name="UpdatesTableLayoutPanel.ColumnCount" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="XenCenterGroupBox.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="XenCenterGroupBox.AutoSizeMode" type="System.Windows.Forms.AutoSizeMode, System.Windows.Forms">
<value>GrowAndShrink</value>
</data>
<data name="AllowXenCenterUpdatesCheckBox.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="AllowXenCenterUpdatesCheckBox.Font" type="System.Drawing.Font, System.Drawing">
<value>Tahoma, 8pt</value>
</data>
<data name="AllowXenCenterUpdatesCheckBox.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="AllowXenCenterUpdatesCheckBox.Location" type="System.Drawing.Point, System.Drawing">
<value>8, 21</value>
</data>
<data name="AllowXenCenterUpdatesCheckBox.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 5, 3, 0</value>
</data>
<data name="AllowXenCenterUpdatesCheckBox.Size" type="System.Drawing.Size, System.Drawing">
<value>157, 17</value>
</data>
<data name="AllowXenCenterUpdatesCheckBox.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="AllowXenCenterUpdatesCheckBox.Text" xml:space="preserve">
<value>Check for &amp;new {0} versions</value>
</data>
<data name="&gt;&gt;AllowXenCenterUpdatesCheckBox.Name" xml:space="preserve">
<value>AllowXenCenterUpdatesCheckBox</value>
</data>
<data name="&gt;&gt;AllowXenCenterUpdatesCheckBox.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;AllowXenCenterUpdatesCheckBox.Parent" xml:space="preserve">
<value>XenCenterGroupBox</value>
</data>
<data name="&gt;&gt;AllowXenCenterUpdatesCheckBox.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="XenCenterGroupBox.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="XenCenterGroupBox.Font" type="System.Drawing.Font, System.Drawing">
<value>Tahoma, 8pt</value>
</data>
<data name="XenCenterGroupBox.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 121</value>
</data>
<data name="XenCenterGroupBox.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 0</value>
</data>
<data name="XenCenterGroupBox.Size" type="System.Drawing.Size, System.Drawing">
<value>441, 51</value>
</data>
<data name="XenCenterGroupBox.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="XenCenterGroupBox.Text" xml:space="preserve">
<value>Automatically check for {0} updates</value>
</data>
<data name="&gt;&gt;XenCenterGroupBox.Name" xml:space="preserve">
<value>XenCenterGroupBox</value>
</data>
<data name="&gt;&gt;XenCenterGroupBox.Type" xml:space="preserve">
<value>XenAdmin.Controls.DecentGroupBox, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;XenCenterGroupBox.Parent" xml:space="preserve">
<value>UpdatesTableLayoutPanel</value>
</data>
<data name="&gt;&gt;XenCenterGroupBox.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="XenServerGroupBox.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="XenServerGroupBox.AutoSizeMode" type="System.Windows.Forms.AutoSizeMode, System.Windows.Forms">
<value>GrowAndShrink</value>
</data>
<data name="AllowXenServerUpdatesCheckBox.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="AllowXenServerUpdatesCheckBox.Font" type="System.Drawing.Font, System.Drawing">
<value>Tahoma, 8pt</value>
</data>
<data name="AllowXenServerUpdatesCheckBox.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="AllowXenServerUpdatesCheckBox.Location" type="System.Drawing.Point, System.Drawing">
<value>8, 21</value>
</data>
<data name="AllowXenServerUpdatesCheckBox.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 5, 3, 3</value>
</data>
<data name="AllowXenServerUpdatesCheckBox.Size" type="System.Drawing.Size, System.Drawing">
<value>170, 17</value>
</data>
<data name="AllowXenServerUpdatesCheckBox.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="AllowXenServerUpdatesCheckBox.Text" xml:space="preserve">
<value>Check for new &amp;versions of {0}</value>
</data>
<data name="&gt;&gt;AllowXenServerUpdatesCheckBox.Name" xml:space="preserve">
<value>AllowXenServerUpdatesCheckBox</value>
</data>
<data name="&gt;&gt;AllowXenServerUpdatesCheckBox.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;AllowXenServerUpdatesCheckBox.Parent" xml:space="preserve">
<value>XenServerGroupBox</value>
</data>
<data name="&gt;&gt;AllowXenServerUpdatesCheckBox.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="AllowXenServerPatchesCheckBox.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="AllowXenServerPatchesCheckBox.Font" type="System.Drawing.Font, System.Drawing">
<value>Tahoma, 8pt</value>
</data>
<data name="AllowXenServerPatchesCheckBox.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="AllowXenServerPatchesCheckBox.Location" type="System.Drawing.Point, System.Drawing">
<value>8, 44</value>
</data>
<data name="AllowXenServerPatchesCheckBox.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 0</value>
</data>
<data name="AllowXenServerPatchesCheckBox.Size" type="System.Drawing.Size, System.Drawing">
<value>133, 17</value>
</data>
<data name="AllowXenServerPatchesCheckBox.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="AllowXenServerPatchesCheckBox.Text" xml:space="preserve">
<value>Check for {0} &amp;updates</value>
</data>
<data name="&gt;&gt;AllowXenServerPatchesCheckBox.Name" xml:space="preserve">
<value>AllowXenServerPatchesCheckBox</value>
</data>
<data name="&gt;&gt;AllowXenServerPatchesCheckBox.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;AllowXenServerPatchesCheckBox.Parent" xml:space="preserve">
<value>XenServerGroupBox</value>
</data>
<data name="&gt;&gt;AllowXenServerPatchesCheckBox.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="XenServerGroupBox.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="XenServerGroupBox.Font" type="System.Drawing.Font, System.Drawing">
<value>Tahoma, 8pt</value>
</data>
<data name="XenServerGroupBox.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 41</value>
</data>
<data name="XenServerGroupBox.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 0</value>
</data>
<data name="XenServerGroupBox.Size" type="System.Drawing.Size, System.Drawing">
<value>441, 74</value>
</data>
<data name="XenServerGroupBox.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="XenServerGroupBox.Text" xml:space="preserve">
<value>Automatically check for {0} updates and new versions</value>
</data>
<data name="&gt;&gt;XenServerGroupBox.Name" xml:space="preserve">
<value>XenServerGroupBox</value>
</data>
<data name="&gt;&gt;XenServerGroupBox.Type" xml:space="preserve">
<value>XenAdmin.Controls.DecentGroupBox, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;XenServerGroupBox.Parent" xml:space="preserve">
<value>UpdatesTableLayoutPanel</value>
</data>
<data name="&gt;&gt;XenServerGroupBox.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="UpdatesBlurb.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="UpdatesBlurb.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="UpdatesBlurb.Font" type="System.Drawing.Font, System.Drawing">
<value>Tahoma, 8pt</value>
</data>
@ -325,19 +142,19 @@
<value>NoControl</value>
</data>
<data name="UpdatesBlurb.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
<value>3, 0</value>
</data>
<data name="UpdatesBlurb.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 12</value>
<value>3, 0, 3, 12</value>
</data>
<data name="UpdatesBlurb.Size" type="System.Drawing.Size, System.Drawing">
<value>441, 26</value>
</data>
<data name="UpdatesBlurb.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
<value>0</value>
</data>
<data name="UpdatesBlurb.Text" xml:space="preserve">
<value>You can configure {0} to periodically check for available updates and prompt you when an update or new {1} version is available for download.</value>
<value>You can configure {0} to periodically check for available updates and prompt you when a new version of {0} or {1} is available for download.</value>
</data>
<data name="&gt;&gt;UpdatesBlurb.Name" xml:space="preserve">
<value>UpdatesBlurb</value>
@ -349,6 +166,78 @@
<value>UpdatesTableLayoutPanel</value>
</data>
<data name="&gt;&gt;UpdatesBlurb.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="AllowXenCenterUpdatesCheckBox.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="AllowXenCenterUpdatesCheckBox.Font" type="System.Drawing.Font, System.Drawing">
<value>Tahoma, 8pt</value>
</data>
<data name="AllowXenCenterUpdatesCheckBox.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="AllowXenCenterUpdatesCheckBox.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 41</value>
</data>
<data name="AllowXenCenterUpdatesCheckBox.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 0, 0, 0</value>
</data>
<data name="AllowXenCenterUpdatesCheckBox.Size" type="System.Drawing.Size, System.Drawing">
<value>173, 17</value>
</data>
<data name="AllowXenCenterUpdatesCheckBox.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="AllowXenCenterUpdatesCheckBox.Text" xml:space="preserve">
<value>Check for &amp;new versions of {0}</value>
</data>
<data name="&gt;&gt;AllowXenCenterUpdatesCheckBox.Name" xml:space="preserve">
<value>AllowXenCenterUpdatesCheckBox</value>
</data>
<data name="&gt;&gt;AllowXenCenterUpdatesCheckBox.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;AllowXenCenterUpdatesCheckBox.Parent" xml:space="preserve">
<value>UpdatesTableLayoutPanel</value>
</data>
<data name="&gt;&gt;AllowXenCenterUpdatesCheckBox.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="AllowXenServerUpdatesCheckBox.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="AllowXenServerUpdatesCheckBox.Font" type="System.Drawing.Font, System.Drawing">
<value>Tahoma, 8pt</value>
</data>
<data name="AllowXenServerUpdatesCheckBox.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="AllowXenServerUpdatesCheckBox.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 64</value>
</data>
<data name="AllowXenServerUpdatesCheckBox.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 0, 0, 0</value>
</data>
<data name="AllowXenServerUpdatesCheckBox.Size" type="System.Drawing.Size, System.Drawing">
<value>173, 17</value>
</data>
<data name="AllowXenServerUpdatesCheckBox.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="AllowXenServerUpdatesCheckBox.Text" xml:space="preserve">
<value>Check for new &amp;versions of {0}</value>
</data>
<data name="&gt;&gt;AllowXenServerUpdatesCheckBox.Name" xml:space="preserve">
<value>AllowXenServerUpdatesCheckBox</value>
</data>
<data name="&gt;&gt;AllowXenServerUpdatesCheckBox.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;AllowXenServerUpdatesCheckBox.Parent" xml:space="preserve">
<value>UpdatesTableLayoutPanel</value>
</data>
<data name="&gt;&gt;AllowXenServerUpdatesCheckBox.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="UpdatesTableLayoutPanel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
@ -367,7 +256,7 @@
<value>447, 225</value>
</data>
<data name="UpdatesTableLayoutPanel.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
<value>0</value>
</data>
<data name="&gt;&gt;UpdatesTableLayoutPanel.Name" xml:space="preserve">
<value>UpdatesTableLayoutPanel</value>
@ -382,7 +271,7 @@
<value>0</value>
</data>
<data name="UpdatesTableLayoutPanel.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="XenCenterGroupBox" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="XenServerGroupBox" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="UpdatesBlurb" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Percent,100" /&gt;&lt;Rows Styles="AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0" /&gt;&lt;/TableLayoutSettings&gt;</value>
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="UpdatesBlurb" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="AllowXenCenterUpdatesCheckBox" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="AllowXenServerUpdatesCheckBox" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Percent,100" /&gt;&lt;Rows Styles="AutoSize,0,AutoSize,0,AutoSize,0,Percent,100" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>

View File

@ -637,7 +637,6 @@ namespace XenAdmin
var result = dlg.ShowDialog(this) == DialogResult.Yes;
Properties.Settings.Default.AllowXenCenterUpdates = result;
Properties.Settings.Default.AllowPatchesUpdates = result;
Properties.Settings.Default.AllowXenServerUpdates = result;
Properties.Settings.Default.SeenAllowUpdatesDialog = true;
@ -747,10 +746,6 @@ namespace XenAdmin
log.DebugFormat("Restoring host backup from {0}", args[0]);
new RestoreHostFromBackupCommand(this, null, args[0]).Execute();
break;
case ArgType.Update:
log.DebugFormat("Installing server update from {0}", args[0]);
InstallUpdate(args[0]);
break;
case ArgType.XenSearch:
log.DebugFormat("Importing saved XenSearch from '{0}'", args[0]);
new ImportSearchCommand(this, args[0]).Execute();
@ -1014,7 +1009,7 @@ namespace XenAdmin
// Allow Citrix Hypervisor Center connect to Stockholm and cloud released versions only
//
if ((int)API_Version.LATEST >= (int)API_Version.API_2_16 && !Helpers.StockholmOrGreater(master))
if (!Helpers.StockholmOrGreater(master))
{
connection.EndConnect();
@ -2687,20 +2682,6 @@ namespace XenAdmin
new ImportWizard(SelectionManager.Selection.GetConnectionOfFirstItem(), hostAncestor, param, false).Show();
}
private void InstallUpdate(string path)
{
if (WizardHelpers.IsValidFile(path, out var failureReason))
{
var wizard = (PatchingWizard)Program.MainWindow.ShowForm(typeof(PatchingWizard));
wizard.PrepareToInstallUpdate(path);
}
else
{
using (var popup = new ErrorDialog(failureReason) {WindowTitle = Messages.UPDATES})
popup.ShowDialog();
}
}
#region XenSearch
private bool searchMode;

View File

@ -313,9 +313,6 @@ namespace XenAdmin
case "restore":
firstArgType = ArgType.Restore;
break;
case "update":
firstArgType = ArgType.Update;
break;
case "search":
firstArgType = ArgType.XenSearch;
break;
@ -1001,5 +998,5 @@ namespace XenAdmin
public static CultureInfo CurrentCulture => Thread.CurrentThread.CurrentCulture;
}
public enum ArgType { Import, License, Restore, Update, None, XenSearch, Passwords, Connect }
public enum ArgType { Import, License, Restore, None, XenSearch, Passwords, Connect }
}

View File

@ -12,7 +12,7 @@ namespace XenAdmin.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.7.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.8.1.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
@ -424,19 +424,6 @@ namespace XenAdmin.Properties {
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
[global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
public bool AllowPatchesUpdates {
get {
return ((bool)(this["AllowPatchesUpdates"]));
}
set {
this["AllowPatchesUpdates"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]

View File

@ -96,9 +96,6 @@
<Setting Name="AllowXenCenterUpdates" Roaming="true" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="AllowPatchesUpdates" Roaming="true" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="AllowXenServerUpdates" Roaming="true" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>

View File

@ -610,7 +610,6 @@ namespace XenAdmin
if (!Helpers.CommonCriteriaCertificationRelease)
{
log.Info($"=== AllowXenCenterUpdates: {Properties.Settings.Default.AllowXenCenterUpdates}");
log.Info($"=== AllowPatchesUpdates: {Properties.Settings.Default.AllowPatchesUpdates}");
log.Info($"=== AllowXenServerUpdates: {Properties.Settings.Default.AllowXenServerUpdates}");
}

View File

@ -2017,7 +2017,7 @@ namespace XenAdmin.TabPages
private void SetupDeprecationBanner()
{
if (Helpers.PostStockholm(xenObject.Connection) || (int)API_Version.LATEST < (int)API_Version.API_2_16)
if (Helpers.PostStockholm(xenObject.Connection))
{
Banner.Visible = false;
}

View File

@ -87,6 +87,7 @@
this.ColumnLocation = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColumnDate = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColumnWebPage = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.labelLegacyUpdates = new System.Windows.Forms.Label();
this.tableLayoutPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.informationLabelIcon)).BeginInit();
this.tableLayoutPanel2.SuspendLayout();
@ -336,10 +337,11 @@
// tableLayouPanel5
//
resources.ApplyResources(this.tableLayouPanel5, "tableLayouPanel5");
this.tableLayouPanel5.Controls.Add(this.pictureBox1, 0, 0);
this.tableLayouPanel5.Controls.Add(this.checkForUpdatesNowLink, 2, 0);
this.tableLayouPanel5.Controls.Add(this.AutoCheckForUpdatesDisabledLabel, 1, 0);
this.tableLayouPanel5.Controls.Add(this.panel1, 3, 0);
this.tableLayouPanel5.Controls.Add(this.pictureBox1, 0, 1);
this.tableLayouPanel5.Controls.Add(this.checkForUpdatesNowLink, 2, 1);
this.tableLayouPanel5.Controls.Add(this.AutoCheckForUpdatesDisabledLabel, 1, 1);
this.tableLayouPanel5.Controls.Add(this.panel1, 0, 2);
this.tableLayouPanel5.Controls.Add(this.labelLegacyUpdates, 0, 0);
this.tableLayouPanel5.Name = "tableLayouPanel5";
//
// panel1
@ -349,7 +351,6 @@
this.panel1.Controls.Add(this.dataGridViewUpdates);
resources.ApplyResources(this.panel1, "panel1");
this.panel1.Name = "panel1";
this.tableLayouPanel5.SetRowSpan(this.panel1, 4);
//
// dataGridViewHosts
//
@ -513,6 +514,14 @@
this.ColumnWebPage.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.ColumnWebPage.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// labelLegacyUpdates
//
resources.ApplyResources(this.labelLegacyUpdates, "labelLegacyUpdates");
this.labelLegacyUpdates.BackColor = System.Drawing.Color.LemonChiffon;
this.labelLegacyUpdates.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.tableLayouPanel5.SetColumnSpan(this.labelLegacyUpdates, 3);
this.labelLegacyUpdates.Name = "labelLegacyUpdates";
//
// ManageUpdatesPage
//
resources.ApplyResources(this, "$this");
@ -595,5 +604,6 @@
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnInstalledUpdate;
private System.Windows.Forms.ToolStripButton toolStripButtonUpdate;
private Controls.SpinnerIcon spinner;
private System.Windows.Forms.Label labelLegacyUpdates;
}
}

View File

@ -74,12 +74,18 @@ namespace XenAdmin.TabPages
toolStripSplitButtonDismiss.DefaultItem = dismissAllToolStripMenuItem;
toolStripSplitButtonDismiss.Text = dismissAllToolStripMenuItem.Text;
toolStripDropDownButtonView.Visible = false;
toolStripSeparator2.Visible = false;
toolStripButtonUpdate.Visible = false;
labelLegacyUpdates.Text = string.Format(labelLegacyUpdates.Text, BrandManager.BrandConsole,
BrandManager.ProductBrand, BrandManager.ProductVersion82, BrandManager.LegacyConsole);
try
{
//ensure we won't try to rebuild the list while setting the initial view
checksQueue++;
byHostToolStripMenuItem.Checked = Properties.Settings.Default.ShowUpdatesByServer;
byUpdateToolStripMenuItem.Checked = !Properties.Settings.Default.ShowUpdatesByServer;
byHostToolStripMenuItem.Checked = false;
byUpdateToolStripMenuItem.Checked = true;
ToggleView();
}
finally
@ -631,13 +637,14 @@ namespace XenAdmin.TabPages
/// </summary>
private void ToggleTopWarningVisibility()
{
bool visible = !Properties.Settings.Default.AllowPatchesUpdates ||
!Properties.Settings.Default.AllowXenCenterUpdates ||
bool visible = !Properties.Settings.Default.AllowXenCenterUpdates ||
!Properties.Settings.Default.AllowXenServerUpdates;
pictureBox1.Visible = visible;
AutoCheckForUpdatesDisabledLabel.Visible = visible;
checkForUpdatesNowLink.Visible = visible;
labelLegacyUpdates.Visible = ConnectionsManager.XenConnectionsCopy.Any(c =>
c.IsConnected && !Helpers.PostStockholm(c));
}
/// <summary>
@ -721,7 +728,7 @@ namespace XenAdmin.TabPages
else
{
var connectionList = ConnectionsManager.XenConnectionsCopy;
toolStripButtonUpdate.Enabled = toolStripButtonExportAll.Enabled = connectionList.Any(xenConnection => xenConnection.IsConnected);
toolStripButtonExportAll.Enabled = connectionList.Any(c => c.IsConnected);
}
}
@ -1028,8 +1035,6 @@ namespace XenAdmin.TabPages
if (hosts.Count > 0)
{
var wizard = (PatchingWizard)Program.MainWindow.ShowForm(typeof(PatchingWizard));
wizard.PrepareToInstallUpdate(patchAlert, hosts);
}
else
{
@ -1315,17 +1320,13 @@ namespace XenAdmin.TabPages
private string GetHostUpdateDetailsCsvQuotes(IXenConnection xenConnection, Host host, bool hasPool)
{
string pool = String.Empty;
string patchingStatus = String.Empty;
string requiredUpdates = String.Empty;
string installedUpdates = String.Empty;
var versionIsFound = VersionFoundInUpdatesXml(host);
pool = hasPool ? Helpers.GetPool(xenConnection).Name() : String.Empty;
requiredUpdates = versionIsFound ? RequiredUpdatesForHost(host) : String.Empty;
installedUpdates = InstalledUpdatesForHost(host);
patchingStatus = versionIsFound
? (requiredUpdates.Length > 0 ? Messages.NOT_UPDATED : Messages.UPDATED)
string pool = hasPool ? Helpers.GetPool(xenConnection).Name() : String.Empty;
string requiredUpdates = versionIsFound ? RequiredUpdatesForHost(host) : String.Empty;
string installedUpdates = InstalledUpdatesForHost(host);
string patchingStatus = versionIsFound
? requiredUpdates.Length > 0 ? Messages.NOT_UPDATED : Messages.UPDATED
: String.Empty;
return String.Format("\"{0}\",\"{1}\",\"{2}\",\"{3}\",\"{4}\",\"{5}\"",
@ -1424,7 +1425,6 @@ namespace XenAdmin.TabPages
toolStripDropDownButtonDateFilter.Visible = byUpdateToolStripMenuItem.Checked;
toolStripSplitButtonDismiss.Visible = byUpdateToolStripMenuItem.Checked;
toolStripButtonRestoreDismissed.Visible = byUpdateToolStripMenuItem.Checked;
toolStripButtonUpdate.Visible = byHostToolStripMenuItem.Checked;
// Switch the grid view
dataGridViewUpdates.Visible = byUpdateToolStripMenuItem.Checked;

View File

@ -460,7 +460,7 @@
<value>toolStrip1</value>
</data>
<data name="&gt;&gt;toolStrip1.Type" xml:space="preserve">
<value>XenAdmin.Controls.ToolStripEx, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
<value>XenAdmin.Controls.ToolStripEx, [XenCenter_No_Space]Main, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;toolStrip1.Parent" xml:space="preserve">
<value>tableLayoutPanel2</value>
@ -517,7 +517,7 @@
<value>NoControl</value>
</data>
<data name="AutoCheckForUpdatesDisabledLabel.Location" type="System.Drawing.Point, System.Drawing">
<value>25, 3</value>
<value>25, 40</value>
</data>
<data name="AutoCheckForUpdatesDisabledLabel.Size" type="System.Drawing.Size, System.Drawing">
<value>395, 15</value>
@ -550,7 +550,7 @@
<value>NoControl</value>
</data>
<data name="pictureBox1.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 3</value>
<value>3, 40</value>
</data>
<data name="pictureBox1.Size" type="System.Drawing.Size, System.Drawing">
<value>16, 16</value>
@ -580,7 +580,7 @@
<value>NoControl</value>
</data>
<data name="checkForUpdatesNowLink.Location" type="System.Drawing.Point, System.Drawing">
<value>426, 3</value>
<value>426, 40</value>
</data>
<data name="checkForUpdatesNowLink.Size" type="System.Drawing.Size, System.Drawing">
<value>132, 15</value>
@ -763,7 +763,7 @@
<value>spinner</value>
</data>
<data name="&gt;&gt;spinner.Type" xml:space="preserve">
<value>XenAdmin.Controls.SpinnerIcon, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
<value>XenAdmin.Controls.SpinnerIcon, [XenCenter_No_Space]Main, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;spinner.Parent" xml:space="preserve">
<value>tableLayoutPanel4</value>
@ -931,7 +931,7 @@
<value>1, 1, 1, 1</value>
</data>
<data name="dataGridViewHosts.Size" type="System.Drawing.Size, System.Drawing">
<value>776, 348</value>
<value>776, 311</value>
</data>
<data name="dataGridViewHosts.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
@ -943,7 +943,7 @@
<value>dataGridViewHosts</value>
</data>
<data name="&gt;&gt;dataGridViewHosts.Type" xml:space="preserve">
<value>XenAdmin.TabPages.ManageUpdatesPage+UpdatePageByHostDataGridView, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
<value>XenAdmin.TabPages.ManageUpdatesPage+UpdatePageByHostDataGridView, [XenCenter_No_Space]Main, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;dataGridViewHosts.Parent" xml:space="preserve">
<value>panel1</value>
@ -1015,7 +1015,7 @@
<value>1, 1, 1, 1</value>
</data>
<data name="dataGridViewUpdates.Size" type="System.Drawing.Size, System.Drawing">
<value>776, 348</value>
<value>776, 311</value>
</data>
<data name="dataGridViewUpdates.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
@ -1024,7 +1024,7 @@
<value>dataGridViewUpdates</value>
</data>
<data name="&gt;&gt;dataGridViewUpdates.Type" xml:space="preserve">
<value>XenAdmin.Controls.DataGridViewEx.DataGridViewEx, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
<value>XenAdmin.Controls.DataGridViewEx.DataGridViewEx, [XenCenter_No_Space]Main, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;dataGridViewUpdates.Parent" xml:space="preserve">
<value>panel1</value>
@ -1036,13 +1036,13 @@
<value>Fill</value>
</data>
<data name="panel1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 22</value>
<value>0, 59</value>
</data>
<data name="panel1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 0</value>
</data>
<data name="panel1.Size" type="System.Drawing.Size, System.Drawing">
<value>776, 348</value>
<value>776, 311</value>
</data>
<data name="panel1.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
@ -1059,6 +1059,45 @@
<data name="&gt;&gt;panel1.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="labelLegacyUpdates.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>None</value>
</data>
<data name="labelLegacyUpdates.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="labelLegacyUpdates.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 9pt, style=Bold</value>
</data>
<data name="labelLegacyUpdates.Location" type="System.Drawing.Point, System.Drawing">
<value>126, 0</value>
</data>
<data name="labelLegacyUpdates.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>10, 0, 10, 10</value>
</data>
<data name="labelLegacyUpdates.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>5, 5, 5, 5</value>
</data>
<data name="labelLegacyUpdates.Size" type="System.Drawing.Size, System.Drawing">
<value>524, 27</value>
</data>
<data name="labelLegacyUpdates.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
</data>
<data name="labelLegacyUpdates.Text" xml:space="preserve">
<value>{0} does not check for {1} updates any longer. To install updates on {1} {2} use {3} {2} instead.</value>
</data>
<data name="&gt;&gt;labelLegacyUpdates.Name" xml:space="preserve">
<value>labelLegacyUpdates</value>
</data>
<data name="&gt;&gt;labelLegacyUpdates.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;labelLegacyUpdates.Parent" xml:space="preserve">
<value>tableLayouPanel5</value>
</data>
<data name="&gt;&gt;labelLegacyUpdates.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="tableLayouPanel5.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 51</value>
</data>
@ -1066,7 +1105,7 @@
<value>0, 6, 0, 12</value>
</data>
<data name="tableLayouPanel5.RowCount" type="System.Int32, mscorlib">
<value>5</value>
<value>1</value>
</data>
<data name="tableLayouPanel5.Size" type="System.Drawing.Size, System.Drawing">
<value>776, 370</value>
@ -1087,7 +1126,7 @@
<value>2</value>
</data>
<data name="tableLayouPanel5.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="pictureBox1" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="checkForUpdatesNowLink" Row="0" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="AutoCheckForUpdatesDisabledLabel" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="panel1" Row="0" RowSpan="4" Column="3" ColumnSpan="3" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,AutoSize,0,Percent,100" /&gt;&lt;Rows Styles="AutoSize,0,Percent,100,Absolute,20,Absolute,20,Absolute,20,Absolute,20,Absolute,20,Absolute,20" /&gt;&lt;/TableLayoutSettings&gt;</value>
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="pictureBox1" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="checkForUpdatesNowLink" Row="1" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="AutoCheckForUpdatesDisabledLabel" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="panel1" Row="2" RowSpan="1" Column="0" ColumnSpan="3" /&gt;&lt;Control Name="labelLegacyUpdates" Row="0" RowSpan="1" Column="0" ColumnSpan="3" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,AutoSize,0,Percent,100" /&gt;&lt;Rows Styles="AutoSize,0,AutoSize,0,Percent,100" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
@ -1135,13 +1174,13 @@
<value>toolStripDropDownButtonServerFilter</value>
</data>
<data name="&gt;&gt;toolStripDropDownButtonServerFilter.Type" xml:space="preserve">
<value>XenAdmin.Controls.FilterLocationToolStripDropDownButton, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
<value>XenAdmin.Controls.FilterLocationToolStripDropDownButton, [XenCenter_No_Space]Main, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;toolStripDropDownButtonDateFilter.Name" xml:space="preserve">
<value>toolStripDropDownButtonDateFilter</value>
</data>
<data name="&gt;&gt;toolStripDropDownButtonDateFilter.Type" xml:space="preserve">
<value>XenAdmin.Controls.FilterDatesToolStripDropDownButton, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
<value>XenAdmin.Controls.FilterDatesToolStripDropDownButton, [XenCenter_No_Space]Main, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;toolStripSeparator3.Name" xml:space="preserve">
<value>toolStripSeparator3</value>
@ -1285,6 +1324,6 @@
<value>ManageUpdatesPage</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>XenAdmin.TabPages.NotificationsBasePage, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
<value>XenAdmin.TabPages.NotificationsBasePage, [XenCenter_No_Space]Main, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
</root>

View File

@ -57,13 +57,9 @@ namespace XenAdmin.Wizards.PatchingWizard
public List<Problem> PrecheckProblemsActuallyResolved { private get; set; }
public List<Pool> SelectedPools { private get; set; }
public bool ApplyUpdatesToNewVersion { get; set; }
public Status Status { get; private set; }
protected bool IsSuccess
{
get { return _thisPageIsCompleted && !failedWorkers.Any(); }
}
protected bool IsSuccess => _thisPageIsCompleted && !failedWorkers.Any();
private List<UpdateProgressBackgroundWorker> backgroundWorkers = new List<UpdateProgressBackgroundWorker>();
private List<UpdateProgressBackgroundWorker> failedWorkers = new List<UpdateProgressBackgroundWorker>();

View File

@ -87,53 +87,19 @@ namespace XenAdmin.Wizards.PatchingWizard
AddPage(PatchingWizard_PatchingPage);
}
public void PrepareToInstallUpdate(string path)
{
if (!IsFirstPage())
return;
//set the page before landing on it so it is populated correctly
PatchingWizard_SelectPatchPage.FilePath = path;
NextStep(); //FirstPage -> SelectPatchPage
NextStep(); //SelectPatchPage -> SelectServers
}
public void PrepareToInstallUpdate(XenServerPatchAlert alert, List<Host> hosts)
{
if (!IsFirstPage())
return;
//set the pages before landing on them so they are populated correctly
PatchingWizard_SelectPatchPage.UpdateAlertFromWeb = alert;
PatchingWizard_SelectPatchPage.UpdateAlertFromWebSelected +=page_UpdateAlertFromWebSelected;
PatchingWizard_SelectServers.SelectedServers = hosts;
NextStep(); //FirstPage -> SelectPatchPage
}
private void page_UpdateAlertFromWebSelected()
{
PatchingWizard_SelectPatchPage.UpdateAlertFromWebSelected -= page_UpdateAlertFromWebSelected;
NextStep(); //SelectPatchPage -> SelectServers
}
protected override void UpdateWizardContent(XenTabPage senderPage)
{
var prevPageType = senderPage.GetType();
if (prevPageType == typeof(PatchingWizard_SelectPatchPage))
{
var wizardMode = PatchingWizard_SelectPatchPage.WizardMode;
var wizardIsInAutomatedUpdatesMode = wizardMode == WizardMode.AutomatedUpdates;
var updateType = PatchingWizard_SelectPatchPage.SelectedUpdateType;
var selectedPatchFilePath = PatchingWizard_SelectPatchPage.SelectedPatchFilePath;
var alertFromFileOnDisk = PatchingWizard_SelectPatchPage.AlertFromFileOnDisk;
var fileFromDiskHasUpdateXml = PatchingWizard_SelectPatchPage.FileFromDiskHasUpdateXml;
var updateType = wizardIsInAutomatedUpdatesMode ? UpdateType.Legacy : PatchingWizard_SelectPatchPage.SelectedUpdateType;
var selectedPatchFilePath = wizardIsInAutomatedUpdatesMode ? null : PatchingWizard_SelectPatchPage.SelectedPatchFilePath;
var alertFromWeb = wizardIsInAutomatedUpdatesMode ? null : PatchingWizard_SelectPatchPage.UpdateAlertFromWeb;
var alertFromFileOnDisk = wizardIsInAutomatedUpdatesMode ? null : PatchingWizard_SelectPatchPage.AlertFromFileOnDisk;
var fileFromDiskHasUpdateXml = !wizardIsInAutomatedUpdatesMode && PatchingWizard_SelectPatchPage.FileFromDiskHasUpdateXml;
PatchingWizard_SelectServers.WizardMode = wizardMode;
PatchingWizard_SelectServers.WizardMode = WizardMode.SingleUpdate;
PatchingWizard_SelectServers.SelectedUpdateType = updateType;
PatchingWizard_SelectServers.UpdateAlertFromWeb = alertFromWeb;
PatchingWizard_SelectServers.AlertFromFileOnDisk = alertFromFileOnDisk;
PatchingWizard_SelectServers.FileFromDiskHasUpdateXml = fileFromDiskHasUpdateXml;
@ -141,30 +107,23 @@ namespace XenAdmin.Wizards.PatchingWizard
RemovePage(PatchingWizard_ModePage);
RemovePage(PatchingWizard_PatchingPage);
RemovePage(PatchingWizard_AutomatedUpdatesPage);
if (wizardMode == WizardMode.SingleUpdate)
{
AddAfterPage(PatchingWizard_SelectServers, PatchingWizard_UploadPage);
AddAfterPage(PatchingWizard_PrecheckPage, PatchingWizard_ModePage);
AddAfterPage(PatchingWizard_ModePage, PatchingWizard_PatchingPage);
}
else // AutomatedUpdates or NewVersion
{
AddAfterPage(PatchingWizard_PrecheckPage, PatchingWizard_AutomatedUpdatesPage);
}
AddAfterPage(PatchingWizard_SelectServers, PatchingWizard_UploadPage);
AddAfterPage(PatchingWizard_PrecheckPage, PatchingWizard_ModePage);
AddAfterPage(PatchingWizard_ModePage, PatchingWizard_PatchingPage);
PatchingWizard_UploadPage.SelectedUpdateType = updateType;
PatchingWizard_UploadPage.SelectedPatchFilePath = selectedPatchFilePath;
PatchingWizard_UploadPage.SelectedUpdateAlert = alertFromWeb ?? alertFromFileOnDisk;
PatchingWizard_UploadPage.SelectedUpdateAlert = alertFromFileOnDisk;
PatchingWizard_UploadPage.PatchFromDisk = PatchingWizard_SelectPatchPage.PatchFromDisk;
PatchingWizard_ModePage.SelectedUpdateType = updateType;
PatchingWizard_PrecheckPage.WizardMode = wizardMode;
PatchingWizard_PrecheckPage.PoolUpdate = null; //reset the PoolUpdate property; it will be updated on leaving the Upload page, if this page is visible
PatchingWizard_PrecheckPage.UpdateAlert = alertFromWeb ?? alertFromFileOnDisk;
PatchingWizard_PrecheckPage.UpdateAlert = alertFromFileOnDisk;
PatchingWizard_AutomatedUpdatesPage.WizardMode = wizardMode;
PatchingWizard_AutomatedUpdatesPage.UpdateAlert = alertFromWeb ?? alertFromFileOnDisk;
PatchingWizard_AutomatedUpdatesPage.WizardMode = WizardMode.SingleUpdate;
PatchingWizard_AutomatedUpdatesPage.UpdateAlert = alertFromFileOnDisk;
PatchingWizard_AutomatedUpdatesPage.PatchFromDisk = PatchingWizard_SelectPatchPage.PatchFromDisk;
PatchingWizard_PatchingPage.SelectedUpdateType = updateType;
@ -174,10 +133,8 @@ namespace XenAdmin.Wizards.PatchingWizard
{
var selectedServers = PatchingWizard_SelectServers.SelectedServers;
var selectedPools = PatchingWizard_SelectServers.SelectedPools;
var applyUpdatesToNewVersion = PatchingWizard_SelectServers.ApplyUpdatesToNewVersion;
PatchingWizard_PrecheckPage.SelectedServers = selectedServers;
PatchingWizard_PrecheckPage.ApplyUpdatesToNewVersion = applyUpdatesToNewVersion;
PatchingWizard_ModePage.SelectedPools = selectedPools;
PatchingWizard_ModePage.SelectedServers = selectedServers;
@ -189,7 +146,6 @@ namespace XenAdmin.Wizards.PatchingWizard
PatchingWizard_UploadPage.SelectedPools = selectedPools;
PatchingWizard_AutomatedUpdatesPage.SelectedPools = selectedPools;
PatchingWizard_AutomatedUpdatesPage.ApplyUpdatesToNewVersion = applyUpdatesToNewVersion;
}
else if (prevPageType == typeof(PatchingWizard_UploadPage))
{

View File

@ -127,10 +127,8 @@ namespace XenAdmin.Wizards.PatchingWizard
protected override List<HostPlan> GenerateHostPlans(Pool pool, out List<Host> applicableHosts)
{
bool automatedUpdatesRestricted = pool.Connection.Cache.Hosts.Any(Host.RestrictBatchHotfixApply);
var minimalPatches = WizardMode == WizardMode.NewVersion
? Updates.GetMinimalPatches(UpdateAlert, ApplyUpdatesToNewVersion && !automatedUpdatesRestricted)
? Updates.GetMinimalPatches(UpdateAlert, false)
: Updates.GetMinimalPatches(pool.Connection);
if (minimalPatches == null)

View File

@ -32,74 +32,57 @@ namespace XenAdmin.Wizards.PatchingWizard
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.panel4 = new System.Windows.Forms.Panel();
this.pictureBox5 = new System.Windows.Forms.PictureBox();
this.label9 = new System.Windows.Forms.Label();
this.panel2 = new System.Windows.Forms.Panel();
this.label5 = new System.Windows.Forms.Label();
this.pictureBox3 = new System.Windows.Forms.PictureBox();
this.label8 = new System.Windows.Forms.Label();
this.panel3 = new System.Windows.Forms.Panel();
this.pictureBox4 = new System.Windows.Forms.PictureBox();
this.label4 = new System.Windows.Forms.Label();
this.pictureBox5 = new System.Windows.Forms.PictureBox();
this.label9 = new System.Windows.Forms.Label();
this.tableLayoutPanel1.SuspendLayout();
this.panel4.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).BeginInit();
this.panel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit();
this.panel3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).BeginInit();
this.SuspendLayout();
//
// label1
//
resources.ApplyResources(this.label1, "label1");
this.tableLayoutPanel1.SetColumnSpan(this.label1, 2);
this.label1.Name = "label1";
//
// label2
//
resources.ApplyResources(this.label2, "label2");
this.tableLayoutPanel1.SetColumnSpan(this.label2, 2);
this.label2.Name = "label2";
//
// tableLayoutPanel1
//
resources.ApplyResources(this.tableLayoutPanel1, "tableLayoutPanel1");
this.tableLayoutPanel1.Controls.Add(this.panel4, 0, 5);
this.tableLayoutPanel1.Controls.Add(this.panel2, 0, 3);
this.tableLayoutPanel1.Controls.Add(this.panel3, 0, 4);
this.tableLayoutPanel1.Controls.Add(this.label1, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.label2, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.label5, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.label2, 0, 2);
this.tableLayoutPanel1.Controls.Add(this.pictureBox3, 0, 3);
this.tableLayoutPanel1.Controls.Add(this.label8, 1, 3);
this.tableLayoutPanel1.Controls.Add(this.pictureBox4, 0, 4);
this.tableLayoutPanel1.Controls.Add(this.label4, 1, 4);
this.tableLayoutPanel1.Controls.Add(this.pictureBox5, 0, 5);
this.tableLayoutPanel1.Controls.Add(this.label9, 1, 5);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
//
// panel4
// label5
//
this.panel4.Controls.Add(this.pictureBox5);
this.panel4.Controls.Add(this.label9);
resources.ApplyResources(this.panel4, "panel4");
this.panel4.Name = "panel4";
//
// pictureBox5
//
this.pictureBox5.Image = global::XenAdmin.Properties.Resources.homepage_bullet;
resources.ApplyResources(this.pictureBox5, "pictureBox5");
this.pictureBox5.Name = "pictureBox5";
this.pictureBox5.TabStop = false;
//
// label9
//
resources.ApplyResources(this.label9, "label9");
this.label9.Name = "label9";
//
// panel2
//
this.panel2.Controls.Add(this.pictureBox3);
this.panel2.Controls.Add(this.label8);
resources.ApplyResources(this.panel2, "panel2");
this.panel2.Name = "panel2";
resources.ApplyResources(this.label5, "label5");
this.label5.BackColor = System.Drawing.Color.LemonChiffon;
this.label5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.tableLayoutPanel1.SetColumnSpan(this.label5, 2);
this.label5.Name = "label5";
//
// pictureBox3
//
this.pictureBox3.Image = global::XenAdmin.Properties.Resources.homepage_bullet;
resources.ApplyResources(this.pictureBox3, "pictureBox3");
this.pictureBox3.Image = global::XenAdmin.Properties.Resources.homepage_bullet;
this.pictureBox3.Name = "pictureBox3";
this.pictureBox3.TabStop = false;
//
@ -108,17 +91,10 @@ namespace XenAdmin.Wizards.PatchingWizard
resources.ApplyResources(this.label8, "label8");
this.label8.Name = "label8";
//
// panel3
//
this.panel3.Controls.Add(this.pictureBox4);
this.panel3.Controls.Add(this.label4);
resources.ApplyResources(this.panel3, "panel3");
this.panel3.Name = "panel3";
//
// pictureBox4
//
this.pictureBox4.Image = global::XenAdmin.Properties.Resources.homepage_bullet;
resources.ApplyResources(this.pictureBox4, "pictureBox4");
this.pictureBox4.Image = global::XenAdmin.Properties.Resources.homepage_bullet;
this.pictureBox4.Name = "pictureBox4";
this.pictureBox4.TabStop = false;
//
@ -127,6 +103,18 @@ namespace XenAdmin.Wizards.PatchingWizard
resources.ApplyResources(this.label4, "label4");
this.label4.Name = "label4";
//
// pictureBox5
//
resources.ApplyResources(this.pictureBox5, "pictureBox5");
this.pictureBox5.Image = global::XenAdmin.Properties.Resources.homepage_bullet;
this.pictureBox5.Name = "pictureBox5";
this.pictureBox5.TabStop = false;
//
// label9
//
resources.ApplyResources(this.label9, "label9");
this.label9.Name = "label9";
//
// PatchingWizard_FirstPage
//
resources.ApplyResources(this, "$this");
@ -135,12 +123,9 @@ namespace XenAdmin.Wizards.PatchingWizard
this.Name = "PatchingWizard_FirstPage";
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
this.panel4.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).EndInit();
this.panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit();
this.panel3.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
@ -151,15 +136,12 @@ namespace XenAdmin.Wizards.PatchingWizard
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.Panel panel4;
private System.Windows.Forms.PictureBox pictureBox5;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.PictureBox pictureBox3;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Panel panel3;
private System.Windows.Forms.PictureBox pictureBox4;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
}
}

View File

@ -29,6 +29,7 @@
* SUCH DAMAGE.
*/
using System.Linq;
using XenAdmin.Controls;
using XenAdmin.Core;
@ -39,7 +40,10 @@ namespace XenAdmin.Wizards.PatchingWizard
public PatchingWizard_FirstPage()
{
InitializeComponent();
label5.Text = string.Format(label5.Text, BrandManager.ProductBrand,
BrandManager.ProductVersion82, BrandManager.LegacyConsole);
label9.Text = string.Format(label9.Text, BrandManager.BrandConsole);
label5.Visible = ConnectionsManager.XenConnectionsCopy.Any(c => c.IsConnected && !Helpers.PostStockholm(c));
}
public override string Text => Messages.BEFORE_YOU_START;

View File

@ -125,14 +125,18 @@
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 0</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="label1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 0, 3, 20</value>
</data>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>319, 13</value>
<value>445, 13</value>
</data>
<data name="label1.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
<value>0</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>You can use this wizard to install software updates to your servers.
<value>You can use this wizard to install driver disk updates and supplemental packs to your servers.
</value>
</data>
<data name="&gt;&gt;label1.Name" xml:space="preserve">
@ -145,13 +149,16 @@
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;label1.ZOrder" xml:space="preserve">
<value>3</value>
<value>0</value>
</data>
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label2.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 30</value>
<value>3, 101</value>
</data>
<data name="label2.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 0, 3, 20</value>
</data>
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
<value>292, 13</value>
@ -172,104 +179,64 @@
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;label2.ZOrder" xml:space="preserve">
<value>4</value>
<value>2</value>
</data>
<data name="tableLayoutPanel1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="tableLayoutPanel1.ColumnCount" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="label5.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Left</value>
</data>
<data name="label5.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label5.Font" type="System.Drawing.Font, System.Drawing">
<value>Microsoft Sans Serif, 8.25pt, style=Bold</value>
</data>
<data name="label5.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label5.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 33</value>
</data>
<data name="label5.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 0, 3, 30</value>
</data>
<data name="label5.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>5, 5, 5, 5</value>
</data>
<data name="label5.Size" type="System.Drawing.Size, System.Drawing">
<value>577, 38</value>
</data>
<data name="label5.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="pictureBox5.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 15</value>
<data name="label5.Text" xml:space="preserve">
<value>You cannot use this wizard to install updates or supplemental packs to {0} {1}. Please use {2} {1} instead.</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="pictureBox5.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 0</value>
<data name="&gt;&gt;label5.Name" xml:space="preserve">
<value>label5</value>
</data>
<data name="pictureBox5.Size" type="System.Drawing.Size, System.Drawing">
<value>4, 4</value>
</data>
<data name="pictureBox5.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
</data>
<data name="&gt;&gt;pictureBox5.Name" xml:space="preserve">
<value>pictureBox5</value>
</data>
<data name="&gt;&gt;pictureBox5.Type" xml:space="preserve">
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;pictureBox5.Parent" xml:space="preserve">
<value>panel4</value>
</data>
<data name="&gt;&gt;pictureBox5.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="label9.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Left, Right</value>
</data>
<data name="label9.Location" type="System.Drawing.Point, System.Drawing">
<value>17, 0</value>
</data>
<data name="label9.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>20, 0, 3, 0</value>
</data>
<data name="label9.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 0, 3, 0</value>
</data>
<data name="label9.Size" type="System.Drawing.Size, System.Drawing">
<value>577, 34</value>
</data>
<data name="label9.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
</data>
<data name="label9.Text" xml:space="preserve">
<value>Ensure that you are logged in to {0} as a Pool Administrator or Pool Operator, or using a local root account.</value>
</data>
<data name="label9.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleLeft</value>
</data>
<data name="&gt;&gt;label9.Name" xml:space="preserve">
<value>label9</value>
</data>
<data name="&gt;&gt;label9.Type" xml:space="preserve">
<data name="&gt;&gt;label5.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label9.Parent" xml:space="preserve">
<value>panel4</value>
</data>
<data name="&gt;&gt;label9.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="panel4.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="panel4.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 143</value>
</data>
<data name="panel4.Size" type="System.Drawing.Size, System.Drawing">
<value>594, 34</value>
</data>
<data name="panel4.TabIndex" type="System.Int32, mscorlib">
<value>10</value>
</data>
<data name="&gt;&gt;panel4.Name" xml:space="preserve">
<value>panel4</value>
</data>
<data name="&gt;&gt;panel4.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;panel4.Parent" xml:space="preserve">
<data name="&gt;&gt;label5.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;panel4.ZOrder" xml:space="preserve">
<value>0</value>
<data name="&gt;&gt;label5.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="pictureBox3.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top</value>
</data>
<data name="pictureBox3.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 15</value>
<value>3, 139</value>
</data>
<data name="pictureBox3.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 0</value>
<value>3, 5, 3, 3</value>
</data>
<data name="pictureBox3.Size" type="System.Drawing.Size, System.Drawing">
<value>4, 4</value>
@ -284,35 +251,29 @@
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;pictureBox3.Parent" xml:space="preserve">
<value>panel2</value>
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;pictureBox3.ZOrder" xml:space="preserve">
<value>0</value>
<value>3</value>
</data>
<data name="label8.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Left, Right</value>
<data name="label8.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label8.Location" type="System.Drawing.Point, System.Drawing">
<value>17, 0</value>
<value>13, 134</value>
</data>
<data name="label8.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>20, 0, 3, 0</value>
</data>
<data name="label8.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 0, 3, 0</value>
<value>3, 0, 3, 20</value>
</data>
<data name="label8.Size" type="System.Drawing.Size, System.Drawing">
<value>577, 34</value>
<value>123, 13</value>
</data>
<data name="label8.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
<value>3</value>
</data>
<data name="label8.Text" xml:space="preserve">
<value>Back up all your servers.</value>
</data>
<data name="label8.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleLeft</value>
</data>
<data name="&gt;&gt;label8.Name" xml:space="preserve">
<value>label8</value>
</data>
@ -320,40 +281,19 @@
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label8.Parent" xml:space="preserve">
<value>panel2</value>
</data>
<data name="&gt;&gt;label8.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="panel2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="panel2.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 63</value>
</data>
<data name="panel2.Size" type="System.Drawing.Size, System.Drawing">
<value>594, 34</value>
</data>
<data name="panel2.TabIndex" type="System.Int32, mscorlib">
<value>8</value>
</data>
<data name="&gt;&gt;panel2.Name" xml:space="preserve">
<value>panel2</value>
</data>
<data name="&gt;&gt;panel2.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;panel2.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;panel2.ZOrder" xml:space="preserve">
<value>1</value>
<data name="&gt;&gt;label8.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="pictureBox4.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top</value>
</data>
<data name="pictureBox4.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 15</value>
<value>3, 172</value>
</data>
<data name="pictureBox4.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 0</value>
<value>3, 5, 3, 3</value>
</data>
<data name="pictureBox4.Size" type="System.Drawing.Size, System.Drawing">
<value>4, 4</value>
@ -368,35 +308,29 @@
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;pictureBox4.Parent" xml:space="preserve">
<value>panel3</value>
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;pictureBox4.ZOrder" xml:space="preserve">
<value>0</value>
<value>5</value>
</data>
<data name="label4.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Left, Right</value>
<data name="label4.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label4.Location" type="System.Drawing.Point, System.Drawing">
<value>17, 0</value>
<value>13, 167</value>
</data>
<data name="label4.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>20, 0, 3, 0</value>
</data>
<data name="label4.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 0, 3, 0</value>
<value>3, 0, 3, 20</value>
</data>
<data name="label4.Size" type="System.Drawing.Size, System.Drawing">
<value>577, 34</value>
<value>457, 13</value>
</data>
<data name="label4.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
<value>4</value>
</data>
<data name="label4.Text" xml:space="preserve">
<value>Ensure that High Availability (HA) is not enabled on any pool where you intend to apply updates.</value>
</data>
<data name="label4.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleLeft</value>
</data>
<data name="&gt;&gt;label4.Name" xml:space="preserve">
<value>label4</value>
</data>
@ -404,34 +338,67 @@
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label4.Parent" xml:space="preserve">
<value>panel3</value>
</data>
<data name="&gt;&gt;label4.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="panel3.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="panel3.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 103</value>
</data>
<data name="panel3.Size" type="System.Drawing.Size, System.Drawing">
<value>594, 34</value>
</data>
<data name="panel3.TabIndex" type="System.Int32, mscorlib">
<value>9</value>
</data>
<data name="&gt;&gt;panel3.Name" xml:space="preserve">
<value>panel3</value>
</data>
<data name="&gt;&gt;panel3.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;panel3.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;panel3.ZOrder" xml:space="preserve">
<value>2</value>
<data name="&gt;&gt;label4.ZOrder" xml:space="preserve">
<value>6</value>
</data>
<data name="pictureBox5.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top</value>
</data>
<data name="pictureBox5.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 205</value>
</data>
<data name="pictureBox5.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 5, 3, 3</value>
</data>
<data name="pictureBox5.Size" type="System.Drawing.Size, System.Drawing">
<value>4, 4</value>
</data>
<data name="pictureBox5.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
</data>
<data name="&gt;&gt;pictureBox5.Name" xml:space="preserve">
<value>pictureBox5</value>
</data>
<data name="&gt;&gt;pictureBox5.Type" xml:space="preserve">
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;pictureBox5.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;pictureBox5.ZOrder" xml:space="preserve">
<value>7</value>
</data>
<data name="label9.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label9.Location" type="System.Drawing.Point, System.Drawing">
<value>13, 200</value>
</data>
<data name="label9.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 0, 3, 20</value>
</data>
<data name="label9.Size" type="System.Drawing.Size, System.Drawing">
<value>507, 13</value>
</data>
<data name="label9.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
</data>
<data name="label9.Text" xml:space="preserve">
<value>Ensure that you are logged in to {0} as a Pool Administrator or Pool Operator, or using a local root account.</value>
</data>
<data name="&gt;&gt;label9.Name" xml:space="preserve">
<value>label9</value>
</data>
<data name="&gt;&gt;label9.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label9.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;label9.ZOrder" xml:space="preserve">
<value>8</value>
</data>
<data name="tableLayoutPanel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
@ -443,10 +410,10 @@
<value>6</value>
</data>
<data name="tableLayoutPanel1.Size" type="System.Drawing.Size, System.Drawing">
<value>600, 180</value>
<value>600, 233</value>
</data>
<data name="tableLayoutPanel1.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
<value>0</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Name" xml:space="preserve">
<value>tableLayoutPanel1</value>
@ -461,7 +428,7 @@
<value>0</value>
</data>
<data name="tableLayoutPanel1.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="panel4" Row="5" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="panel2" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="panel3" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="label1" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="label2" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Percent,100" /&gt;&lt;Rows Styles="Absolute,30,Absolute,30,AutoSize,40,Absolute,40,Absolute,40,Absolute,40" /&gt;&lt;/TableLayoutSettings&gt;</value>
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="label1" Row="0" RowSpan="1" Column="0" ColumnSpan="2" /&gt;&lt;Control Name="label5" Row="1" RowSpan="1" Column="0" ColumnSpan="2" /&gt;&lt;Control Name="label2" Row="2" RowSpan="1" Column="0" ColumnSpan="2" /&gt;&lt;Control Name="pictureBox3" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="label8" Row="3" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="pictureBox4" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="label4" Row="4" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="pictureBox5" Row="5" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="label9" Row="5" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,Percent,100" /&gt;&lt;Rows Styles="AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
@ -469,6 +436,9 @@
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>96, 96</value>
</data>
<data name="$this.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>2, 2, 2, 2</value>
</data>
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
<value>600, 400</value>
</data>
@ -476,6 +446,6 @@
<value>PatchingWizard_FirstPage</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>XenAdmin.Controls.XenTabPage, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
<value>XenAdmin.Controls.XenTabPage, [XenCenter_No_Space]Main, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
</root>

View File

@ -73,34 +73,17 @@ namespace XenAdmin.Wizards.PatchingWizard
}
public XenServerPatchAlert UpdateAlert { private get; set; }
public WizardMode WizardMode { private get; set; }
public bool ApplyUpdatesToNewVersion { protected get; set; }
public PatchingWizard_PrecheckPage()
{
InitializeComponent();
}
public override string PageTitle
{
get
{
return Messages.PATCHINGWIZARD_PRECHECKPAGE_TITLE;
}
}
public override string PageTitle => Messages.PATCHINGWIZARD_PRECHECKPAGE_TITLE;
public override string Text
{
get
{
return Messages.PATCHINGWIZARD_PRECHECKPAGE_TEXT;
}
}
public override string Text => Messages.PATCHINGWIZARD_PRECHECKPAGE_TEXT;
public override string HelpID
{
get { return "UpdatePrechecks"; }
}
public override string HelpID => "UpdatePrechecks";
void Connection_ConnectionStateChanged(IXenConnection conn)
{
@ -129,22 +112,15 @@ namespace XenAdmin.Wizards.PatchingWizard
if (direction == PageLoadedDirection.Back)
return;
if (WizardMode == WizardMode.AutomatedUpdates)
{
labelPrechecksFirstLine.Text = Messages.PATCHINGWIZARD_PRECHECKPAGE_FIRSTLINE_AUTOMATED_UPDATES_MODE;
}
else
{
string patchName = null;
if (Patch != null)
patchName = Patch.Name();
if (PoolUpdate != null)
patchName = PoolUpdate.Name();
string patchName = null;
if (Patch != null)
patchName = Patch.Name();
if (PoolUpdate != null)
patchName = PoolUpdate.Name();
labelPrechecksFirstLine.Text = patchName != null
? string.Format(Messages.PATCHINGWIZARD_PRECHECKPAGE_FIRSTLINE, patchName)
: Messages.PATCHINGWIZARD_PRECHECKPAGE_FIRSTLINE_NO_PATCH_NAME;
}
labelPrechecksFirstLine.Text = patchName != null
? string.Format(Messages.PATCHINGWIZARD_PRECHECKPAGE_FIRSTLINE, patchName)
: Messages.PATCHINGWIZARD_PRECHECKPAGE_FIRSTLINE_NO_PATCH_NAME;
RefreshRechecks();
}
@ -356,45 +332,6 @@ namespace XenAdmin.Wizards.PatchingWizard
groups.Add(new CheckGroup(Messages.CHECKING_HOST_LIVENESS_STATUS, livenessChecks));
if (WizardMode == WizardMode.NewVersion)
{
//vSwitch controller check - for each pool
var vSwitchChecks = (from Pool pool in SelectedPools
let check = new VSwitchControllerCheck(pool.Connection.Resolve(pool.master), UpdateAlert?.NewServerVersion)
where check.CanRun()
select check as Check).ToList();
if (vSwitchChecks.Count > 0)
groups.Add(new CheckGroup(Messages.CHECKING_VSWITCH_CONTROLLER_GROUP, vSwitchChecks));
//protocol check - for each pool
var sslChecks = (from Pool pool in SelectedPools
let check = new PoolLegacySslCheck(pool.Connection.Resolve(pool.master), UpdateAlert?.NewServerVersion)
where check.CanRun()
select check as Check).ToList();
if (sslChecks.Count > 0)
groups.Add(new CheckGroup(Messages.CHECKING_SECURITY_PROTOCOL_GROUP, sslChecks));
//power on mode check - for each host
var iloChecks = (from Host host in SelectedServers
let check = new PowerOniLoCheck(host, UpdateAlert?.NewServerVersion)
where check.CanRun()
select check as Check).ToList();
if (iloChecks.Count > 0)
groups.Add(new CheckGroup(Messages.CHECKING_POWER_ON_MODE_GROUP, iloChecks));
//PVGuestsCheck checks
var pvChecks = (from Pool pool in SelectedPools
let check = new PVGuestsCheck(pool.Connection.Resolve(pool.master), false)
where check.CanRun()
select check as Check).ToList();
if (pvChecks.Count > 0)
groups.Add(new CheckGroup(Messages.CHECKING_PV_GUESTS, pvChecks));
}
//HA checks
var haChecks = new List<Check>();
@ -428,80 +365,6 @@ namespace XenAdmin.Wizards.PatchingWizard
XenServerVersion highestNewVersion = null;
//Disk space, reboot required and can evacuate host checks for automated and version updates
if (WizardMode != WizardMode.SingleUpdate)
{
var diskChecks = new List<Check>();
var rebootChecks = new List<Check>();
var evacuateChecks = new List<Check>();
foreach (Pool pool in SelectedPools)
{
//if any host is not licensed for automated updates
bool automatedUpdatesRestricted = pool.Connection.Cache.Hosts.Any(Host.RestrictBatchHotfixApply);
var minimalPatches = WizardMode == WizardMode.NewVersion
? Updates.GetMinimalPatches(UpdateAlert, ApplyUpdatesToNewVersion && !automatedUpdatesRestricted)
: Updates.GetMinimalPatches(pool.Connection);
if (minimalPatches == null)
continue;
var us = new Dictionary<Host, List<XenServerPatch>>();
var hosts = pool.Connection.Cache.Hosts;
Array.Sort(hosts);
foreach (var h in hosts)
{
var ps = Updates.GetPatchSequenceForHost(h, minimalPatches);
if (ps != null)
us[h] = ps;
}
log.InfoFormat("Minimal patches for {0}: {1}", pool.Name(), string.Join(",", minimalPatches.Select(p => p.Name)));
// we check the contains-livepatch property of all the applicable patches to determine if a host will need to be rebooted after patch installation,
// because the minimal patches might roll-up patches that are not live-patchable
var allPatches = WizardMode == WizardMode.NewVersion
? Updates.GetAllPatches(UpdateAlert, ApplyUpdatesToNewVersion && !automatedUpdatesRestricted)
: Updates.GetAllPatches(pool.Connection);
foreach (Host host in us.Keys)
{
diskChecks.Add(new DiskSpaceForAutomatedUpdatesCheck(host, us));
if (us[host] != null && us[host].Count > 0)
{
var allApplicablePatches = Updates.GetPatchSequenceForHost(host, allPatches);
var restartHostPatches = allApplicablePatches != null
? allApplicablePatches.Where(p => p.after_apply_guidance == after_apply_guidance.restartHost).ToList()
: new List<XenServerPatch>();
rebootChecks.Add(new HostNeedsRebootCheck(host, restartHostPatches));
if (restartHostPatches.Count > 0 && (restartHostPatches.Any(p => !p.ContainsLivepatch) ||
Helpers.FeatureForbidden(host.Connection, Host.RestrictLivePatching) ||
Helpers.GetPoolOfOne(host.Connection)?.live_patching_disabled == true))
evacuateChecks.Add(new AssertCanEvacuateCheck(host));
foreach (var p in us[host])
{
var newVersion = Updates.XenServerVersions.FirstOrDefault(v => v.PatchUuid != null && v.PatchUuid.Equals(p.Uuid, StringComparison.OrdinalIgnoreCase));
if (newVersion != null && (highestNewVersion == null || newVersion.Version > highestNewVersion.Version))
highestNewVersion = newVersion;
}
}
}
}
groups.Add(new CheckGroup(Messages.PATCHINGWIZARD_PRECHECKPAGE_CHECKING_DISK_SPACE, diskChecks));
if (rebootChecks.Count > 0)
groups.Add(new CheckGroup(Messages.CHECKING_SERVER_NEEDS_REBOOT, rebootChecks));
if (evacuateChecks.Count > 0)
groups.Add(new CheckGroup(Messages.CHECKING_CANEVACUATE_STATUS, evacuateChecks));
}
//XenCenter version check
if (highestNewVersion != null || UpdateAlert?.NewServerVersion != null)
{
@ -510,25 +373,6 @@ namespace XenAdmin.Wizards.PatchingWizard
new List<Check> { new XenCenterVersionCheck(highestNewVersion ?? UpdateAlert.NewServerVersion) }));
}
//GFS2 check for version updates
if (WizardMode == WizardMode.NewVersion)
{
var gfs2Checks = new List<Check>();
foreach (Pool pool in SelectedPools.Where(p =>
Helpers.KolkataOrGreater(p.Connection) && !Helpers.LimaOrGreater(p.Connection)))
{
Host host = pool.Connection.Resolve(pool.master);
gfs2Checks.Add(new PoolHasGFS2SR(host));
}
if (gfs2Checks.Count > 0)
{
groups.Add(new CheckGroup(Messages.CHECKING_CLUSTERING_STATUS, gfs2Checks));
}
}
return groups;
}
@ -551,24 +395,20 @@ namespace XenAdmin.Wizards.PatchingWizard
groups.Add(new CheckGroup(Messages.CHECKING_SERVER_SIDE_STATUS, serverChecks));
}
//Checking if the host needs a reboot
if (WizardMode == WizardMode.SingleUpdate)
{
var rebootChecks = new List<Check>();
var guidance = patch != null
? patch.after_apply_guidance
: new List<after_apply_guidance> {after_apply_guidance.restartHost};
var rebootChecks = new List<Check>();
var guidance = patch != null
? patch.after_apply_guidance
: new List<after_apply_guidance> {after_apply_guidance.restartHost};
foreach (var host in applicableServers)
rebootChecks.Add(new HostNeedsRebootCheck(host, guidance, LivePatchCodesByHost));
foreach (var host in applicableServers)
rebootChecks.Add(new HostNeedsRebootCheck(host, guidance, LivePatchCodesByHost));
groups.Add(new CheckGroup(Messages.CHECKING_SERVER_NEEDS_REBOOT, rebootChecks));
}
groups.Add(new CheckGroup(Messages.CHECKING_SERVER_NEEDS_REBOOT, rebootChecks));
//Checking can evacuate host
//CA-97061 - evacuate host -> suspended VMs. This is only needed for restartHost
//Also include this check for the supplemental packs (patch == null), as their guidance is restartHost
if (WizardMode == WizardMode.SingleUpdate && (patch == null || patch.after_apply_guidance.Contains(after_apply_guidance.restartHost)))
if (patch == null || patch.after_apply_guidance.Contains(after_apply_guidance.restartHost))
{
var evacuateChecks = new List<Check>();
foreach (Host host in applicableServers)
@ -623,20 +463,17 @@ namespace XenAdmin.Wizards.PatchingWizard
}
//Checking if the host needs a reboot
if (WizardMode == WizardMode.SingleUpdate)
{
var rebootChecks = new List<Check>();
var guidance = update != null
? update.after_apply_guidance
: new List<update_after_apply_guidance> {update_after_apply_guidance.restartHost};
foreach (var host in applicableServers)
rebootChecks.Add(new HostNeedsRebootCheck(host, guidance, LivePatchCodesByHost));
var rebootChecks = new List<Check>();
var guidance = update != null
? update.after_apply_guidance
: new List<update_after_apply_guidance> {update_after_apply_guidance.restartHost};
foreach (var host in applicableServers)
rebootChecks.Add(new HostNeedsRebootCheck(host, guidance, LivePatchCodesByHost));
groups.Add(new CheckGroup(Messages.CHECKING_SERVER_NEEDS_REBOOT, rebootChecks));
}
groups.Add(new CheckGroup(Messages.CHECKING_SERVER_NEEDS_REBOOT, rebootChecks));
//Checking can evacuate host
if (WizardMode == WizardMode.SingleUpdate && (update == null || update.after_apply_guidance.Contains(update_after_apply_guidance.restartHost)))
if (update == null || update.after_apply_guidance.Contains(update_after_apply_guidance.restartHost))
{
var evacuateChecks = new List<Check>();
foreach (Host host in applicableServers)

View File

@ -1,5 +1,3 @@
using XenAdmin.Controls.DataGridViewEx;
namespace XenAdmin.Wizards.PatchingWizard
{
partial class PatchingWizard_SelectPatchPage
@ -31,128 +29,28 @@ namespace XenAdmin.Wizards.PatchingWizard
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PatchingWizard_SelectPatchPage));
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.labelWithoutAutomatedUpdates = new System.Windows.Forms.Label();
this.labelWithAutomatedUpdates = new System.Windows.Forms.Label();
this.AutomatedUpdatesRadioButton = new System.Windows.Forms.RadioButton();
this.automatedUpdatesOptionLabel = new System.Windows.Forms.Label();
this.downloadUpdateRadioButton = new System.Windows.Forms.RadioButton();
this.RefreshListButton = new System.Windows.Forms.Button();
this.RestoreDismUpdatesButton = new System.Windows.Forms.Button();
this.selectFromDiskRadioButton = new System.Windows.Forms.RadioButton();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.labelOnlySelectFromDisk = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.fileNameTextBox = new System.Windows.Forms.TextBox();
this.BrowseButton = new System.Windows.Forms.Button();
this.panel1 = new System.Windows.Forms.Panel();
this.tableLayoutPanelSpinner = new System.Windows.Forms.TableLayoutPanel();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.label1 = new System.Windows.Forms.Label();
this.dataGridViewPatches = new XenAdmin.Controls.DataGridViewEx.DataGridViewEx();
this.ColumnUpdate = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColumnDescription = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColumnDate = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.webPageColumn = new System.Windows.Forms.DataGridViewLinkColumn();
this._backgroundWorker = new System.ComponentModel.BackgroundWorker();
this.tableLayoutPanel1.SuspendLayout();
this.tableLayoutPanel2.SuspendLayout();
this.panel1.SuspendLayout();
this.tableLayoutPanelSpinner.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dataGridViewPatches)).BeginInit();
this.SuspendLayout();
//
// tableLayoutPanel1
//
resources.ApplyResources(this.tableLayoutPanel1, "tableLayoutPanel1");
this.tableLayoutPanel1.Controls.Add(this.labelWithoutAutomatedUpdates, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.labelWithAutomatedUpdates, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.AutomatedUpdatesRadioButton, 0, 2);
this.tableLayoutPanel1.Controls.Add(this.automatedUpdatesOptionLabel, 1, 3);
this.tableLayoutPanel1.Controls.Add(this.downloadUpdateRadioButton, 0, 4);
this.tableLayoutPanel1.Controls.Add(this.RefreshListButton, 1, 6);
this.tableLayoutPanel1.Controls.Add(this.RestoreDismUpdatesButton, 2, 6);
this.tableLayoutPanel1.Controls.Add(this.selectFromDiskRadioButton, 0, 7);
this.tableLayoutPanel1.Controls.Add(this.tableLayoutPanel2, 1, 8);
this.tableLayoutPanel1.Controls.Add(this.panel1, 1, 5);
this.tableLayoutPanel1.Controls.Add(this.labelOnlySelectFromDisk, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.fileNameTextBox, 1, 1);
this.tableLayoutPanel1.Controls.Add(this.BrowseButton, 2, 1);
this.tableLayoutPanel1.Controls.Add(this.label2, 0, 1);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
//
// labelWithoutAutomatedUpdates
// labelOnlySelectFromDisk
//
resources.ApplyResources(this.labelWithoutAutomatedUpdates, "labelWithoutAutomatedUpdates");
this.tableLayoutPanel1.SetColumnSpan(this.labelWithoutAutomatedUpdates, 3);
this.labelWithoutAutomatedUpdates.Name = "labelWithoutAutomatedUpdates";
//
// labelWithAutomatedUpdates
//
resources.ApplyResources(this.labelWithAutomatedUpdates, "labelWithAutomatedUpdates");
this.tableLayoutPanel1.SetColumnSpan(this.labelWithAutomatedUpdates, 3);
this.labelWithAutomatedUpdates.Name = "labelWithAutomatedUpdates";
//
// AutomatedUpdatesRadioButton
//
resources.ApplyResources(this.AutomatedUpdatesRadioButton, "AutomatedUpdatesRadioButton");
this.AutomatedUpdatesRadioButton.Checked = true;
this.tableLayoutPanel1.SetColumnSpan(this.AutomatedUpdatesRadioButton, 3);
this.AutomatedUpdatesRadioButton.Name = "AutomatedUpdatesRadioButton";
this.AutomatedUpdatesRadioButton.TabStop = true;
this.AutomatedUpdatesRadioButton.UseVisualStyleBackColor = true;
this.AutomatedUpdatesRadioButton.CheckedChanged += new System.EventHandler(this.AutomaticRadioButton_CheckedChanged);
this.AutomatedUpdatesRadioButton.TabStopChanged += new System.EventHandler(this.AutomaticRadioButton_TabStopChanged);
//
// automatedUpdatesOptionLabel
//
resources.ApplyResources(this.automatedUpdatesOptionLabel, "automatedUpdatesOptionLabel");
this.tableLayoutPanel1.SetColumnSpan(this.automatedUpdatesOptionLabel, 2);
this.automatedUpdatesOptionLabel.Name = "automatedUpdatesOptionLabel";
//
// downloadUpdateRadioButton
//
resources.ApplyResources(this.downloadUpdateRadioButton, "downloadUpdateRadioButton");
this.tableLayoutPanel1.SetColumnSpan(this.downloadUpdateRadioButton, 3);
this.downloadUpdateRadioButton.Name = "downloadUpdateRadioButton";
this.downloadUpdateRadioButton.UseVisualStyleBackColor = true;
this.downloadUpdateRadioButton.CheckedChanged += new System.EventHandler(this.downloadUpdateRadioButton_CheckedChanged);
this.downloadUpdateRadioButton.TabStopChanged += new System.EventHandler(this.downloadUpdateRadioButton_TabStopChanged);
//
// RefreshListButton
//
resources.ApplyResources(this.RefreshListButton, "RefreshListButton");
this.RefreshListButton.Name = "RefreshListButton";
this.RefreshListButton.UseVisualStyleBackColor = true;
this.RefreshListButton.Click += new System.EventHandler(this.RefreshListButton_Click);
//
// RestoreDismUpdatesButton
//
resources.ApplyResources(this.RestoreDismUpdatesButton, "RestoreDismUpdatesButton");
this.RestoreDismUpdatesButton.Name = "RestoreDismUpdatesButton";
this.RestoreDismUpdatesButton.UseVisualStyleBackColor = true;
this.RestoreDismUpdatesButton.Click += new System.EventHandler(this.RestoreDismUpdatesButton_Click);
//
// selectFromDiskRadioButton
//
resources.ApplyResources(this.selectFromDiskRadioButton, "selectFromDiskRadioButton");
this.tableLayoutPanel1.SetColumnSpan(this.selectFromDiskRadioButton, 3);
this.selectFromDiskRadioButton.Name = "selectFromDiskRadioButton";
this.selectFromDiskRadioButton.UseVisualStyleBackColor = true;
this.selectFromDiskRadioButton.CheckedChanged += new System.EventHandler(this.selectFromDiskRadioButton_CheckedChanged);
this.selectFromDiskRadioButton.TabStopChanged += new System.EventHandler(this.selectFromDiskRadioButton_TabStopChanged);
//
// tableLayoutPanel2
//
resources.ApplyResources(this.tableLayoutPanel2, "tableLayoutPanel2");
this.tableLayoutPanel1.SetColumnSpan(this.tableLayoutPanel2, 2);
this.tableLayoutPanel2.Controls.Add(this.label2, 0, 0);
this.tableLayoutPanel2.Controls.Add(this.fileNameTextBox, 1, 0);
this.tableLayoutPanel2.Controls.Add(this.BrowseButton, 2, 0);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
resources.ApplyResources(this.labelOnlySelectFromDisk, "labelOnlySelectFromDisk");
this.tableLayoutPanel1.SetColumnSpan(this.labelOnlySelectFromDisk, 3);
this.labelOnlySelectFromDisk.Name = "labelOnlySelectFromDisk";
//
// label2
//
@ -164,7 +62,6 @@ namespace XenAdmin.Wizards.PatchingWizard
resources.ApplyResources(this.fileNameTextBox, "fileNameTextBox");
this.fileNameTextBox.Name = "fileNameTextBox";
this.fileNameTextBox.TextChanged += new System.EventHandler(this.fileNameTextBox_TextChanged);
this.fileNameTextBox.Enter += new System.EventHandler(this.fileNameTextBox_Enter);
//
// BrowseButton
//
@ -173,127 +70,6 @@ namespace XenAdmin.Wizards.PatchingWizard
this.BrowseButton.UseVisualStyleBackColor = true;
this.BrowseButton.Click += new System.EventHandler(this.BrowseButton_Click);
//
// panel1
//
this.tableLayoutPanel1.SetColumnSpan(this.panel1, 2);
this.panel1.Controls.Add(this.tableLayoutPanelSpinner);
this.panel1.Controls.Add(this.dataGridViewPatches);
resources.ApplyResources(this.panel1, "panel1");
this.panel1.Name = "panel1";
//
// tableLayoutPanelSpinner
//
resources.ApplyResources(this.tableLayoutPanelSpinner, "tableLayoutPanelSpinner");
this.tableLayoutPanelSpinner.BackColor = System.Drawing.SystemColors.Window;
this.tableLayoutPanelSpinner.Controls.Add(this.pictureBox1, 0, 0);
this.tableLayoutPanelSpinner.Controls.Add(this.label1, 1, 0);
this.tableLayoutPanelSpinner.Name = "tableLayoutPanelSpinner";
//
// pictureBox1
//
this.pictureBox1.BackColor = System.Drawing.SystemColors.Window;
this.pictureBox1.Image = global::XenAdmin.Properties.Resources.ajax_loader;
resources.ApplyResources(this.pictureBox1, "pictureBox1");
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.TabStop = false;
//
// label1
//
resources.ApplyResources(this.label1, "label1");
this.label1.BackColor = System.Drawing.SystemColors.Window;
this.label1.Name = "label1";
//
// dataGridViewPatches
//
this.dataGridViewPatches.AllowUserToResizeColumns = false;
this.dataGridViewPatches.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCells;
this.dataGridViewPatches.BackgroundColor = System.Drawing.SystemColors.Window;
this.dataGridViewPatches.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
this.dataGridViewPatches.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
this.dataGridViewPatches.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.ColumnUpdate,
this.ColumnDescription,
this.ColumnDate,
this.webPageColumn});
dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Window;
dataGridViewCellStyle5.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.ControlText;
dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Window;
dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.ControlText;
dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dataGridViewPatches.DefaultCellStyle = dataGridViewCellStyle5;
resources.ApplyResources(this.dataGridViewPatches, "dataGridViewPatches");
this.dataGridViewPatches.HideSelection = true;
this.dataGridViewPatches.Name = "dataGridViewPatches";
this.dataGridViewPatches.ReadOnly = true;
dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle6.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dataGridViewPatches.RowHeadersDefaultCellStyle = dataGridViewCellStyle6;
dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridViewPatches.RowsDefaultCellStyle = dataGridViewCellStyle7;
this.dataGridViewPatches.RowTemplate.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridViewPatches.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewPatches_CellContentClick);
this.dataGridViewPatches.SelectionChanged += new System.EventHandler(this.dataGridViewPatches_SelectionChanged);
this.dataGridViewPatches.SortCompare += new System.Windows.Forms.DataGridViewSortCompareEventHandler(this.dataGridViewPatches_SortCompare);
this.dataGridViewPatches.Enter += new System.EventHandler(this.dataGridViewPatches_Enter);
//
// ColumnUpdate
//
this.ColumnUpdate.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.TopLeft;
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.ColumnUpdate.DefaultCellStyle = dataGridViewCellStyle1;
this.ColumnUpdate.FillWeight = 76.67365F;
resources.ApplyResources(this.ColumnUpdate, "ColumnUpdate");
this.ColumnUpdate.Name = "ColumnUpdate";
this.ColumnUpdate.ReadOnly = true;
//
// ColumnDescription
//
this.ColumnDescription.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.TopLeft;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.ColumnDescription.DefaultCellStyle = dataGridViewCellStyle2;
this.ColumnDescription.FillWeight = 172.4619F;
resources.ApplyResources(this.ColumnDescription, "ColumnDescription");
this.ColumnDescription.Name = "ColumnDescription";
this.ColumnDescription.ReadOnly = true;
//
// ColumnDate
//
this.ColumnDate.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.TopLeft;
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.ColumnDate.DefaultCellStyle = dataGridViewCellStyle3;
this.ColumnDate.FillWeight = 80F;
resources.ApplyResources(this.ColumnDate, "ColumnDate");
this.ColumnDate.Name = "ColumnDate";
this.ColumnDate.ReadOnly = true;
//
// webPageColumn
//
this.webPageColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.TopLeft;
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.webPageColumn.DefaultCellStyle = dataGridViewCellStyle4;
this.webPageColumn.FillWeight = 60F;
resources.ApplyResources(this.webPageColumn, "webPageColumn");
this.webPageColumn.Name = "webPageColumn";
this.webPageColumn.ReadOnly = true;
this.webPageColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
//
// _backgroundWorker
//
this._backgroundWorker.WorkerSupportsCancellation = true;
this._backgroundWorker.DoWork += new System.ComponentModel.DoWorkEventHandler(this._backgroundWorker_DoWork);
this._backgroundWorker.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this._backgroundWorker_RunWorkerCompleted);
//
// PatchingWizard_SelectPatchPage
//
resources.ApplyResources(this, "$this");
@ -302,42 +78,15 @@ namespace XenAdmin.Wizards.PatchingWizard
this.Name = "PatchingWizard_SelectPatchPage";
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
this.tableLayoutPanel2.ResumeLayout(false);
this.tableLayoutPanel2.PerformLayout();
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.tableLayoutPanelSpinner.ResumeLayout(false);
this.tableLayoutPanelSpinner.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dataGridViewPatches)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button BrowseButton;
private DataGridViewEx dataGridViewPatches;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.Label labelOnlySelectFromDisk;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox fileNameTextBox;
private System.Windows.Forms.RadioButton selectFromDiskRadioButton;
private System.Windows.Forms.Button RefreshListButton;
private System.Windows.Forms.RadioButton downloadUpdateRadioButton;
private System.Windows.Forms.Label labelWithAutomatedUpdates;
private System.Windows.Forms.Button RestoreDismUpdatesButton;
private System.Windows.Forms.Label automatedUpdatesOptionLabel;
private System.Windows.Forms.RadioButton AutomatedUpdatesRadioButton;
private System.Windows.Forms.Label labelWithoutAutomatedUpdates;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanelSpinner;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnUpdate;
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnDescription;
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnDate;
private System.Windows.Forms.DataGridViewLinkColumn webPageColumn;
private System.ComponentModel.BackgroundWorker _backgroundWorker;
private System.Windows.Forms.Button BrowseButton;
}
}

View File

@ -31,15 +31,11 @@
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using XenAdmin.Controls;
using XenAdmin.Controls.DataGridViewEx;
using XenAdmin.Core;
using XenAPI;
using System.IO;
using XenAdmin.Dialogs;
using XenAdmin.Alerts;
using System.Linq;
using System.Xml;
using DiscUtils.Iso9660;
using XenCenterLib;
@ -52,94 +48,13 @@ namespace XenAdmin.Wizards.PatchingWizard
private static readonly log4net.ILog log =
log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
public event Action UpdateAlertFromWebSelected;
private bool CheckForUpdatesInProgress;
public XenServerPatchAlert UpdateAlertFromWeb;
public XenServerPatchAlert AlertFromFileOnDisk;
public bool FileFromDiskHasUpdateXml { get; private set; }
private bool firstLoad = true;
private string unzippedUpdateFilePath;
public PatchingWizard_SelectPatchPage()
{
InitializeComponent();
labelWithAutomatedUpdates.Text = string.Format(labelWithAutomatedUpdates.Text, BrandManager.CompanyNameShort);
labelWithoutAutomatedUpdates.Text = string.Format(labelWithoutAutomatedUpdates.Text, BrandManager.CompanyNameShort);
automatedUpdatesOptionLabel.Text = string.Format(automatedUpdatesOptionLabel.Text, BrandManager.BrandConsole, BrandManager.CompanyNameShort);
downloadUpdateRadioButton.Text = string.Format(downloadUpdateRadioButton.Text, BrandManager.CompanyNameShort);
tableLayoutPanelSpinner.Visible = false;
labelWithAutomatedUpdates.Visible =
automatedUpdatesOptionLabel.Visible = AutomatedUpdatesRadioButton.Visible = false;
downloadUpdateRadioButton.Checked = true;
}
private void RegisterEvents()
{
Updates.CheckForUpdatesStarted += CheckForUpdates_CheckForUpdatesStarted;
Updates.CheckForUpdatesCompleted += CheckForUpdates_CheckForUpdatesCompleted;
Updates.RestoreDismissedUpdatesStarted += Updates_RestoreDismissedUpdatesStarted;
}
private void UnRegisterEvents()
{
Updates.RestoreDismissedUpdatesStarted -= Updates_RestoreDismissedUpdatesStarted;
Updates.CheckForUpdatesStarted -= CheckForUpdates_CheckForUpdatesStarted;
Updates.CheckForUpdatesCompleted -= CheckForUpdates_CheckForUpdatesCompleted;
}
private void CheckForUpdates_CheckForUpdatesStarted()
{
Program.Invoke(Program.MainWindow, () =>
{
StartCheckForUpdates(); //call this before setting CheckForUpdatesInProgress
CheckForUpdatesInProgress = true;
});
}
private void Updates_RestoreDismissedUpdatesStarted()
{
Program.Invoke(Program.MainWindow, () =>
{
StartCheckForUpdates(); //call this before setting CheckForUpdatesInProgress
CheckForUpdatesInProgress = true;
});
}
private void CheckForUpdates_CheckForUpdatesCompleted(bool succeeded, string errorMessage)
{
Program.Invoke(Program.MainWindow, ()=>
{
CheckForUpdatesInProgress = false;
FinishCheckForUpdates(); //call this after setting CheckForUpdatesInProgress
});
}
private void StartCheckForUpdates()
{
if (CheckForUpdatesInProgress || _backgroundWorker.IsBusy)
return;
dataGridViewPatches.Rows.Clear();
tableLayoutPanelSpinner.Visible = true;
RestoreDismUpdatesButton.Enabled = false;
RefreshListButton.Enabled = false;
OnPageUpdated();
}
private void FinishCheckForUpdates()
{
if (CheckForUpdatesInProgress || _backgroundWorker.IsBusy)
return;
tableLayoutPanelSpinner.Visible = false;
PopulatePatchesBox();
RefreshListButton.Enabled = true;
RestoreDismUpdatesButton.Enabled = true;
OnPageUpdated();
}
public override string Text => Messages.PATCHINGWIZARD_SELECTPATCHPAGE_TEXT;
@ -148,157 +63,72 @@ namespace XenAdmin.Wizards.PatchingWizard
public override string HelpID => "SelectUpdate";
protected override void PageLoadedCore(PageLoadedDirection direction)
{
RegisterEvents();
if (direction == PageLoadedDirection.Forward)
{
//if any connected host is licensed for automated updates
bool automatedUpdatesPossible =
ConnectionsManager.XenConnectionsCopy.Any(
c => c != null && c.Cache.Hosts.Any(h => !Host.RestrictBatchHotfixApply(h)));
labelWithAutomatedUpdates.Visible =
automatedUpdatesOptionLabel.Visible = AutomatedUpdatesRadioButton.Visible = automatedUpdatesPossible;
labelWithoutAutomatedUpdates.Visible = !automatedUpdatesPossible;
if (firstLoad)
{
if (automatedUpdatesPossible && UpdateAlertFromWeb == null)
AutomatedUpdatesRadioButton.Checked = true;
else if (!string.IsNullOrEmpty(FilePath))
selectFromDiskRadioButton.Checked = true;
else
downloadUpdateRadioButton.Checked = true;
}
else if (!automatedUpdatesPossible && AutomatedUpdatesRadioButton.Checked)
{
downloadUpdateRadioButton.Checked = true;
}
StartCheckForUpdates(); //call this before starting the _backgroundWorker
_backgroundWorker.RunWorkerAsync();
}
firstLoad = false;
}
private bool IsInAutomatedUpdatesMode =>
AutomatedUpdatesRadioButton.Visible && AutomatedUpdatesRadioButton.Checked;
public WizardMode WizardMode
{
get
{
if (AutomatedUpdatesRadioButton.Visible && AutomatedUpdatesRadioButton.Checked)
return WizardMode.AutomatedUpdates;
var updateAlert = downloadUpdateRadioButton.Checked
? UpdateAlertFromWeb
: selectFromDiskRadioButton.Checked
? AlertFromFileOnDisk
: null;
if (updateAlert != null && updateAlert.NewServerVersion != null)
return WizardMode.NewVersion;
return WizardMode.SingleUpdate;
}
}
public KeyValuePair<XenServerPatch, string> PatchFromDisk { get; private set; }
protected override void PageLeaveCore(PageLoadedDirection direction, ref bool cancel)
{
if (direction == PageLoadedDirection.Forward)
{
if (IsInAutomatedUpdatesMode)
{
var succeed = Updates.CheckForUpdatesSync(this.Parent);
cancel = !succeed;
}
else if (downloadUpdateRadioButton.Checked)
{
UpdateAlertFromWeb = dataGridViewPatches.SelectedRows.Count > 0
? ((PatchGridViewRow) dataGridViewPatches.SelectedRows[0]).UpdateAlert
: null;
SelectedPatchFilePath = null;
var distinctHosts = UpdateAlertFromWeb != null ? UpdateAlertFromWeb.DistinctHosts : null;
SelectedUpdateType = distinctHosts != null && distinctHosts.Any(Helpers.ElyOrGreater)
? UpdateType.ISO
: UpdateType.Legacy;
if (!WizardHelpers.IsValidFile(FilePath, out var pathFailure))
using (var dlg = new ErrorDialog(pathFailure) {WindowTitle = Messages.UPDATES})
{
cancel = true;
dlg.ShowDialog();
return;
}
AlertFromFileOnDisk = null;
FileFromDiskHasUpdateXml = false;
unzippedUpdateFilePath = null;
SelectedPatchFilePath = null;
PatchFromDisk = new KeyValuePair<XenServerPatch, string>(null, null);
}
else
SelectedPatchFilePath = FilePath;
if (Path.GetExtension(FilePath).ToLowerInvariant().Equals(".zip"))
{
UpdateAlertFromWeb = null;
SelectedPatchFilePath = null;
//check if we are installing the update the user sees in the textbox
if (unzippedUpdateFilePath == null || !File.Exists(unzippedUpdateFilePath) ||
Path.GetFileNameWithoutExtension(unzippedUpdateFilePath) != Path.GetFileNameWithoutExtension(FilePath))
{
unzippedUpdateFilePath = WizardHelpers.ExtractUpdate(FilePath, this);
}
if (!WizardHelpers.IsValidFile(FilePath, out var pathFailure))
using (var dlg = new ErrorDialog(pathFailure) {WindowTitle = Messages.UPDATES})
if (!WizardHelpers.IsValidFile(unzippedUpdateFilePath, out var zipFailure))
{
using (var dlg = new ErrorDialog(zipFailure) {WindowTitle = Messages.UPDATES})
{
cancel = true;
dlg.ShowDialog();
return;
}
SelectedPatchFilePath = FilePath;
if (Path.GetExtension(FilePath).ToLowerInvariant().Equals(".zip"))
{
//check if we are installing the update the user sees in the textbox
if (unzippedUpdateFilePath == null || !File.Exists(unzippedUpdateFilePath) ||
Path.GetFileNameWithoutExtension(unzippedUpdateFilePath) != Path.GetFileNameWithoutExtension(FilePath))
{
unzippedUpdateFilePath = WizardHelpers.ExtractUpdate(FilePath, this);
}
if (!WizardHelpers.IsValidFile(unzippedUpdateFilePath, out var zipFailure))
{
using (var dlg = new ErrorDialog(zipFailure) {WindowTitle = Messages.UPDATES})
{
cancel = true;
dlg.ShowDialog();
return;
}
}
if (!UnzippedUpdateFiles.Contains(unzippedUpdateFilePath))
UnzippedUpdateFiles.Add(unzippedUpdateFilePath);
SelectedPatchFilePath = unzippedUpdateFilePath;
}
else
unzippedUpdateFilePath = null;
if (SelectedPatchFilePath.EndsWith("." + BrandManager.ExtensionUpdate))
SelectedUpdateType = UpdateType.Legacy;
else if (SelectedPatchFilePath.EndsWith("." + InvisibleMessages.ISO_UPDATE))
SelectedUpdateType = UpdateType.ISO;
AlertFromFileOnDisk = GetAlertFromFile(SelectedPatchFilePath, out var hasUpdateXml, out var isUpgradeIso);
if (isUpgradeIso)
{
using (var dlg = new ErrorDialog(Messages.PATCHINGWIZARD_SELECTPATCHPAGE_ERROR_MAINISO))
dlg.ShowDialog(this);
cancel = true;
return;
}
FileFromDiskHasUpdateXml = hasUpdateXml;
PatchFromDisk = AlertFromFileOnDisk == null
? new KeyValuePair<XenServerPatch, string>(null, null)
: new KeyValuePair<XenServerPatch, string>(AlertFromFileOnDisk.Patch, SelectedPatchFilePath);
if (!UnzippedUpdateFiles.Contains(unzippedUpdateFilePath))
UnzippedUpdateFiles.Add(unzippedUpdateFilePath);
SelectedPatchFilePath = unzippedUpdateFilePath;
}
}
else
unzippedUpdateFilePath = null;
if (!cancel) //unsubscribe only if we are really leaving this page
UnRegisterEvents();
if (SelectedPatchFilePath.EndsWith("." + BrandManager.ExtensionUpdate))
SelectedUpdateType = UpdateType.Legacy;
else if (SelectedPatchFilePath.EndsWith("." + InvisibleMessages.ISO_UPDATE))
SelectedUpdateType = UpdateType.ISO;
AlertFromFileOnDisk = GetAlertFromFile(SelectedPatchFilePath, out var hasUpdateXml, out var isUpgradeIso);
if (isUpgradeIso)
{
using (var dlg = new ErrorDialog(Messages.PATCHINGWIZARD_SELECTPATCHPAGE_ERROR_MAINISO))
dlg.ShowDialog(this);
cancel = true;
return;
}
FileFromDiskHasUpdateXml = hasUpdateXml;
PatchFromDisk = AlertFromFileOnDisk == null
? new KeyValuePair<XenServerPatch, string>(null, null)
: new KeyValuePair<XenServerPatch, string>(AlertFromFileOnDisk.Patch, SelectedPatchFilePath);
}
}
private XenServerPatchAlert GetAlertFromFile(string fileName, out bool hasUpdateXml, out bool isUpgradeIso)
@ -365,111 +195,9 @@ namespace XenAdmin.Wizards.PatchingWizard
return uuid != null ? Updates.FindPatchAlertByUuid(uuid.Value) : null;
}
private void PopulatePatchesBox()
{
try
{
var updates = Updates.UpdateAlerts;
if (dataGridViewPatches.SortedColumn != null)
{
if (dataGridViewPatches.SortedColumn.Index == ColumnUpdate.Index)
updates.Sort(Alert.CompareOnTitle);
else if (dataGridViewPatches.SortedColumn.Index == ColumnDate.Index)
updates.Sort(Alert.CompareOnDate);
else if (dataGridViewPatches.SortedColumn.Index == ColumnDescription.Index)
updates.Sort(Alert.CompareOnDescription);
if (dataGridViewPatches.SortOrder == SortOrder.Descending)
updates.Reverse();
}
else
{
updates.Sort(new NewVersionPriorityAlertComparer());
}
dataGridViewPatches.SuspendLayout();
dataGridViewPatches.Rows.Clear();
var rowList = new List<DataGridViewRow>();
foreach (Alert alert in updates)
{
if (!(alert is XenServerPatchAlert patchAlert))
continue;
PatchGridViewRow row = new PatchGridViewRow(patchAlert);
if (!rowList.Contains(row))
{
rowList.Add(row);
if (patchAlert.RequiredXenCenterVersion != null)
{
row.Enabled = false;
row.SetToolTip(string.Format(Messages.UPDATES_WIZARD_NEWER_XENCENTER_REQUIRED,
BrandManager.BrandConsole, patchAlert.RequiredXenCenterVersion.Version));
}
}
}
dataGridViewPatches.Rows.AddRange(rowList.ToArray());
if (UpdateAlertFromWeb != null)
{
var foundRow = dataGridViewPatches.Rows.Cast<PatchGridViewRow>()
.FirstOrDefault(r => r.UpdateAlert.Equals(UpdateAlertFromWeb));
if (foundRow != null)
{
foundRow.Selected = true;
UpdateAlertFromWebSelected?.Invoke();
}
}
}
finally
{
dataGridViewPatches.ResumeLayout();
}
}
public override void PageCancelled(ref bool cancel)
{
UnRegisterEvents();
if (_backgroundWorker.IsBusy)
_backgroundWorker.CancelAsync();
}
public override bool EnableNext()
{
if (CheckForUpdatesInProgress || _backgroundWorker.IsBusy)
return false;
if (IsInAutomatedUpdatesMode)
return true;
if (downloadUpdateRadioButton.Checked)
{
if (dataGridViewPatches.SelectedRows.Count == 1)
{
DataGridViewExRow row = (DataGridViewExRow) dataGridViewPatches.SelectedRows[0];
if (row.Enabled)
{
return true;
}
}
}
else if (selectFromDiskRadioButton.Checked)
{
if (WizardHelpers.IsValidFile(FilePath, out _))
return true;
}
return false;
}
public override bool EnablePrevious()
{
return !CheckForUpdatesInProgress && !_backgroundWorker.IsBusy;
return WizardHelpers.IsValidFile(FilePath, out _);
}
/// <summary>
@ -487,193 +215,19 @@ namespace XenAdmin.Wizards.PatchingWizard
public string SelectedPatchFilePath { get; private set; }
private void _backgroundWorker_DoWork(object sender, System.ComponentModel.DoWorkEventArgs e)
{
Updates.RefreshUpdateAlerts(Updates.UpdateType.ServerPatches);
}
private void _backgroundWorker_RunWorkerCompleted(object sender, System.ComponentModel.RunWorkerCompletedEventArgs e)
{
FinishCheckForUpdates();
}
#region DataGridView
private void dataGridViewPatches_SelectionChanged(object sender, EventArgs e)
{
OnPageUpdated();
}
private void dataGridViewPatches_SortCompare(object sender, DataGridViewSortCompareEventArgs e)
{
Alert alert1 = ((PatchGridViewRow) dataGridViewPatches.Rows[e.RowIndex1]).UpdateAlert;
Alert alert2 = ((PatchGridViewRow) dataGridViewPatches.Rows[e.RowIndex2]).UpdateAlert;
if (e.Column.Index == ColumnDate.Index)
{
e.SortResult = DateTime.Compare(alert1.Timestamp, alert2.Timestamp);
e.Handled = true;
}
}
private void dataGridViewPatches_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
// The click is on a column header
if (e.RowIndex == -1)
{
return;
}
PatchGridViewRow row = dataGridViewPatches.Rows[e.RowIndex] as PatchGridViewRow;
if (row != null && e.ColumnIndex == 3)
{
row.UpdateAlert.FixLinkAction();
}
}
private void dataGridViewPatches_Enter(object sender, EventArgs e)
{
downloadUpdateRadioButton.Checked = true;
OnPageUpdated();
}
private class PatchGridViewRow : DataGridViewExRow, IEquatable<PatchGridViewRow>
{
private readonly DataGridViewTextBoxCell _nameCell = new DataGridViewTextBoxCell();
private readonly DataGridViewTextBoxCell _descriptionCell = new DataGridViewTextBoxCell();
private readonly DataGridViewTextBoxCell _dateCell = new DataGridViewTextBoxCell();
private readonly DataGridViewLinkCell _webPageCell = new DataGridViewLinkCell();
public PatchGridViewRow(XenServerPatchAlert alert)
{
UpdateAlert = alert;
Cells.AddRange(_nameCell, _descriptionCell, _dateCell, _webPageCell);
_nameCell.Value = String.Format(alert.Name);
_descriptionCell.Value = String.Format(alert.Description);
_dateCell.Value = HelpersGUI.DateTimeToString(alert.Timestamp.ToLocalTime(), Messages.DATEFORMAT_DMY,
true);
_webPageCell.Value = Messages.PATCHING_WIZARD_WEBPAGE_CELL;
_webPageCell.ToolTipText = alert.WebPageLabel;
}
public XenServerPatchAlert UpdateAlert { get; }
public bool Equals(PatchGridViewRow other)
{
if (other != null && other.UpdateAlert != null && UpdateAlert != null && UpdateAlert.uuid == other.UpdateAlert.uuid)
return true;
return false;
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object obj)
{
if (obj is PatchGridViewRow row)
return Equals(row);
return false;
}
public void SetToolTip(string toolTip)
{
foreach (var c in Cells)
{
if (c is DataGridViewLinkCell)
continue;
if (c is DataGridViewCell cell)
cell.ToolTipText = toolTip;
}
}
}
#endregion
#region Buttons
private void RestoreDismUpdatesButton_Click(object sender, EventArgs e)
{
dataGridViewPatches.Focus();
Updates.RestoreDismissedUpdates();
}
private void RefreshListButton_Click(object sender, EventArgs e)
{
dataGridViewPatches.Focus();
Updates.CheckForUpdates(true);
}
private void BrowseButton_Click(object sender, EventArgs e)
{
selectFromDiskRadioButton.Checked = true;
var suppPack = WizardHelpers.GetSuppPackFromDisk(this);
if (!string.IsNullOrEmpty(suppPack))
FilePath = suppPack;
OnPageUpdated();
}
#endregion
#region TextBox
private void fileNameTextBox_Enter(object sender, EventArgs e)
{
selectFromDiskRadioButton.Checked = true;
}
private void fileNameTextBox_TextChanged(object sender, EventArgs e)
{
selectFromDiskRadioButton.Checked = true;
OnPageUpdated();
}
#endregion
#region RadioButtons
private void AutomaticRadioButton_CheckedChanged(object sender, EventArgs e)
{
OnPageUpdated();
}
private void downloadUpdateRadioButton_CheckedChanged(object sender, EventArgs e)
{
dataGridViewPatches.HideSelection = !downloadUpdateRadioButton.Checked;
if (downloadUpdateRadioButton.Checked)
dataGridViewPatches.Focus();
OnPageUpdated();
}
private void selectFromDiskRadioButton_CheckedChanged(object sender, EventArgs e)
{
OnPageUpdated();
}
private void AutomaticRadioButton_TabStopChanged(object sender, EventArgs e)
{
if (!AutomatedUpdatesRadioButton.TabStop)
AutomatedUpdatesRadioButton.TabStop = true;
}
private void downloadUpdateRadioButton_TabStopChanged(object sender, EventArgs e)
{
if (!downloadUpdateRadioButton.TabStop)
downloadUpdateRadioButton.TabStop = true;
}
private void selectFromDiskRadioButton_TabStopChanged(object sender, EventArgs e)
{
if (!selectFromDiskRadioButton.TabStop)
selectFromDiskRadioButton.TabStop = true;
}
#endregion
}
public enum UpdateType { Legacy, ISO }

View File

@ -121,281 +121,97 @@
<data name="tableLayoutPanel1.ColumnCount" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="labelWithoutAutomatedUpdates.AutoSize" type="System.Boolean, mscorlib">
<data name="labelOnlySelectFromDisk.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="labelWithoutAutomatedUpdates.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<data name="labelOnlySelectFromDisk.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="labelWithoutAutomatedUpdates.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<data name="labelOnlySelectFromDisk.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="labelWithoutAutomatedUpdates.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 32</value>
</data>
<data name="labelWithoutAutomatedUpdates.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 0, 3, 6</value>
</data>
<data name="labelWithoutAutomatedUpdates.Size" type="System.Drawing.Size, System.Drawing">
<value>595, 13</value>
</data>
<data name="labelWithoutAutomatedUpdates.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="labelWithoutAutomatedUpdates.Text" xml:space="preserve">
<value>Select an update to be downloaded from {0} or browse your computer for an update or supplemental pack file.</value>
</data>
<data name="&gt;&gt;labelWithoutAutomatedUpdates.Name" xml:space="preserve">
<value>labelWithoutAutomatedUpdates</value>
</data>
<data name="&gt;&gt;labelWithoutAutomatedUpdates.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;labelWithoutAutomatedUpdates.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;labelWithoutAutomatedUpdates.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="labelWithAutomatedUpdates.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="labelWithAutomatedUpdates.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="labelWithAutomatedUpdates.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="labelWithAutomatedUpdates.Location" type="System.Drawing.Point, System.Drawing">
<data name="labelOnlySelectFromDisk.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 0</value>
</data>
<data name="labelWithAutomatedUpdates.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 0, 3, 6</value>
<data name="labelOnlySelectFromDisk.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 0, 3, 20</value>
</data>
<data name="labelWithAutomatedUpdates.Size" type="System.Drawing.Size, System.Drawing">
<value>595, 26</value>
<data name="labelOnlySelectFromDisk.Size" type="System.Drawing.Size, System.Drawing">
<value>595, 13</value>
</data>
<data name="labelWithAutomatedUpdates.TabIndex" type="System.Int32, mscorlib">
<data name="labelOnlySelectFromDisk.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="labelWithAutomatedUpdates.Text" xml:space="preserve">
<value>Select Automated Updates, choose an update to be downloaded from {0}, or browse your computer for an update or supplemental pack file.</value>
<data name="labelOnlySelectFromDisk.Text" xml:space="preserve">
<value>Browse your computer for a driver disk update or supplemental pack file.</value>
</data>
<data name="&gt;&gt;labelWithAutomatedUpdates.Name" xml:space="preserve">
<value>labelWithAutomatedUpdates</value>
<data name="&gt;&gt;labelOnlySelectFromDisk.Name" xml:space="preserve">
<value>labelOnlySelectFromDisk</value>
</data>
<data name="&gt;&gt;labelWithAutomatedUpdates.Type" xml:space="preserve">
<data name="&gt;&gt;labelOnlySelectFromDisk.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;labelWithAutomatedUpdates.Parent" xml:space="preserve">
<data name="&gt;&gt;labelOnlySelectFromDisk.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;labelWithAutomatedUpdates.ZOrder" xml:space="preserve">
<data name="&gt;&gt;labelOnlySelectFromDisk.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="fileNameTextBox.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Left, Right</value>
</data>
<data name="fileNameTextBox.Location" type="System.Drawing.Point, System.Drawing">
<value>61, 37</value>
</data>
<data name="fileNameTextBox.Size" type="System.Drawing.Size, System.Drawing">
<value>456, 20</value>
</data>
<data name="fileNameTextBox.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="&gt;&gt;fileNameTextBox.Name" xml:space="preserve">
<value>fileNameTextBox</value>
</data>
<data name="&gt;&gt;fileNameTextBox.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;fileNameTextBox.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;fileNameTextBox.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="AutomatedUpdatesRadioButton.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
<data name="BrowseButton.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Left</value>
</data>
<data name="AutomatedUpdatesRadioButton.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<data name="BrowseButton.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="AutomatedUpdatesRadioButton.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 63</value>
<data name="BrowseButton.Location" type="System.Drawing.Point, System.Drawing">
<value>523, 36</value>
</data>
<data name="AutomatedUpdatesRadioButton.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 12, 3, 3</value>
<data name="BrowseButton.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value>
</data>
<data name="AutomatedUpdatesRadioButton.Size" type="System.Drawing.Size, System.Drawing">
<value>119, 17</value>
</data>
<data name="AutomatedUpdatesRadioButton.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="AutomatedUpdatesRadioButton.Text" xml:space="preserve">
<value>&amp;Automated Updates</value>
</data>
<data name="&gt;&gt;AutomatedUpdatesRadioButton.Name" xml:space="preserve">
<value>AutomatedUpdatesRadioButton</value>
</data>
<data name="&gt;&gt;AutomatedUpdatesRadioButton.Type" xml:space="preserve">
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;AutomatedUpdatesRadioButton.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;AutomatedUpdatesRadioButton.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="automatedUpdatesOptionLabel.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="automatedUpdatesOptionLabel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="automatedUpdatesOptionLabel.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="automatedUpdatesOptionLabel.Location" type="System.Drawing.Point, System.Drawing">
<value>23, 83</value>
</data>
<data name="automatedUpdatesOptionLabel.Size" type="System.Drawing.Size, System.Drawing">
<value>575, 26</value>
</data>
<data name="automatedUpdatesOptionLabel.TabIndex" type="System.Int32, mscorlib">
<data name="BrowseButton.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="automatedUpdatesOptionLabel.Text" xml:space="preserve">
<value>{0} will download and install all released updates on the current version from {1}, usually with only a single reboot at the end.
</value>
<data name="BrowseButton.Text" xml:space="preserve">
<value>&amp;Browse...</value>
</data>
<data name="&gt;&gt;automatedUpdatesOptionLabel.Name" xml:space="preserve">
<value>automatedUpdatesOptionLabel</value>
<data name="&gt;&gt;BrowseButton.Name" xml:space="preserve">
<value>BrowseButton</value>
</data>
<data name="&gt;&gt;automatedUpdatesOptionLabel.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;automatedUpdatesOptionLabel.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;automatedUpdatesOptionLabel.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="downloadUpdateRadioButton.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="downloadUpdateRadioButton.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="downloadUpdateRadioButton.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 121</value>
</data>
<data name="downloadUpdateRadioButton.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 12, 3, 3</value>
</data>
<data name="downloadUpdateRadioButton.Size" type="System.Drawing.Size, System.Drawing">
<value>221, 17</value>
</data>
<data name="downloadUpdateRadioButton.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="downloadUpdateRadioButton.Text" xml:space="preserve">
<value>&amp;Download update or new version from {0}</value>
</data>
<data name="&gt;&gt;downloadUpdateRadioButton.Name" xml:space="preserve">
<value>downloadUpdateRadioButton</value>
</data>
<data name="&gt;&gt;downloadUpdateRadioButton.Type" xml:space="preserve">
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;downloadUpdateRadioButton.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;downloadUpdateRadioButton.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="RefreshListButton.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="RefreshListButton.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="RefreshListButton.Location" type="System.Drawing.Point, System.Drawing">
<value>23, 326</value>
</data>
<data name="RefreshListButton.Size" type="System.Drawing.Size, System.Drawing">
<value>94, 27</value>
</data>
<data name="RefreshListButton.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
</data>
<data name="RefreshListButton.Text" xml:space="preserve">
<value>&amp;Refresh List</value>
</data>
<data name="&gt;&gt;RefreshListButton.Name" xml:space="preserve">
<value>RefreshListButton</value>
</data>
<data name="&gt;&gt;RefreshListButton.Type" xml:space="preserve">
<data name="&gt;&gt;BrowseButton.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;RefreshListButton.Parent" xml:space="preserve">
<data name="&gt;&gt;BrowseButton.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;RefreshListButton.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="RestoreDismUpdatesButton.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="RestoreDismUpdatesButton.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="RestoreDismUpdatesButton.Location" type="System.Drawing.Point, System.Drawing">
<value>123, 326</value>
</data>
<data name="RestoreDismUpdatesButton.Size" type="System.Drawing.Size, System.Drawing">
<value>193, 27</value>
</data>
<data name="RestoreDismUpdatesButton.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
</data>
<data name="RestoreDismUpdatesButton.Text" xml:space="preserve">
<value>Restore Dismissed &amp;Updates</value>
</data>
<data name="&gt;&gt;RestoreDismUpdatesButton.Name" xml:space="preserve">
<value>RestoreDismUpdatesButton</value>
</data>
<data name="&gt;&gt;RestoreDismUpdatesButton.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;RestoreDismUpdatesButton.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;RestoreDismUpdatesButton.ZOrder" xml:space="preserve">
<value>6</value>
</data>
<data name="selectFromDiskRadioButton.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="selectFromDiskRadioButton.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="selectFromDiskRadioButton.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 368</value>
</data>
<data name="selectFromDiskRadioButton.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 12, 3, 3</value>
</data>
<data name="selectFromDiskRadioButton.Size" type="System.Drawing.Size, System.Drawing">
<value>240, 17</value>
</data>
<data name="selectFromDiskRadioButton.TabIndex" type="System.Int32, mscorlib">
<value>8</value>
</data>
<data name="selectFromDiskRadioButton.Text" xml:space="preserve">
<value>&amp;Select update or supplemental pack from disk</value>
</data>
<data name="&gt;&gt;selectFromDiskRadioButton.Name" xml:space="preserve">
<value>selectFromDiskRadioButton</value>
</data>
<data name="&gt;&gt;selectFromDiskRadioButton.Type" xml:space="preserve">
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;selectFromDiskRadioButton.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;selectFromDiskRadioButton.ZOrder" xml:space="preserve">
<value>7</value>
</data>
<data name="tableLayoutPanel2.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="tableLayoutPanel2.AutoSizeMode" type="System.Windows.Forms.AutoSizeMode, System.Windows.Forms">
<value>GrowAndShrink</value>
</data>
<data name="tableLayoutPanel2.ColumnCount" type="System.Int32, mscorlib">
<value>3</value>
<data name="&gt;&gt;BrowseButton.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="label2.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Left</value>
@ -407,13 +223,13 @@
<value>NoControl</value>
</data>
<data name="label2.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 10</value>
<value>3, 41</value>
</data>
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
<value>52, 13</value>
</data>
<data name="label2.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
<value>1</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>&amp;Filename:</value>
@ -428,283 +244,10 @@
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label2.Parent" xml:space="preserve">
<value>tableLayoutPanel2</value>
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;label2.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="fileNameTextBox.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Left, Right</value>
</data>
<data name="fileNameTextBox.Location" type="System.Drawing.Point, System.Drawing">
<value>61, 6</value>
</data>
<data name="fileNameTextBox.Size" type="System.Drawing.Size, System.Drawing">
<value>429, 20</value>
</data>
<data name="fileNameTextBox.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="&gt;&gt;fileNameTextBox.Name" xml:space="preserve">
<value>fileNameTextBox</value>
</data>
<data name="&gt;&gt;fileNameTextBox.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;fileNameTextBox.Parent" xml:space="preserve">
<value>tableLayoutPanel2</value>
</data>
<data name="&gt;&gt;fileNameTextBox.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="BrowseButton.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="BrowseButton.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="BrowseButton.Location" type="System.Drawing.Point, System.Drawing">
<value>496, 3</value>
</data>
<data name="BrowseButton.Size" type="System.Drawing.Size, System.Drawing">
<value>76, 27</value>
</data>
<data name="BrowseButton.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="BrowseButton.Text" xml:space="preserve">
<value>&amp;Browse...</value>
</data>
<data name="&gt;&gt;BrowseButton.Name" xml:space="preserve">
<value>BrowseButton</value>
</data>
<data name="&gt;&gt;BrowseButton.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;BrowseButton.Parent" xml:space="preserve">
<value>tableLayoutPanel2</value>
</data>
<data name="&gt;&gt;BrowseButton.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="tableLayoutPanel2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="tableLayoutPanel2.Location" type="System.Drawing.Point, System.Drawing">
<value>23, 391</value>
</data>
<data name="tableLayoutPanel2.RowCount" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="tableLayoutPanel2.Size" type="System.Drawing.Size, System.Drawing">
<value>575, 33</value>
</data>
<data name="tableLayoutPanel2.TabIndex" type="System.Int32, mscorlib">
<value>9</value>
</data>
<data name="&gt;&gt;tableLayoutPanel2.Name" xml:space="preserve">
<value>tableLayoutPanel2</value>
</data>
<data name="&gt;&gt;tableLayoutPanel2.Type" xml:space="preserve">
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tableLayoutPanel2.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;tableLayoutPanel2.ZOrder" xml:space="preserve">
<value>8</value>
</data>
<data name="tableLayoutPanel2.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="label2" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="fileNameTextBox" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="BrowseButton" Row="0" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,Percent,100,AutoSize,0" /&gt;&lt;Rows Styles="AutoSize,0" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="tableLayoutPanelSpinner.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>None</value>
</data>
<data name="tableLayoutPanelSpinner.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="tableLayoutPanelSpinner.AutoSizeMode" type="System.Windows.Forms.AutoSizeMode, System.Windows.Forms">
<value>GrowAndShrink</value>
</data>
<data name="tableLayoutPanelSpinner.ColumnCount" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="pictureBox1.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 3</value>
</data>
<data name="pictureBox1.Size" type="System.Drawing.Size, System.Drawing">
<value>16, 16</value>
</data>
<data name="pictureBox1.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
<value>AutoSize</value>
</data>
<data name="pictureBox1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;pictureBox1.Name" xml:space="preserve">
<value>pictureBox1</value>
</data>
<data name="&gt;&gt;pictureBox1.Type" xml:space="preserve">
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;pictureBox1.Parent" xml:space="preserve">
<value>tableLayoutPanelSpinner</value>
</data>
<data name="&gt;&gt;pictureBox1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="label1.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Left, Right</value>
</data>
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
<value>25, 4</value>
</data>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>117, 13</value>
</data>
<data name="label1.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>Checking for updates...</value>
</data>
<data name="&gt;&gt;label1.Name" xml:space="preserve">
<value>label1</value>
</data>
<data name="&gt;&gt;label1.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label1.Parent" xml:space="preserve">
<value>tableLayoutPanelSpinner</value>
</data>
<data name="&gt;&gt;label1.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="tableLayoutPanelSpinner.Location" type="System.Drawing.Point, System.Drawing">
<value>178, 75</value>
</data>
<data name="tableLayoutPanelSpinner.RowCount" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="tableLayoutPanelSpinner.Size" type="System.Drawing.Size, System.Drawing">
<value>145, 22</value>
</data>
<data name="tableLayoutPanelSpinner.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="&gt;&gt;tableLayoutPanelSpinner.Name" xml:space="preserve">
<value>tableLayoutPanelSpinner</value>
</data>
<data name="&gt;&gt;tableLayoutPanelSpinner.Type" xml:space="preserve">
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tableLayoutPanelSpinner.Parent" xml:space="preserve">
<value>panel1</value>
</data>
<data name="&gt;&gt;tableLayoutPanelSpinner.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="tableLayoutPanelSpinner.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="pictureBox1" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="label1" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,AutoSize,0" /&gt;&lt;Rows Styles="AutoSize,0" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<metadata name="ColumnUpdate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="ColumnUpdate.HeaderText" xml:space="preserve">
<value>Update</value>
</data>
<data name="ColumnUpdate.MinimumWidth" type="System.Int32, mscorlib">
<value>50</value>
</data>
<data name="ColumnUpdate.Width" type="System.Int32, mscorlib">
<value>67</value>
</data>
<metadata name="ColumnDescription.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="ColumnDescription.HeaderText" xml:space="preserve">
<value>Description</value>
</data>
<data name="ColumnDescription.MinimumWidth" type="System.Int32, mscorlib">
<value>90</value>
</data>
<metadata name="ColumnDate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="ColumnDate.HeaderText" xml:space="preserve">
<value>Date</value>
</data>
<data name="ColumnDate.MinimumWidth" type="System.Int32, mscorlib">
<value>80</value>
</data>
<data name="ColumnDate.Width" type="System.Int32, mscorlib">
<value>80</value>
</data>
<metadata name="webPageColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="webPageColumn.HeaderText" xml:space="preserve">
<value>Web Page</value>
</data>
<data name="webPageColumn.MinimumWidth" type="System.Int32, mscorlib">
<value>110</value>
</data>
<data name="webPageColumn.Width" type="System.Int32, mscorlib">
<value>110</value>
</data>
<data name="dataGridViewPatches.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="dataGridViewPatches.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="dataGridViewPatches.ScrollBars" type="System.Windows.Forms.ScrollBars, System.Windows.Forms">
<value>Vertical</value>
</data>
<data name="dataGridViewPatches.Size" type="System.Drawing.Size, System.Drawing">
<value>575, 176</value>
</data>
<data name="dataGridViewPatches.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;dataGridViewPatches.Name" xml:space="preserve">
<value>dataGridViewPatches</value>
</data>
<data name="&gt;&gt;dataGridViewPatches.Type" xml:space="preserve">
<value>XenAdmin.Controls.DataGridViewEx.DataGridViewEx, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;dataGridViewPatches.Parent" xml:space="preserve">
<value>panel1</value>
</data>
<data name="&gt;&gt;dataGridViewPatches.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="panel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="panel1.Location" type="System.Drawing.Point, System.Drawing">
<value>23, 144</value>
</data>
<data name="panel1.Size" type="System.Drawing.Size, System.Drawing">
<value>575, 176</value>
</data>
<data name="panel1.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
</data>
<data name="&gt;&gt;panel1.Name" xml:space="preserve">
<value>panel1</value>
</data>
<data name="&gt;&gt;panel1.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;panel1.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;panel1.ZOrder" xml:space="preserve">
<value>9</value>
<value>3</value>
</data>
<data name="tableLayoutPanel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
@ -713,7 +256,7 @@
<value>0, 0</value>
</data>
<data name="tableLayoutPanel1.RowCount" type="System.Int32, mscorlib">
<value>9</value>
<value>3</value>
</data>
<data name="tableLayoutPanel1.Size" type="System.Drawing.Size, System.Drawing">
<value>601, 427</value>
@ -734,11 +277,8 @@
<value>0</value>
</data>
<data name="tableLayoutPanel1.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="labelWithoutAutomatedUpdates" Row="1" RowSpan="1" Column="0" ColumnSpan="3" /&gt;&lt;Control Name="labelWithAutomatedUpdates" Row="0" RowSpan="1" Column="0" ColumnSpan="3" /&gt;&lt;Control Name="AutomatedUpdatesRadioButton" Row="2" RowSpan="1" Column="0" ColumnSpan="3" /&gt;&lt;Control Name="automatedUpdatesOptionLabel" Row="3" RowSpan="1" Column="1" ColumnSpan="2" /&gt;&lt;Control Name="downloadUpdateRadioButton" Row="4" RowSpan="1" Column="0" ColumnSpan="3" /&gt;&lt;Control Name="RefreshListButton" Row="6" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="RestoreDismUpdatesButton" Row="6" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="selectFromDiskRadioButton" Row="7" RowSpan="1" Column="0" ColumnSpan="3" /&gt;&lt;Control Name="tableLayoutPanel2" Row="8" RowSpan="1" Column="1" ColumnSpan="2" /&gt;&lt;Control Name="panel1" Row="5" RowSpan="1" Column="1" ColumnSpan="2" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Absolute,20,AutoSize,0,Percent,100,Absolute,20" /&gt;&lt;Rows Styles="AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,Percent,100,AutoSize,0,AutoSize,0,AutoSize,0" /&gt;&lt;/TableLayoutSettings&gt;</value>
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="labelOnlySelectFromDisk" Row="0" RowSpan="1" Column="0" ColumnSpan="3" /&gt;&lt;Control Name="fileNameTextBox" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="BrowseButton" Row="1" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="label2" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,Percent,100,AutoSize,0" /&gt;&lt;Rows Styles="AutoSize,0,AutoSize,0,Percent,100" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<metadata name="_backgroundWorker.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
@ -748,40 +288,10 @@
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
<value>601, 427</value>
</data>
<data name="&gt;&gt;ColumnUpdate.Name" xml:space="preserve">
<value>ColumnUpdate</value>
</data>
<data name="&gt;&gt;ColumnUpdate.Type" xml:space="preserve">
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;ColumnDescription.Name" xml:space="preserve">
<value>ColumnDescription</value>
</data>
<data name="&gt;&gt;ColumnDescription.Type" xml:space="preserve">
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;ColumnDate.Name" xml:space="preserve">
<value>ColumnDate</value>
</data>
<data name="&gt;&gt;ColumnDate.Type" xml:space="preserve">
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;webPageColumn.Name" xml:space="preserve">
<value>webPageColumn</value>
</data>
<data name="&gt;&gt;webPageColumn.Type" xml:space="preserve">
<value>System.Windows.Forms.DataGridViewLinkColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;_backgroundWorker.Name" xml:space="preserve">
<value>_backgroundWorker</value>
</data>
<data name="&gt;&gt;_backgroundWorker.Type" xml:space="preserve">
<value>System.ComponentModel.BackgroundWorker, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>PatchingWizard_SelectPatchPage</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>XenAdmin.Controls.XenTabPage, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
<value>XenAdmin.Controls.XenTabPage, [XenCenter_No_Space]Main, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
</root>

View File

@ -43,7 +43,6 @@ namespace XenAdmin.Wizards.PatchingWizard
this.ColumnName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColumnVersion = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.label1 = new System.Windows.Forms.Label();
this.applyUpdatesCheckBox = new System.Windows.Forms.CheckBox();
this.buttonSelectAll = new System.Windows.Forms.Button();
this.tableLayoutPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridViewHosts)).BeginInit();
@ -55,7 +54,6 @@ namespace XenAdmin.Wizards.PatchingWizard
this.tableLayoutPanel1.Controls.Add(this.buttonClearAll, 1, 2);
this.tableLayoutPanel1.Controls.Add(this.dataGridViewHosts, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.label1, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.applyUpdatesCheckBox, 0, 3);
this.tableLayoutPanel1.Controls.Add(this.buttonSelectAll, 0, 2);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
//
@ -123,16 +121,6 @@ namespace XenAdmin.Wizards.PatchingWizard
resources.ApplyResources(this.label1, "label1");
this.label1.Name = "label1";
//
// applyUpdatesCheckBox
//
resources.ApplyResources(this.applyUpdatesCheckBox, "applyUpdatesCheckBox");
this.applyUpdatesCheckBox.Checked = true;
this.applyUpdatesCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.tableLayoutPanel1.SetColumnSpan(this.applyUpdatesCheckBox, 2);
this.applyUpdatesCheckBox.Name = "applyUpdatesCheckBox";
this.applyUpdatesCheckBox.UseVisualStyleBackColor = true;
this.applyUpdatesCheckBox.CheckedChanged += new System.EventHandler(this.applyUpdatesCheckBox_CheckedChanged);
//
// buttonSelectAll
//
resources.ApplyResources(this.buttonSelectAll, "buttonSelectAll");
@ -147,7 +135,6 @@ namespace XenAdmin.Wizards.PatchingWizard
this.Controls.Add(this.tableLayoutPanel1);
this.Name = "PatchingWizard_SelectServers";
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridViewHosts)).EndInit();
this.ResumeLayout(false);
@ -158,7 +145,6 @@ namespace XenAdmin.Wizards.PatchingWizard
private Button buttonSelectAll;
private Button buttonClearAll;
private TableLayoutPanel tableLayoutPanel1;
private CheckBox applyUpdatesCheckBox;
private PatchingWizard_SelectServers.PatchingHostsDataGridView dataGridViewHosts;
private DataGridViewCheckBoxColumn ColumnPoolCheckBox;
private DataGridViewImageColumn ColumnExpander;

View File

@ -38,7 +38,6 @@ using XenAdmin.Controls.DataGridViewEx;
using XenAdmin.Core;
using XenAdmin.Dialogs;
using XenAdmin.Network;
using XenAdmin.Properties;
using XenAPI;
using XenAdmin.Alerts;
using System.Linq;
@ -58,7 +57,6 @@ namespace XenAdmin.Wizards.PatchingWizard
private bool poolSelectionOnly;
public XenServerPatchAlert UpdateAlertFromWeb { private get; set; }
public XenServerPatchAlert AlertFromFileOnDisk { private get; set; }
public bool FileFromDiskHasUpdateXml { private get; set; }
public WizardMode WizardMode { private get; set; }
@ -69,30 +67,15 @@ namespace XenAdmin.Wizards.PatchingWizard
dataGridViewHosts.CheckBoxClicked += dataGridViewHosts_CheckBoxClicked;
}
public override string Text
{
get
{
return Messages.PATCHINGWIZARD_SELECTSERVERPAGE_TEXT;
}
}
public override string Text => Messages.PATCHINGWIZARD_SELECTSERVERPAGE_TEXT;
public override string PageTitle
{
get
{
return Messages.PATCHINGWIZARD_SELECTSERVERPAGE_TITLE;
}
}
public override string PageTitle => Messages.PATCHINGWIZARD_SELECTSERVERPAGE_TITLE;
public override string HelpID
{
get { return "SelectServers"; }
}
public override string HelpID => "SelectServers";
protected override void PageLoadedCore(PageLoadedDirection direction)
{
poolSelectionOnly = WizardMode == WizardMode.AutomatedUpdates || UpdateAlertFromWeb != null || AlertFromFileOnDisk != null;
poolSelectionOnly = WizardMode == WizardMode.AutomatedUpdates || AlertFromFileOnDisk != null;
switch (WizardMode)
{
@ -128,18 +111,6 @@ namespace XenAdmin.Wizards.PatchingWizard
}
}
if (WizardMode == WizardMode.NewVersion && licensedPoolCount > 0)
{
applyUpdatesCheckBox.Visible = true;
applyUpdatesCheckBox.Text = poolCount == licensedPoolCount
? Messages.PATCHINGWIZARD_SELECTSERVERPAGE_APPLY_UPDATES
: Messages.PATCHINGWIZARD_SELECTSERVERPAGE_APPLY_UPDATES_MIXED;
}
else
{
applyUpdatesCheckBox.Visible = false;
}
dataGridViewHosts.Rows.Clear();
foreach (IXenConnection xenConnection in xenConnections)
@ -266,6 +237,12 @@ namespace XenAdmin.Wizards.PatchingWizard
private bool CanEnableRowNonAutomated(Host host, out string tooltipText)
{
tooltipText = null;
if (!Helpers.PostStockholm(host))
{
tooltipText = string.Format(Messages.PATCHINGWIZARD_SELECTSERVERPAGE_VERSION_UNSUPPORTED, BrandManager.BrandConsole);
return false;
}
if (!host.CanApplyHotfixes() && (Helpers.ElyOrGreater(host) || SelectedUpdateType != UpdateType.ISO))
{
@ -300,7 +277,7 @@ namespace XenAdmin.Wizards.PatchingWizard
case UpdateType.ISO:
//from Ely onwards, iso does not mean supplemental pack
if (WizardMode == WizardMode.AutomatedUpdates || UpdateAlertFromWeb != null || AlertFromFileOnDisk != null)
if (WizardMode == WizardMode.AutomatedUpdates || AlertFromFileOnDisk != null)
return IsHostAmongApplicable(host, out tooltipText);
// here a file from disk was selected, but it was not an update (FileFromDiskAlert == null)
@ -327,13 +304,7 @@ namespace XenAdmin.Wizards.PatchingWizard
string patchUuidFromAlert = null;
List<Host> applicableHosts = null;
if (UpdateAlertFromWeb != null)
{
applicableHosts = UpdateAlertFromWeb.DistinctHosts;
if(UpdateAlertFromWeb.Patch != null)
patchUuidFromAlert = UpdateAlertFromWeb.Patch.Uuid;
}
else if (AlertFromFileOnDisk != null)
if (AlertFromFileOnDisk != null)
{
applicableHosts = AlertFromFileOnDisk.DistinctHosts;
if (AlertFromFileOnDisk.Patch != null)
@ -367,9 +338,6 @@ namespace XenAdmin.Wizards.PatchingWizard
{
if (isPatchApplied(patchUuidFromAlert, host))
{
if (ApplyUpdatesToNewVersion)
return CanEnableRowAutomatedUpdates(host, out tooltipText);
tooltipText = Messages.PATCHINGWIZARD_SELECTSERVERPAGE_PATCH_ALREADY_APPLIED;
return false;
}
@ -573,14 +541,6 @@ namespace XenAdmin.Wizards.PatchingWizard
}
}
public bool ApplyUpdatesToNewVersion
{
get
{
return applyUpdatesCheckBox.Visible && applyUpdatesCheckBox.Checked;
}
}
public UpdateType SelectedUpdateType { private get; set; }
private void SelectServers(List<Host> selectedServers)
@ -650,43 +610,6 @@ namespace XenAdmin.Wizards.PatchingWizard
OnPageUpdated();
}
private void applyUpdatesCheckBox_CheckedChanged(object sender, System.EventArgs e)
{
PatchingHostsDataGridViewRow masterRow = null;
foreach (PatchingHostsDataGridViewRow row in dataGridViewHosts.Rows)
{
var host = row.Tag as Host;
if (host != null)
{
string tooltipText;
row.Enabled = CanEnableRow(host, out tooltipText);
row.Cells[3].ToolTipText = tooltipText;
if (row.ParentPoolRow != null)
{
if (row.Enabled)
{
row.ParentPoolRow.Enabled = true;
row.ParentPoolRow.Cells[3].ToolTipText = null;
}
if (masterRow == null)
{
masterRow = row;
if (!row.Enabled)
row.ParentPoolRow.Cells[3].ToolTipText = row.Cells[3].ToolTipText;
}
}
}
else
{
row.Enabled = false;
masterRow = null;//reset the stored masterRow
}
}
}
#region Nested items
private class PatchingHostsDataGridView : CollapsingPoolHostDataGridView

View File

@ -130,7 +130,7 @@
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="buttonClearAll.Location" type="System.Drawing.Point, System.Drawing">
<value>84, 359</value>
<value>84, 379</value>
</data>
<data name="buttonClearAll.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value>
@ -166,7 +166,7 @@
<value>16</value>
</data>
<data name="ColumnPoolCheckBox.Width" type="System.Int32, mscorlib">
<value>5</value>
<value>16</value>
</data>
<metadata name="ColumnExpander.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
@ -178,7 +178,7 @@
<value>16</value>
</data>
<data name="ColumnExpander.Width" type="System.Int32, mscorlib">
<value>5</value>
<value>16</value>
</data>
<metadata name="ColumnPoolIconHostCheck.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
@ -190,7 +190,7 @@
<value>16</value>
</data>
<data name="ColumnPoolIconHostCheck.Width" type="System.Int32, mscorlib">
<value>5</value>
<value>16</value>
</data>
<metadata name="ColumnName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
@ -211,7 +211,7 @@
<value>3, 40</value>
</data>
<data name="dataGridViewHosts.Size" type="System.Drawing.Size, System.Drawing">
<value>602, 313</value>
<value>602, 333</value>
</data>
<data name="dataGridViewHosts.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
@ -220,7 +220,7 @@
<value>dataGridViewHosts</value>
</data>
<data name="&gt;&gt;dataGridViewHosts.Type" xml:space="preserve">
<value>XenAdmin.Wizards.PatchingWizard.PatchingWizard_SelectServers+PatchingHostsDataGridView, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
<value>XenAdmin.Wizards.PatchingWizard.PatchingWizard_SelectServers+PatchingHostsDataGridView, [XenCenter_No_Space]Main, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;dataGridViewHosts.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
@ -238,7 +238,7 @@
<value>602, 37</value>
</data>
<data name="label1.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
<value>0</value>
</data>
<data name="&gt;&gt;label1.Name" xml:space="preserve">
<value>label1</value>
@ -252,33 +252,6 @@
<data name="&gt;&gt;label1.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="applyUpdatesCheckBox.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="applyUpdatesCheckBox.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="applyUpdatesCheckBox.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 388</value>
</data>
<data name="applyUpdatesCheckBox.Size" type="System.Drawing.Size, System.Drawing">
<value>15, 14</value>
</data>
<data name="applyUpdatesCheckBox.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="&gt;&gt;applyUpdatesCheckBox.Name" xml:space="preserve">
<value>applyUpdatesCheckBox</value>
</data>
<data name="&gt;&gt;applyUpdatesCheckBox.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;applyUpdatesCheckBox.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;applyUpdatesCheckBox.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="buttonSelectAll.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Bottom, Left</value>
</data>
@ -286,7 +259,7 @@
<value>NoControl</value>
</data>
<data name="buttonSelectAll.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 359</value>
<value>3, 379</value>
</data>
<data name="buttonSelectAll.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value>
@ -307,7 +280,7 @@
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;buttonSelectAll.ZOrder" xml:space="preserve">
<value>4</value>
<value>3</value>
</data>
<data name="tableLayoutPanel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
@ -316,13 +289,13 @@
<value>0, 0</value>
</data>
<data name="tableLayoutPanel1.RowCount" type="System.Int32, mscorlib">
<value>4</value>
<value>3</value>
</data>
<data name="tableLayoutPanel1.Size" type="System.Drawing.Size, System.Drawing">
<value>608, 405</value>
</data>
<data name="tableLayoutPanel1.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
<value>0</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Name" xml:space="preserve">
<value>tableLayoutPanel1</value>
@ -337,7 +310,7 @@
<value>0</value>
</data>
<data name="tableLayoutPanel1.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="buttonClearAll" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="dataGridViewHosts" Row="1" RowSpan="1" Column="0" ColumnSpan="2" /&gt;&lt;Control Name="label1" Row="0" RowSpan="1" Column="0" ColumnSpan="2" /&gt;&lt;Control Name="applyUpdatesCheckBox" Row="3" RowSpan="1" Column="0" ColumnSpan="2" /&gt;&lt;Control Name="buttonSelectAll" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,Percent,100" /&gt;&lt;Rows Styles="AutoSize,0,Percent,100,AutoSize,0,AutoSize,0" /&gt;&lt;/TableLayoutSettings&gt;</value>
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="buttonClearAll" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="dataGridViewHosts" Row="1" RowSpan="1" Column="0" ColumnSpan="2" /&gt;&lt;Control Name="label1" Row="0" RowSpan="1" Column="0" ColumnSpan="2" /&gt;&lt;Control Name="buttonSelectAll" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,Percent,100" /&gt;&lt;Rows Styles="AutoSize,0,Percent,100,AutoSize,0,Absolute,20" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
@ -382,6 +355,6 @@
<value>PatchingWizard_SelectServers</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>XenAdmin.Controls.XenTabPage, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
<value>XenAdmin.Controls.XenTabPage, [XenCenter_No_Space]Main, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
</root>

View File

@ -30,8 +30,6 @@
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RollingUpgradeExtrasPage));
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.applyUpdatesCheckBox = new System.Windows.Forms.CheckBox();
this.applyUpdatesLabel = new System.Windows.Forms.Label();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.label5 = new System.Windows.Forms.Label();
this.BrowseButton = new System.Windows.Forms.Button();
@ -46,29 +44,12 @@
// tableLayoutPanel1
//
resources.ApplyResources(this.tableLayoutPanel1, "tableLayoutPanel1");
this.tableLayoutPanel1.Controls.Add(this.applyUpdatesCheckBox, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.applyUpdatesLabel, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.tableLayoutPanel2, 1, 4);
this.tableLayoutPanel1.Controls.Add(this.label6, 0, 5);
this.tableLayoutPanel1.Controls.Add(this.checkBoxInstallSuppPack, 0, 3);
this.tableLayoutPanel1.Controls.Add(this.label4, 0, 2);
this.tableLayoutPanel1.Controls.Add(this.tableLayoutPanel2, 1, 2);
this.tableLayoutPanel1.Controls.Add(this.label6, 0, 3);
this.tableLayoutPanel1.Controls.Add(this.checkBoxInstallSuppPack, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.label4, 0, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
//
// applyUpdatesCheckBox
//
resources.ApplyResources(this.applyUpdatesCheckBox, "applyUpdatesCheckBox");
this.applyUpdatesCheckBox.Checked = true;
this.applyUpdatesCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.tableLayoutPanel1.SetColumnSpan(this.applyUpdatesCheckBox, 2);
this.applyUpdatesCheckBox.Name = "applyUpdatesCheckBox";
this.applyUpdatesCheckBox.UseVisualStyleBackColor = true;
//
// applyUpdatesLabel
//
resources.ApplyResources(this.applyUpdatesLabel, "applyUpdatesLabel");
this.tableLayoutPanel1.SetColumnSpan(this.applyUpdatesLabel, 2);
this.applyUpdatesLabel.Name = "applyUpdatesLabel";
//
// tableLayoutPanel2
//
resources.ApplyResources(this.tableLayoutPanel2, "tableLayoutPanel2");
@ -139,7 +120,5 @@
private System.Windows.Forms.Button BrowseButton;
private System.Windows.Forms.TextBox fileNameTextBox;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label applyUpdatesLabel;
private System.Windows.Forms.CheckBox applyUpdatesCheckBox;
}
}

View File

@ -31,7 +31,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using XenAdmin.Controls;
using XenAdmin.Core;
using XenAPI;
@ -46,7 +45,6 @@ namespace XenAdmin.Wizards.RollingUpgradeWizard
public RollingUpgradeExtrasPage()
{
InitializeComponent();
applyUpdatesLabel.Text = string.Format(applyUpdatesLabel.Text, BrandManager.BrandConsole);
label4.Text = string.Format(label4.Text, BrandManager.BrandConsole, BrandManager.ProductBrand);
}
@ -70,36 +68,6 @@ namespace XenAdmin.Wizards.RollingUpgradeWizard
return true;
}
protected override void PageLoadedCore(PageLoadedDirection direction)
{
var licensedPoolCount = 0;
var poolCount = 0;
foreach (Host master in SelectedMasters)
{
var hosts = master.Connection.Cache.Hosts;
if (hosts.Length == 0)
continue;
poolCount++;
var automatedUpdatesRestricted = hosts.Any(h => Helpers.DundeeOrGreater(h) && Host.RestrictBatchHotfixApply(h)); //if any host is not licensed for automated updates
if (!automatedUpdatesRestricted)
licensedPoolCount++;
}
if (licensedPoolCount > 0) // at least one pool licensed for automated updates
{
applyUpdatesCheckBox.Visible = applyUpdatesLabel.Visible = true;
applyUpdatesCheckBox.Text = poolCount == licensedPoolCount
? Messages.ROLLING_UPGRADE_APPLY_UPDATES
: Messages.ROLLING_UPGRADE_APPLY_UPDATES_MIXED;
}
else // all pools unlicensed
{
applyUpdatesCheckBox.Visible = applyUpdatesLabel.Visible = false;
}
}
protected override void PageLeaveCore(PageLoadedDirection direction, ref bool cancel)
{
if (direction == PageLoadedDirection.Forward && ApplySuppPackAfterUpgrade && !string.IsNullOrEmpty(FilePath))
@ -109,18 +77,14 @@ namespace XenAdmin.Wizards.RollingUpgradeWizard
}
#endregion
public IEnumerable<Host> SelectedMasters { private get; set; }
private string FilePath
{
get { return fileNameTextBox.Text; }
set { fileNameTextBox.Text = value; }
get => fileNameTextBox.Text;
set => fileNameTextBox.Text = value;
}
public bool ApplySuppPackAfterUpgrade => checkBoxInstallSuppPack.Checked;
public bool ApplyUpdatesToNewVersion => applyUpdatesCheckBox.Visible && applyUpdatesCheckBox.Checked;
private void BrowseButton_Click(object sender, EventArgs e)
{
checkBoxInstallSuppPack.Checked = true;

View File

@ -121,73 +121,12 @@
<data name="tableLayoutPanel1.ColumnCount" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="applyUpdatesCheckBox.AutoSize" type="System.Boolean, mscorlib">
<data name="tableLayoutPanel2.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="applyUpdatesCheckBox.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="applyUpdatesCheckBox.Location" type="System.Drawing.Point, System.Drawing">
<value>5, 34</value>
</data>
<data name="applyUpdatesCheckBox.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>5, 3, 3, 20</value>
</data>
<data name="applyUpdatesCheckBox.Size" type="System.Drawing.Size, System.Drawing">
<value>15, 14</value>
</data>
<data name="applyUpdatesCheckBox.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="&gt;&gt;applyUpdatesCheckBox.Name" xml:space="preserve">
<value>applyUpdatesCheckBox</value>
</data>
<data name="&gt;&gt;applyUpdatesCheckBox.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;applyUpdatesCheckBox.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;applyUpdatesCheckBox.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="applyUpdatesLabel.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="applyUpdatesLabel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
</data>
<data name="applyUpdatesLabel.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="applyUpdatesLabel.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 0</value>
</data>
<data name="applyUpdatesLabel.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 0, 3, 5</value>
</data>
<data name="applyUpdatesLabel.Size" type="System.Drawing.Size, System.Drawing">
<value>517, 26</value>
</data>
<data name="applyUpdatesLabel.TabIndex" type="System.Int32, mscorlib">
<value>9</value>
</data>
<data name="applyUpdatesLabel.Text" xml:space="preserve">
<value>Choose whether you want {0} to automatically download and install all the released updates after the selected pools are upgraded. Please note that internet connection is required for this option.</value>
</data>
<data name="&gt;&gt;applyUpdatesLabel.Name" xml:space="preserve">
<value>applyUpdatesLabel</value>
</data>
<data name="&gt;&gt;applyUpdatesLabel.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;applyUpdatesLabel.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;applyUpdatesLabel.ZOrder" xml:space="preserve">
<value>1</value>
<data name="tableLayoutPanel2.AutoSizeMode" type="System.Windows.Forms.AutoSizeMode, System.Windows.Forms">
<value>GrowAndShrink</value>
</data>
<data name="tableLayoutPanel2.ColumnCount" type="System.Int32, mscorlib">
<value>3</value>
@ -198,8 +137,9 @@
<data name="label5.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="label5.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 9</value>
<value>3, 8</value>
</data>
<data name="label5.Size" type="System.Drawing.Size, System.Drawing">
<value>52, 13</value>
@ -210,9 +150,6 @@
<data name="label5.Text" xml:space="preserve">
<value>&amp;Filename:</value>
</data>
<data name="label5.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleLeft</value>
</data>
<data name="&gt;&gt;label5.Name" xml:space="preserve">
<value>label5</value>
</data>
@ -225,6 +162,9 @@
<data name="&gt;&gt;label5.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="BrowseButton.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Left</value>
</data>
<data name="BrowseButton.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
@ -235,7 +175,7 @@
<value>75, 23</value>
</data>
<data name="BrowseButton.TabIndex" type="System.Int32, mscorlib">
<value>8</value>
<value>2</value>
</data>
<data name="BrowseButton.Text" xml:space="preserve">
<value>&amp;Browse...</value>
@ -256,13 +196,13 @@
<value>Left, Right</value>
</data>
<data name="fileNameTextBox.Location" type="System.Drawing.Point, System.Drawing">
<value>61, 6</value>
<value>61, 4</value>
</data>
<data name="fileNameTextBox.Size" type="System.Drawing.Size, System.Drawing">
<value>352, 20</value>
</data>
<data name="fileNameTextBox.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
<value>1</value>
</data>
<data name="&gt;&gt;fileNameTextBox.Name" xml:space="preserve">
<value>fileNameTextBox</value>
@ -280,16 +220,16 @@
<value>Fill</value>
</data>
<data name="tableLayoutPanel2.Location" type="System.Drawing.Point, System.Drawing">
<value>23, 136</value>
<value>23, 80</value>
</data>
<data name="tableLayoutPanel2.RowCount" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="tableLayoutPanel2.Size" type="System.Drawing.Size, System.Drawing">
<value>497, 32</value>
<value>497, 29</value>
</data>
<data name="tableLayoutPanel2.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
<value>2</value>
</data>
<data name="&gt;&gt;tableLayoutPanel2.Name" xml:space="preserve">
<value>tableLayoutPanel2</value>
@ -301,10 +241,10 @@
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;tableLayoutPanel2.ZOrder" xml:space="preserve">
<value>2</value>
<value>0</value>
</data>
<data name="tableLayoutPanel2.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="label5" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="BrowseButton" Row="0" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="fileNameTextBox" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,Percent,100,AutoSize,0" /&gt;&lt;Rows Styles="Percent,100,Absolute,20" /&gt;&lt;/TableLayoutSettings&gt;</value>
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="label5" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="BrowseButton" Row="0" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="fileNameTextBox" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,Percent,100,AutoSize,0" /&gt;&lt;Rows Styles="AutoSize,0" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="label6.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -322,7 +262,7 @@
<value>517, 13</value>
</data>
<data name="label6.TabIndex" type="System.Int32, mscorlib">
<value>8</value>
<value>3</value>
</data>
<data name="label6.Text" xml:space="preserve">
<value>Click Run Pre-checks to begin running the upgrade pre-checks.</value>
@ -337,25 +277,25 @@
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;label6.ZOrder" xml:space="preserve">
<value>3</value>
<value>1</value>
</data>
<data name="checkBoxInstallSuppPack.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="checkBoxInstallSuppPack.Location" type="System.Drawing.Point, System.Drawing">
<value>5, 113</value>
<value>3, 57</value>
</data>
<data name="checkBoxInstallSuppPack.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>5, 3, 3, 3</value>
<data name="checkBoxInstallSuppPack.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>5, 0, 0, 0</value>
</data>
<data name="checkBoxInstallSuppPack.Size" type="System.Drawing.Size, System.Drawing">
<value>253, 17</value>
<value>204, 17</value>
</data>
<data name="checkBoxInstallSuppPack.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
<value>1</value>
</data>
<data name="checkBoxInstallSuppPack.Text" xml:space="preserve">
<value>&amp;Install an update or supplemental pack from disk</value>
<value>&amp;Install a supplemental pack from disk</value>
</data>
<data name="&gt;&gt;checkBoxInstallSuppPack.Name" xml:space="preserve">
<value>checkBoxInstallSuppPack</value>
@ -367,25 +307,25 @@
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;checkBoxInstallSuppPack.ZOrder" xml:space="preserve">
<value>4</value>
<value>2</value>
</data>
<data name="label4.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label4.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 68</value>
<value>3, 0</value>
</data>
<data name="label4.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 0, 3, 3</value>
<value>3, 0, 3, 15</value>
</data>
<data name="label4.Size" type="System.Drawing.Size, System.Drawing">
<value>504, 39</value>
<value>516, 39</value>
</data>
<data name="label4.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
<value>0</value>
</data>
<data name="label4.Text" xml:space="preserve">
<value>Choose whether you want {0} to install an update or supplemental pack from disk after the selected pools are upgraded. Please note that installation will fail if a file incompatible with the {1} version you have upgraded to is selected.</value>
<value>Choose whether you want {0} to install a supplemental pack from disk after the selected pools are upgraded. Please note that installation will fail if a file incompatible with the {1} version you have upgraded to is selected.</value>
</data>
<data name="&gt;&gt;label4.Name" xml:space="preserve">
<value>label4</value>
@ -397,7 +337,7 @@
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;label4.ZOrder" xml:space="preserve">
<value>5</value>
<value>3</value>
</data>
<data name="tableLayoutPanel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
@ -406,13 +346,13 @@
<value>0, 0</value>
</data>
<data name="tableLayoutPanel1.RowCount" type="System.Int32, mscorlib">
<value>6</value>
<value>4</value>
</data>
<data name="tableLayoutPanel1.Size" type="System.Drawing.Size, System.Drawing">
<value>523, 380</value>
</data>
<data name="tableLayoutPanel1.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
<value>0</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Name" xml:space="preserve">
<value>tableLayoutPanel1</value>
@ -427,7 +367,7 @@
<value>0</value>
</data>
<data name="tableLayoutPanel1.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="applyUpdatesCheckBox" Row="1" RowSpan="1" Column="0" ColumnSpan="2" /&gt;&lt;Control Name="applyUpdatesLabel" Row="0" RowSpan="1" Column="0" ColumnSpan="2" /&gt;&lt;Control Name="tableLayoutPanel2" Row="4" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="label6" Row="5" RowSpan="1" Column="0" ColumnSpan="2" /&gt;&lt;Control Name="checkBoxInstallSuppPack" Row="3" RowSpan="1" Column="0" ColumnSpan="2" /&gt;&lt;Control Name="label4" Row="2" RowSpan="1" Column="0" ColumnSpan="2" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Absolute,20,Percent,100" /&gt;&lt;Rows Styles="AutoSize,19,AutoSize,20,AutoSize,0,AutoSize,45,AutoSize,0,AutoSize,0" /&gt;&lt;/TableLayoutSettings&gt;</value>
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="tableLayoutPanel2" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="label6" Row="3" RowSpan="1" Column="0" ColumnSpan="2" /&gt;&lt;Control Name="checkBoxInstallSuppPack" Row="1" RowSpan="1" Column="0" ColumnSpan="2" /&gt;&lt;Control Name="label4" Row="0" RowSpan="1" Column="0" ColumnSpan="2" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Absolute,20,Percent,100" /&gt;&lt;Rows Styles="AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,Absolute,20,Absolute,20" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
@ -442,6 +382,6 @@
<value>RollingUpgradeExtrasPage</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>XenAdmin.Controls.XenTabPage, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
<value>XenAdmin.Controls.XenTabPage, [XenCenter_No_Space]Main, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
</root>

View File

@ -149,7 +149,7 @@ namespace XenAdmin.Wizards.RollingUpgradeWizard
protected override void DoAfterInitialPlanActions(UpdateProgressBackgroundWorker bgw, Host host, List<Host> hosts)
{
if (!ApplyUpdatesToNewVersion && !ApplySuppPackAfterUpgrade)
if (!ApplySuppPackAfterUpgrade)
return;
var theHostPlan = bgw.HostPlans.FirstOrDefault(ha => ha.Host.Equals(host));
@ -161,46 +161,6 @@ namespace XenAdmin.Wizards.RollingUpgradeWizard
host = host.Connection.TryResolveWithTimeout(new XenRef<Host>(host.opaque_ref));
if (ApplyUpdatesToNewVersion)
{
var automatedUpdatesRestricted = host.Connection.Cache.Hosts.Any(h => Helpers.DundeeOrGreater(h) && Host.RestrictBatchHotfixApply(h)); //if any host is not licensed for automated updates (only considering DundeeOrGreater hosts)
if (!automatedUpdatesRestricted)
{
if (!MinimalPatches.ContainsKey(bgw))
{
log.InfoFormat("Calculating minimal patches for {0}", host.Name());
Updates.CheckForUpdatesSync(null);
var mp = Updates.GetMinimalPatches(host);
log.InfoFormat("Minimal patches for {0}: {1}", host.Name(),
mp == null ? "None" : string.Join(",", mp.Select(p => p.Name)));
MinimalPatches.Add(bgw, mp);
}
var minimalPatches = MinimalPatches[bgw];
if (minimalPatches != null)
{
if (!AllUploadedPatches.ContainsKey(bgw))
AllUploadedPatches.Add(bgw, new List<XenServerPatch>());
var uploadedPatches = AllUploadedPatches[bgw];
var hp = GetUpdatePlanActionsForHost(host, hosts, minimalPatches, uploadedPatches,
new KeyValuePair<XenServerPatch, string>(), false);
if (hp.UpdatesPlanActions != null && hp.UpdatesPlanActions.Count > 0)
{
theHostPlan.UpdatesPlanActions.AddRange(hp.UpdatesPlanActions);
theHostPlan.DelayedPlanActions.InsertRange(0, hp.DelayedPlanActions);
}
}
}
else
{
log.InfoFormat("Skipping updates installation on {0} because the batch hotfix application is restricted in the pool", host.Name());
}
}
if (ApplySuppPackAfterUpgrade && Helpers.ElyOrGreater(host))
{
var suppPackPlanAction = new RpuUploadAndApplySuppPackPlanAction(host.Connection,

View File

@ -93,7 +93,6 @@ namespace XenAdmin.Wizards.RollingUpgradeWizard
{
var selectedMasters = RollingUpgradeWizardSelectPool.SelectedMasters;
RollingUpgradeWizardPrecheckPage.SelectedMasters = selectedMasters;
RollingUpgradeExtrasPage.SelectedMasters = selectedMasters;
var selectedPools = new List<Pool>();
foreach (var master in selectedMasters)
@ -118,10 +117,6 @@ namespace XenAdmin.Wizards.RollingUpgradeWizard
RollingUpgradeUpgradePage.PrecheckProblemsActuallyResolved = RollingUpgradeWizardPrecheckPage.PrecheckProblemsActuallyResolved;
else if (prevPageType == typeof(RollingUpgradeExtrasPage))
{
var applyUpdatesToNewVersion = RollingUpgradeExtrasPage.ApplyUpdatesToNewVersion;
RollingUpgradeWizardPrecheckPage.ApplyUpdatesToNewVersion = applyUpdatesToNewVersion;
RollingUpgradeUpgradePage.ApplyUpdatesToNewVersion = applyUpdatesToNewVersion;
RollingUpgradeUpgradePage.ApplySuppPackAfterUpgrade = RollingUpgradeExtrasPage.ApplySuppPackAfterUpgrade;
RollingUpgradeUpgradePage.SelectedSuppPackPath = RollingUpgradeExtrasPage.SelectedSuppPack;
}

View File

@ -156,9 +156,7 @@ namespace XenAdmin.Wizards.RollingUpgradeWizard
{
var poolHostsToUpgrade = pool.HostsToUpgrade();
hostsToUpgrade.AddRange(poolHostsToUpgrade);
hostsToUpgradeOrUpdate.AddRange(ApplyUpdatesToNewVersion
? HostsToUpgradeOrUpdate(pool)
: poolHostsToUpgrade);
hostsToUpgradeOrUpdate.AddRange(poolHostsToUpgrade);
}
//XenCenter version check (if any of the selected server version is not the latest)
@ -284,18 +282,6 @@ namespace XenAdmin.Wizards.RollingUpgradeWizard
groups.Add(new CheckGroup(Messages.CHECKING_CLUSTERING_STATUS, gfs2Checks));
}
//Checking automated updates are possible if apply updates checkbox is ticked
if (ApplyUpdatesToNewVersion)
{
var automatedUpdateChecks = (from Host server in SelectedMasters
select new AutomatedUpdatesLicenseCheck(server) as Check).ToList();
automatedUpdateChecks.Add(new CfuAvailabilityCheck());
groups.Add(new CheckGroup(Messages.CHECKING_AUTOMATED_UPDATES_POSSIBLE,
automatedUpdateChecks));
}
return groups;
}

View File

@ -56,7 +56,7 @@ namespace XenAdmin.Wizards
Multiselect = false,
ShowReadOnly = false,
Filter = string.Format(Messages.PATCHINGWIZARD_SELECTPATCHPAGE_UPDATESEXT,
BrandManager.ProductBrand, BrandManager.ExtensionUpdate),
BrandManager.ProductBrand),
FilterIndex = 0,
CheckFileExists = true,
CheckPathExists = true,

View File

@ -96,9 +96,6 @@
<setting name="AllowXenCenterUpdates" serializeAs="String">
<value>True</value>
</setting>
<setting name="AllowPatchesUpdates" serializeAs="String">
<value>True</value>
</setting>
<setting name="AllowXenServerUpdates" serializeAs="String">
<value>False</value>
</setting>

View File

@ -5215,7 +5215,7 @@ namespace XenAdmin {
}
/// <summary>
/// Looks up a localized string similar to Would you like {0} to periodically check the internet for {1} updates and new versions of {0}?.
/// Looks up a localized string similar to Would you like {0} to periodically check the internet for new versions of {0} and {1}?.
/// </summary>
public static string ALLOWED_UPDATES_DIALOG_MESSAGE {
get {
@ -21087,6 +21087,15 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to {0} cannot be used for installing updates on servers running {1} {2}. Please use {3} {2} instead..
/// </summary>
public static string INSTALL_PENDING_UPDATES_DISABLED_REASON {
get {
return ResourceManager.GetString("INSTALL_PENDING_UPDATES_DISABLED_REASON", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Install certificate....
/// </summary>
@ -29276,7 +29285,7 @@ namespace XenAdmin {
}
/// <summary>
/// Looks up a localized string similar to Choose an existing update to install or upload a new one.
/// Looks up a localized string similar to Choose an update to upload and install.
/// </summary>
public static string PATCHINGWIZARD_SELECTPATCHPAGE_TITLE {
get {
@ -29285,7 +29294,7 @@ namespace XenAdmin {
}
/// <summary>
/// Looks up a localized string similar to {0} Updates and Supplemental Packs (*.{1}, *.iso,*.zip)|*.{1};*.iso;*.zip.
/// Looks up a localized string similar to {0} Updates and Supplemental Packs (*.iso,*.zip)|*.iso;*.zip.
/// </summary>
public static string PATCHINGWIZARD_SELECTPATCHPAGE_UPDATESEXT {
get {
@ -29469,6 +29478,15 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to {0} cannot install updates or supplemental packs on this server..
/// </summary>
public static string PATCHINGWIZARD_SELECTSERVERPAGE_VERSION_UNSUPPORTED {
get {
return ResourceManager.GetString("PATCHINGWIZARD_SELECTSERVERPAGE_VERSION_UNSUPPORTED", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The installation of update {0} was not completed successfully on all selected servers. The update process has been paused. Press Retry to resume it..
/// </summary>
@ -32455,24 +32473,6 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to Apply all released &amp;updates on the new version.
/// </summary>
public static string ROLLING_UPGRADE_APPLY_UPDATES {
get {
return ResourceManager.GetString("ROLLING_UPGRADE_APPLY_UPDATES", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Apply all released &amp;updates on the new version (only on pools licensed for automated updates).
/// </summary>
public static string ROLLING_UPGRADE_APPLY_UPDATES_MIXED {
get {
return ResourceManager.GetString("ROLLING_UPGRADE_APPLY_UPDATES_MIXED", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to S&amp;top.
/// </summary>
@ -32575,7 +32575,7 @@ namespace XenAdmin {
}
/// <summary>
/// Looks up a localized string similar to Optionally, apply updates or supplemental packs.
/// Looks up a localized string similar to Optionally, apply supplemental packs.
/// </summary>
public static string ROLLING_UPGRADE_EXTRAS_PAGE_TITLE {
get {

View File

@ -1879,7 +1879,7 @@ Note that if RBAC is enabled, only alerts which you have privileges to dismiss w
<value>Allowed MTU value: {0}</value>
</data>
<data name="ALLOWED_UPDATES_DIALOG_MESSAGE" xml:space="preserve">
<value>Would you like {0} to periodically check the internet for {1} updates and new versions of {0}?</value>
<value>Would you like {0} to periodically check the internet for new versions of {0} and {1}?</value>
</data>
<data name="ALLOWED_UPDATES_DIALOG_CHECKBOX" xml:space="preserve">
<value>&amp;Show internet proxy settings</value>
@ -7345,6 +7345,9 @@ This might result in failure to migrate VMs to this server during the RPU or to
<data name="INSTALL_PENDING_UPDATES" xml:space="preserve">
<value>Install pending &amp;updates...</value>
</data>
<data name="INSTALL_PENDING_UPDATES_DISABLED_REASON" xml:space="preserve">
<value>{0} cannot be used for installing updates on servers running {1} {2}. Please use {3} {2} instead.</value>
</data>
<data name="INSTALL_SERVER_CERTIFICATE_ACTION_LINK" xml:space="preserve">
<value>Install certificate...</value>
</data>
@ -10095,10 +10098,10 @@ This will cancel the update process and may leave your system in an unstable sta
<value>Select Update</value>
</data>
<data name="PATCHINGWIZARD_SELECTPATCHPAGE_TITLE" xml:space="preserve">
<value>Choose an existing update to install or upload a new one</value>
<value>Choose an update to upload and install</value>
</data>
<data name="PATCHINGWIZARD_SELECTPATCHPAGE_UPDATESEXT" xml:space="preserve">
<value>{0} Updates and Supplemental Packs (*.{1}, *.iso,*.zip)|*.{1};*.iso;*.zip</value>
<value>{0} Updates and Supplemental Packs (*.iso,*.zip)|*.iso;*.zip</value>
</data>
<data name="PATCHINGWIZARD_SELECTSERVERPAGE_APPLY_UPDATES" xml:space="preserve">
<value>Also apply all released &amp;updates on the new version</value>
@ -10161,6 +10164,9 @@ Servers where this update cannot be applied appear disabled in this list.</value
<data name="PATCHINGWIZARD_SELECTSERVERPAGE_TITLE" xml:space="preserve">
<value>Select the servers you want to update</value>
</data>
<data name="PATCHINGWIZARD_SELECTSERVERPAGE_VERSION_UNSUPPORTED" xml:space="preserve">
<value>{0} cannot install updates or supplemental packs on this server.</value>
</data>
<data name="PATCHINGWIZARD_SINGLEUPDATE_FAILURE_MANY" xml:space="preserve">
<value>The installation of update {0} was not completed successfully on all selected servers. The update process has been paused. Press Retry to resume it.</value>
</data>
@ -11251,12 +11257,6 @@ Click Server Status Report to open the Compile Server Status Report Wizard or cl
<data name="ROLLING_POOL_UPGRADE_ELLIPSIS" xml:space="preserve">
<value>Rolling Pool &amp;Upgrade...</value>
</data>
<data name="ROLLING_UPGRADE_APPLY_UPDATES" xml:space="preserve">
<value>Apply all released &amp;updates on the new version</value>
</data>
<data name="ROLLING_UPGRADE_APPLY_UPDATES_MIXED" xml:space="preserve">
<value>Apply all released &amp;updates on the new version (only on pools licensed for automated updates)</value>
</data>
<data name="ROLLING_UPGRADE_BUTTON_LABEL_STOP" xml:space="preserve">
<value>S&amp;top</value>
</data>
@ -11293,7 +11293,7 @@ This will cancel the rolling pool upgrade process and may leave your system in a
<value>Upgrade Options</value>
</data>
<data name="ROLLING_UPGRADE_EXTRAS_PAGE_TITLE" xml:space="preserve">
<value>Optionally, apply updates or supplemental packs</value>
<value>Optionally, apply supplemental packs</value>
</data>
<data name="ROLLING_UPGRADE_MODE_PAGE" xml:space="preserve">
<value>Choose the upgrade mode: Automatic or Manual</value>