diff --git a/XenAdmin/Wizards/PatchingWizard/PatchingWizard_AutomatedUpdatesPage.cs b/XenAdmin/Wizards/PatchingWizard/PatchingWizard_AutomatedUpdatesPage.cs index ac80f8203..679c58971 100644 --- a/XenAdmin/Wizards/PatchingWizard/PatchingWizard_AutomatedUpdatesPage.cs +++ b/XenAdmin/Wizards/PatchingWizard/PatchingWizard_AutomatedUpdatesPage.cs @@ -32,7 +32,6 @@ using System; using System.Collections.Generic; using System.ComponentModel; -using System.Drawing; using System.Reflection; using System.Threading; using log4net; @@ -139,8 +138,6 @@ namespace XenAdmin.Wizards.PatchingWizard else if (WizardMode == WizardMode.NewVersion) labelTitle.Text = Messages.PATCHINGWIZARD_UPLOAD_AND_INSTALL_TITLE_NEW_VERSION_AUTOMATED_MODE; - ToggleRetryButton(); - if (!StartUpgradeWorkers()) { _thisPageIsCompleted = true; @@ -470,42 +467,8 @@ namespace XenAdmin.Wizards.PatchingWizard doWorkEventArgs.Result = new Exception(action.Title, e); - failedWorkers.Add(sender as UpdateProgressBackgroundWorker); + failedWorkers.Add(bgw); bgw.ReportProgress(0); - - //this pool failed, we will stop here, but try to remove update files at least - /*try - { - if (action is DownloadPatchPlanAction || action is UploadPatchToMasterPlanAction) - return; - - var pos = 0; - if (action is RemoveUpdateFileFromMasterPlanAction) - pos = bgw.FinalActions.IndexOf(action) + 1; - - for (int i = pos; i < bgw.FinalActions.Count; i++) - { - action = bgw.FinalActions[i]; - - if (bgw.CancellationPending) - { - doWorkEventArgs.Cancel = true; - return; - } - - if (action is RemoveUpdateFileFromMasterPlanAction) - RunPlanAction(bgw, action); - } - } - catch (Exception ex2) - { - //already in an error case - best effort - log.Error("Failed to clean up (this was a best effort attempt)", ex2); - } - finally - { - bgw.ReportProgress(0); - }*/ } } @@ -552,6 +515,7 @@ namespace XenAdmin.Wizards.PatchingWizard ? Messages.PATCHINGWIZARD_AUTOUPDATINGPAGE_ERROR_MANY : Messages.PATCHINGWIZARD_AUTOUPDATINGPAGE_ERROR_ONE; pictureBox1.Image = Images.StaticImages._000_error_h32bit_16; + buttonRetry.Visible = true; } else { @@ -559,12 +523,10 @@ namespace XenAdmin.Wizards.PatchingWizard ? Messages.PATCHINGWIZARD_AUTOUPDATINGPAGE_SUCCESS_MANY : Messages.PATCHINGWIZARD_AUTOUPDATINGPAGE_SUCCESS_ONE; pictureBox1.Image = Images.StaticImages._000_Tick_h32bit_16; + buttonRetry.Visible = false; progressBar.Value = 100; } - - // show the retry button, if needed - ToggleRetryButton(); - + _thisPageIsCompleted = true; _cancelEnabled = false; _nextEnabled = true; @@ -596,7 +558,6 @@ namespace XenAdmin.Wizards.PatchingWizard { _someWorkersFailed = false; panel1.Visible = false; - ToggleRetryButton(); var workers = new List(failedWorkers); failedWorkers.Clear(); @@ -612,14 +573,9 @@ namespace XenAdmin.Wizards.PatchingWizard OnPageUpdated(); } - private void ToggleRetryButton() - { - labelRetry.Visible = buttonRetry.Visible = _someWorkersFailed; - } - #endregion - private void retryButton_Click(object sender, EventArgs e) + private void buttonRetry_Click(object sender, EventArgs e) { RetryFailedActions(); } diff --git a/XenAdmin/Wizards/PatchingWizard/PatchingWizard_AutomatedUpdatesPage.designer.cs b/XenAdmin/Wizards/PatchingWizard/PatchingWizard_AutomatedUpdatesPage.designer.cs index 530a32a1d..882d51b8e 100644 --- a/XenAdmin/Wizards/PatchingWizard/PatchingWizard_AutomatedUpdatesPage.designer.cs +++ b/XenAdmin/Wizards/PatchingWizard/PatchingWizard_AutomatedUpdatesPage.designer.cs @@ -36,7 +36,6 @@ namespace XenAdmin.Wizards.PatchingWizard this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.panel1 = new System.Windows.Forms.TableLayoutPanel(); this.buttonRetry = new System.Windows.Forms.Button(); - this.labelRetry = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.panel1.SuspendLayout(); this.SuspendLayout(); @@ -78,22 +77,14 @@ namespace XenAdmin.Wizards.PatchingWizard this.panel1.Controls.Add(this.pictureBox1, 0, 0); this.panel1.Controls.Add(this.labelError, 1, 0); this.panel1.Controls.Add(this.buttonRetry, 2, 0); - this.panel1.Controls.Add(this.labelRetry, 1, 1); this.panel1.Name = "panel1"; // // buttonRetry // resources.ApplyResources(this.buttonRetry, "buttonRetry"); this.buttonRetry.Name = "buttonRetry"; - this.panel1.SetRowSpan(this.buttonRetry, 2); this.buttonRetry.UseVisualStyleBackColor = true; - this.buttonRetry.Click += new System.EventHandler(this.retryButton_Click); - // - // labelRetry - // - resources.ApplyResources(this.labelRetry, "labelRetry"); - this.labelRetry.BackColor = System.Drawing.SystemColors.Control; - this.labelRetry.Name = "labelRetry"; + this.buttonRetry.Click += new System.EventHandler(this.buttonRetry_Click); // // PatchingWizard_AutomatedUpdatesPage // @@ -121,7 +112,5 @@ namespace XenAdmin.Wizards.PatchingWizard private System.Windows.Forms.PictureBox pictureBox1; private System.Windows.Forms.TableLayoutPanel panel1; private System.Windows.Forms.Button buttonRetry; - private System.Windows.Forms.Label labelRetry; - } } diff --git a/XenAdmin/Wizards/PatchingWizard/PatchingWizard_AutomatedUpdatesPage.resx b/XenAdmin/Wizards/PatchingWizard/PatchingWizard_AutomatedUpdatesPage.resx index 0aa3d664f..fe7c0272c 100644 --- a/XenAdmin/Wizards/PatchingWizard/PatchingWizard_AutomatedUpdatesPage.resx +++ b/XenAdmin/Wizards/PatchingWizard/PatchingWizard_AutomatedUpdatesPage.resx @@ -163,7 +163,7 @@ Both - 502, 222 + 502, 235 1 @@ -220,10 +220,10 @@ NoControl - 25, 4 + 25, 5 - 426, 13 + 402, 13 1 @@ -273,17 +273,20 @@ 3 - - True + + NoControl - 457, 3 + 433, 0 + + + 3, 0, 3, 0 - 51, 23 + 75, 23 - 2 + 0 &Retry @@ -300,50 +303,17 @@ 2 - - Left, Right - - - True - - - NoControl - - - 25, 25 - - - 426, 13 - - - 3 - - - The update process has been paused. Press Retry to resume the update process. - - - labelRetry - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - panel1 - - - 3 - Bottom - 0, 293 + 0, 312 - 2 + 1 - 511, 42 + 511, 23 5 @@ -361,7 +331,7 @@ 0 - <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="pictureBox1" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="labelError" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="buttonRetry" Row="0" RowSpan="2" Column="2" ColumnSpan="1" /><Control Name="labelRetry" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /></Controls><Columns Styles="AutoSize,0,Percent,100,AutoSize,0" /><Rows Styles="Percent,100,Absolute,20" /></TableLayoutSettings> + <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="pictureBox1" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="labelError" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="buttonRetry" Row="0" RowSpan="1" Column="2" ColumnSpan="1" /></Controls><Columns Styles="AutoSize,0,Percent,100,AutoSize,0" /><Rows Styles="Percent,100" /></TableLayoutSettings> True diff --git a/XenModel/Messages.Designer.cs b/XenModel/Messages.Designer.cs index b477ddca7..e5f41bf7a 100755 --- a/XenModel/Messages.Designer.cs +++ b/XenModel/Messages.Designer.cs @@ -27113,7 +27113,7 @@ namespace XenAdmin { } /// - /// Looks up a localized string similar to One or more of the automated updates processes were not completed successfully.. + /// Looks up a localized string similar to One or more of the automated updates processes were not completed successfully. The update process has been paused. Press Retry to resume it.. /// public static string PATCHINGWIZARD_AUTOUPDATINGPAGE_ERROR_MANY { get { @@ -27122,7 +27122,7 @@ namespace XenAdmin { } /// - /// Looks up a localized string similar to The automated updates process was not completed successfuly.. + /// Looks up a localized string similar to The automated updates process was not completed successfuly. The update process has been paused. Press Retry to resume it.. /// public static string PATCHINGWIZARD_AUTOUPDATINGPAGE_ERROR_ONE { get { diff --git a/XenModel/Messages.resx b/XenModel/Messages.resx index 60c8a5a5c..c20cda25a 100755 --- a/XenModel/Messages.resx +++ b/XenModel/Messages.resx @@ -9352,10 +9352,10 @@ However, there is not enough space to perform the repartitioning, so the current Paste - One or more of the automated updates processes were not completed successfully. + One or more of the automated updates processes were not completed successfully. The update process has been paused. Press Retry to resume it. - The automated updates process was not completed successfuly. + The automated updates process was not completed successfuly. The update process has been paused. Press Retry to resume it. The following errors occurred while automated updates were in progress: