diff --git a/XenAdmin/Wizards/BugToolWizard/BugToolPageRetrieveData.Designer.cs b/XenAdmin/Wizards/BugToolWizard/BugToolPageRetrieveData.Designer.cs index a712d7698..dc7421977 100644 --- a/XenAdmin/Wizards/BugToolWizard/BugToolPageRetrieveData.Designer.cs +++ b/XenAdmin/Wizards/BugToolWizard/BugToolPageRetrieveData.Designer.cs @@ -53,19 +53,22 @@ private void InitializeComponent() this.labelBlurb = new System.Windows.Forms.Label(); this.linkLabelBlurb = new System.Windows.Forms.LinkLabel(); this.labelBlurbCis = new System.Windows.Forms.Label(); + this.buttonOpenLocation = new System.Windows.Forms.Button(); + this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); this.tableLayoutPanel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridViewEx1)).BeginInit(); + this.tableLayoutPanel2.SuspendLayout(); this.SuspendLayout(); // // tableLayoutPanel1 // resources.ApplyResources(this.tableLayoutPanel1, "tableLayoutPanel1"); this.tableLayoutPanel1.Controls.Add(this.labelError, 0, 3); - this.tableLayoutPanel1.Controls.Add(this.progressBar1, 0, 4); this.tableLayoutPanel1.Controls.Add(this.dataGridViewEx1, 0, 2); this.tableLayoutPanel1.Controls.Add(this.labelBlurb, 0, 0); this.tableLayoutPanel1.Controls.Add(this.linkLabelBlurb, 1, 1); this.tableLayoutPanel1.Controls.Add(this.labelBlurbCis, 0, 1); + this.tableLayoutPanel1.Controls.Add(this.tableLayoutPanel2, 0, 4); this.tableLayoutPanel1.Name = "tableLayoutPanel1"; // // labelError @@ -77,7 +80,6 @@ private void InitializeComponent() // progressBar1 // resources.ApplyResources(this.progressBar1, "progressBar1"); - this.tableLayoutPanel1.SetColumnSpan(this.progressBar1, 2); this.progressBar1.Name = "progressBar1"; // // dataGridViewEx1 @@ -153,6 +155,21 @@ private void InitializeComponent() resources.ApplyResources(this.labelBlurbCis, "labelBlurbCis"); this.labelBlurbCis.Name = "labelBlurbCis"; // + // buttonOpenLocation + // + resources.ApplyResources(this.buttonOpenLocation, "buttonOpenLocation"); + this.buttonOpenLocation.Name = "buttonOpenLocation"; + this.buttonOpenLocation.UseVisualStyleBackColor = true; + this.buttonOpenLocation.Click += new System.EventHandler(this.buttonOpenLocation_Click); + // + // tableLayoutPanel2 + // + resources.ApplyResources(this.tableLayoutPanel2, "tableLayoutPanel2"); + this.tableLayoutPanel1.SetColumnSpan(this.tableLayoutPanel2, 2); + this.tableLayoutPanel2.Controls.Add(this.buttonOpenLocation, 1, 0); + this.tableLayoutPanel2.Controls.Add(this.progressBar1, 0, 0); + this.tableLayoutPanel2.Name = "tableLayoutPanel2"; + // // BugToolPageRetrieveData // this.Controls.Add(this.tableLayoutPanel1); @@ -162,6 +179,7 @@ private void InitializeComponent() this.tableLayoutPanel1.ResumeLayout(false); this.tableLayoutPanel1.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridViewEx1)).EndInit(); + this.tableLayoutPanel2.ResumeLayout(false); this.ResumeLayout(false); } @@ -179,5 +197,7 @@ private void InitializeComponent() private System.Windows.Forms.Label labelBlurb; private System.Windows.Forms.LinkLabel linkLabelBlurb; private System.Windows.Forms.Label labelBlurbCis; + private System.Windows.Forms.Button buttonOpenLocation; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2; } } diff --git a/XenAdmin/Wizards/BugToolWizard/BugToolPageRetrieveData.cs b/XenAdmin/Wizards/BugToolWizard/BugToolPageRetrieveData.cs index bbfcc31c3..5efb989fa 100644 --- a/XenAdmin/Wizards/BugToolWizard/BugToolPageRetrieveData.cs +++ b/XenAdmin/Wizards/BugToolWizard/BugToolPageRetrieveData.cs @@ -47,7 +47,7 @@ public partial class BugToolPageRetrieveData : XenTabPage private static readonly log4net.ILog Log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private const int MAX_DOWNLOADS_PER_CONNECTION = 3; - public string OutputFile { get; set; } + private bool _packagedReport; public BugToolPageRetrieveData() { @@ -80,6 +80,8 @@ protected override void PageLoadedCore(PageLoadedDirection direction) protected override void PageLeaveCore(PageLoadedDirection direction, ref bool cancel) { _packagedReport = false; + buttonOpenLocation.Visible = false; + if (direction == PageLoadedDirection.Forward) return; @@ -97,7 +99,7 @@ public override void PageCancelled(ref bool cancel) public List SelectedHosts { private get; set; } public List CapabilityList { private get; set; } public string OutputFolder { get; private set; } - private bool _packagedReport; + public string OutputFile { get; set; } #endregion /// @@ -325,10 +327,12 @@ private void Row_RowStatusCompleted(StatusReportRow row) else if (!failureExists) { labelError.Text = Messages.ACTION_SYSTEM_STATUS_COMPILE_SUCCESSFUL; + buttonOpenLocation.Visible = true; } else { labelError.Text = Messages.ACTION_SYSTEM_STATUS_COMPILE_PARTIAL; + buttonOpenLocation.Visible = true; } _packagedReport = false; @@ -397,5 +401,17 @@ private void linkLabelBlurb_LinkClicked(object sender, LinkLabelLinkClickedEvent dlg.ShowDialog(Program.MainWindow); } } + + private void buttonOpenLocation_Click(object sender, EventArgs e) + { + try + { + Process.Start("explorer.exe", $"/select, \"{OutputFile}\""); + } + catch (Exception ex) + { + Log.Debug(ex); + } + } } } diff --git a/XenAdmin/Wizards/BugToolWizard/BugToolPageRetrieveData.resx b/XenAdmin/Wizards/BugToolWizard/BugToolPageRetrieveData.resx index 50f92d84b..3d7f294d4 100644 --- a/XenAdmin/Wizards/BugToolWizard/BugToolPageRetrieveData.resx +++ b/XenAdmin/Wizards/BugToolWizard/BugToolPageRetrieveData.resx @@ -133,7 +133,7 @@ - 3, 407 + 3, 400 677, 13 @@ -141,9 +141,6 @@ 4 - - MiddleLeft - labelError @@ -156,33 +153,6 @@ 0 - - Left, Right - - - NoControl - - - 3, 423 - - - 677, 16 - - - 5 - - - progressBar1 - - - System.Windows.Forms.ProgressBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanel1 - - - 1 - True @@ -254,13 +224,13 @@ Fill - 3, 61 + 3, 56 - 3, 10, 3, 10 + 3, 12, 3, 10 - 677, 336 + 677, 334 3 @@ -269,13 +239,13 @@ dataGridViewEx1 - XenAdmin.Controls.DataGridViewEx.DataGridViewEx, [XenCenter_No_Space], Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + XenAdmin.Controls.DataGridViewEx.DataGridViewEx, [XenCenter], Version=0.0.0.0, Culture=neutral, PublicKeyToken=null tableLayoutPanel1 - 2 + 1 True @@ -308,7 +278,7 @@ tableLayoutPanel1 - 3 + 2 True @@ -338,7 +308,7 @@ tableLayoutPanel1 - 4 + 3 True @@ -368,8 +338,104 @@ tableLayoutPanel1 + 4 + + + True + + + GrowAndShrink + + + 2 + + + 540, 3 + + + 140, 23 + + + 1 + + + &Open report location + + + False + + + buttonOpenLocation + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanel2 + + + 0 + + + Left, Right + + + NoControl + + + 3, 4 + + + 531, 21 + + + 0 + + + progressBar1 + + + System.Windows.Forms.ProgressBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanel2 + + + 1 + + + Fill + + + 0, 413 + + + 0, 0, 0, 0 + + + 1 + + + 683, 29 + + 5 + + tableLayoutPanel2 + + + System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanel1 + + + 5 + + + <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="buttonOpenLocation" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="progressBar1" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="Percent,100,AutoSize,0" /><Rows Styles="AutoSize,0" /></TableLayoutSettings> + Fill @@ -401,7 +467,7 @@ 0 - <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="labelError" Row="3" RowSpan="1" Column="0" ColumnSpan="2" /><Control Name="progressBar1" Row="4" RowSpan="1" Column="0" ColumnSpan="2" /><Control Name="dataGridViewEx1" Row="2" RowSpan="1" Column="0" ColumnSpan="2" /><Control Name="labelBlurb" Row="0" RowSpan="1" Column="0" ColumnSpan="2" /><Control Name="linkLabelBlurb" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="labelBlurbCis" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="AutoSize,0,Percent,100" /><Rows Styles="AutoSize,0,Absolute,20,Percent,100,AutoSize,0,AutoSize,0" /></TableLayoutSettings> + <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="labelError" Row="3" RowSpan="1" Column="0" ColumnSpan="2" /><Control Name="dataGridViewEx1" Row="2" RowSpan="1" Column="0" ColumnSpan="2" /><Control Name="labelBlurb" Row="0" RowSpan="1" Column="0" ColumnSpan="2" /><Control Name="linkLabelBlurb" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="labelBlurbCis" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="tableLayoutPanel2" Row="4" RowSpan="1" Column="0" ColumnSpan="2" /></Controls><Columns Styles="AutoSize,0,Percent,100,Absolute,20" /><Rows Styles="AutoSize,0,AutoSize,0,Percent,100,AutoSize,0,AutoSize,0" /></TableLayoutSettings> True @@ -437,6 +503,6 @@ BugToolPageRetrieveData - XenAdmin.Controls.XenTabPage, [XenCenter_No_Space], Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + XenAdmin.Controls.XenTabPage, [XenCenter], Version=0.0.0.0, Culture=neutral, PublicKeyToken=null \ No newline at end of file