diff --git a/XenAdmin/Commands/ApplyLicenseEditionCommand.cs b/XenAdmin/Commands/ApplyLicenseEditionCommand.cs index 67ef8728c..fb9943388 100644 --- a/XenAdmin/Commands/ApplyLicenseEditionCommand.cs +++ b/XenAdmin/Commands/ApplyLicenseEditionCommand.cs @@ -71,17 +71,25 @@ namespace XenAdmin.Commands protected override void ExecuteCore(SelectedItemCollection selection) { - ApplyLicenseEditionAction action = new ApplyLicenseEditionAction(xos, _edition, _licenseServerAddress, _licenseServerPort, ShowLicensingFailureDialog); + ApplyLicenseEditionAction action = new ApplyLicenseEditionAction(xos, _edition, _licenseServerAddress, _licenseServerPort, null); ActionProgressDialog actionProgress = new ActionProgressDialog(action, ProgressBarStyle.Marquee); // close dialog even when there's an error as this action shows its own error dialog box. - action.Completed += s => Program.Invoke(Program.MainWindow, () => - { - Failure f = action.Exception as Failure; - if (f != null && f.ErrorDescription[0] == Failure.RBAC_PERMISSION_DENIED_FRIENDLY) - return; - actionProgress.Close(); - }); + action.Completed += s => + { + Program.Invoke(Program.MainWindow, () => + { + Failure f = action.Exception as Failure; + if (f != null && f.ErrorDescription[0] == Failure.RBAC_PERMISSION_DENIED_FRIENDLY) + return; + actionProgress.Close(); + }); + + if (action.Exception != null) + { + ShowLicensingFailureDialog(action.LicenseFailures, action.Exception.Message, Parent); + } + }; actionProgress.ShowDialog(Parent); @@ -92,30 +100,35 @@ namespace XenAdmin.Commands } public static void ShowLicensingFailureDialog(List licenseFailures, string exceptionMessage) + { + ShowLicensingFailureDialog(licenseFailures, exceptionMessage, Program.MainWindow); + } + + public static void ShowLicensingFailureDialog(List licenseFailures, string exceptionMessage, Control parent) { Debug.Assert(licenseFailures.Count > 0); - - if (licenseFailures.Count == 1) - { - Program.Invoke(Program.MainWindow, () => new ThreeButtonDialog( - new ThreeButtonDialog.Details(SystemIcons.Error, licenseFailures[0].AlertText, - Messages.LICENSE_ERROR_TITLE), - ThreeButtonDialog.ButtonOK).ShowDialog(Program.MainWindow)); - } - else - { - var failureDic = new Dictionary(); - foreach (var f in licenseFailures) - { - failureDic.Add(new SelectedItem(f.Host), f.AlertText); - } + if (licenseFailures.Count == 1) + { + Program.Invoke(Program.MainWindow, () => new ThreeButtonDialog( + new ThreeButtonDialog.Details(SystemIcons.Error, licenseFailures[0].AlertText, + Messages.LICENSE_ERROR_TITLE), + ThreeButtonDialog.ButtonOK).ShowDialog(parent)); + } + else + { + var failureDic = new Dictionary(); - Program.Invoke(Program.MainWindow, () => new CommandErrorDialog( - Messages.LICENSE_ERROR_TITLE, exceptionMessage, - failureDic).ShowDialog(Program.MainWindow)); - } + foreach (var f in licenseFailures) + { + failureDic.Add(new SelectedItem(f.Host), f.AlertText); + } + + Program.Invoke(Program.MainWindow, () => new CommandErrorDialog( + Messages.LICENSE_ERROR_TITLE, exceptionMessage, + failureDic).ShowDialog(parent)); + } } } } diff --git a/XenAdmin/Commands/SelectionBroadcaster.cs b/XenAdmin/Commands/SelectionBroadcaster.cs index 1eaa3fabf..78196e160 100644 --- a/XenAdmin/Commands/SelectionBroadcaster.cs +++ b/XenAdmin/Commands/SelectionBroadcaster.cs @@ -109,6 +109,9 @@ namespace XenAdmin.Commands /// public event EventHandler SelectionChanged; + public abstract void SaveAndClearSelection(); + public abstract void RestoreSavedSelection(); + #region IDisposable Members /// diff --git a/XenAdmin/Commands/SelectionManager.cs b/XenAdmin/Commands/SelectionManager.cs index 6cd7db7b3..93120b396 100644 --- a/XenAdmin/Commands/SelectionManager.cs +++ b/XenAdmin/Commands/SelectionManager.cs @@ -42,6 +42,8 @@ namespace XenAdmin.Commands internal class SelectionManager : SelectionBroadcaster { private SelectedItemCollection _selection = new SelectedItemCollection(); + private SelectedItemCollection savedSelection = null; + private bool saved = false; /// /// Sets the main selection for XenCenter. @@ -49,19 +51,25 @@ namespace XenAdmin.Commands /// The selection. public void SetSelection(IEnumerable selection) { + Program.AssertOnEventThread(); Util.ThrowIfParameterNull(selection, "selection"); + int count = 0; foreach (SelectedItem item in selection) { if (item == null) - { throw new ArgumentException("Null SelectedItem found.", "selection"); - } + count++; } - _selection = new SelectedItemCollection(selection); - - OnSelectionChanged(EventArgs.Empty); + if (saved && // We have a saved selection: update it instead (CA-147401) + count != 0) // although if the new selection is empty, we're just refreshing the view via RefreshSelection(): don't save that + savedSelection = new SelectedItemCollection(selection); + else + { + _selection = new SelectedItemCollection(selection); + OnSelectionChanged(EventArgs.Empty); + } } /// @@ -86,5 +94,24 @@ namespace XenAdmin.Commands { SetSelection(Selection); } + + public override void SaveAndClearSelection() + { + Program.AssertOnEventThread(); + savedSelection = _selection; + SetSelection(new SelectedItemCollection()); + saved = true; + } + + public override void RestoreSavedSelection() + { + Program.AssertOnEventThread(); + if (saved) + { + saved = false; + SetSelection(savedSelection); + savedSelection = null; + } + } } } diff --git a/XenAdmin/Commands/VMOperationWlbHostCommand.cs b/XenAdmin/Commands/VMOperationWlbHostCommand.cs index 2d9243f5c..0cba14dbd 100644 --- a/XenAdmin/Commands/VMOperationWlbHostCommand.cs +++ b/XenAdmin/Commands/VMOperationWlbHostCommand.cs @@ -57,7 +57,9 @@ namespace XenAdmin.Commands _host = host; _menuText = _host.Name.EscapeAmpersands(); - _secondImage = Resources._000_host_0_star; + + //Default or failure case, there is no score/star rating actually, just don't display star + _secondImage = null; _menuImage = Resources._000_ServerDisconnected_h32bit_16; _recommendation = recommendation; diff --git a/XenAdmin/ConsoleView/VNCTabView.cs b/XenAdmin/ConsoleView/VNCTabView.cs index 4e02bafa9..948bc0e80 100644 --- a/XenAdmin/ConsoleView/VNCTabView.cs +++ b/XenAdmin/ConsoleView/VNCTabView.cs @@ -60,6 +60,7 @@ namespace XenAdmin.ConsoleView private readonly VNCView parentVNCView; private readonly VM source; private readonly Host targetHost; + private VM_guest_metrics guestMetrics = null; private Form fullscreenForm = null; private Form fullscreenHint = null; private Size LastDesktopSize; @@ -75,6 +76,8 @@ namespace XenAdmin.ConsoleView internal readonly ConsoleKeyHandler KeyHandler = new ConsoleKeyHandler(); + private bool hasRDP { get { return source != null ? source.HasRDP : false; } } + public VNCTabView(VNCView parent, VM source, string elevatedUsername, string elevatedPassword) { Program.AssertOnEventThread(); @@ -139,7 +142,7 @@ namespace XenAdmin.ConsoleView this.vncScreen = new XSVNCScreen(source, new EventHandler(RDPorVNCResizeHandler), this, elevatedUsername, elevatedPassword); ShowGpuWarningIfRequired(); - if (source.is_control_domain) + if (source.is_control_domain || source.IsHVM && !hasRDP) //Linux HVM guests should only have one console: the console switch button vanishes altogether. { toggleConsoleButton.Visible = false; } @@ -250,6 +253,9 @@ namespace XenAdmin.ConsoleView source.PropertyChanged -= new PropertyChangedEventHandler(Server_PropertyChanged); source.Connection.Cache.DeregisterCollectionChanged(VM_CollectionChangedWithInvoke); + if (this.guestMetrics != null) + this.guestMetrics.PropertyChanged -= guestMetrics_PropertyChanged; + if (source.is_control_domain) { Host host = source.Connection.Resolve(source.resident_on); @@ -468,6 +474,21 @@ namespace XenAdmin.ConsoleView //The CD device may have changed Program.Invoke(this, setupCD); } + else if (e.PropertyName == "guest_metrics") + { + var newGuestMetrics = source.Connection.Resolve(source.guest_metrics); + + //unsubscribing from the previous instance's event + if (this.guestMetrics != null) + this.guestMetrics.PropertyChanged -= guestMetrics_PropertyChanged; + + this.guestMetrics = newGuestMetrics; + if (this.guestMetrics != null) + guestMetrics.PropertyChanged += guestMetrics_PropertyChanged; + + EnableRDPIfCapable(); + } + if (source.is_control_domain && e.PropertyName == "name_label") { HostLabel.Text = string.Format(Messages.CONSOLE_HOST, source.AffinityServerString); @@ -476,6 +497,40 @@ namespace XenAdmin.ConsoleView } } + private void guestMetrics_PropertyChanged(object sender, PropertyChangedEventArgs e) + { + if (e.PropertyName == "other") + { + EnableRDPIfCapable(); + } + } + + private void EnableRDPIfCapable() + { + if (!toggleConsoleButton.Visible && hasRDP) + { + // The toogle button is not visible now, because RDP had not been enabled on the VM when we started the console. + // However, the current guest_metrics indicates that RDP is now supported (HasRDP==true). (eg. XenTools has been installed in the meantime.) + // This means that now we should show and enable the toogle RDP button and start polling (if allowed) RDP as well. + + log.DebugFormat( "'{0}' console: Enabling RDP button, because RDP capability has appeared.", source); + + if (Properties.Settings.Default.EnableRDPPolling) + { + log.DebugFormat("'{0}' console: Starting RDP polling. (RDP polling is enabled in settings.)", source); + toggleConsoleButton.Visible = true; + toggleConsoleButton.Enabled = false; + ThreadPool.QueueUserWorkItem(TryToConnectRDP); + } + else + { + log.DebugFormat("'{0}' console: Not starting polling. (RDP polling is diabled in settings.)", source); + toggleConsoleButton.Visible = true; + toggleConsoleButton.Enabled = true; + } + } + } + private void Server_EnabledPropertyChanged(object sender, PropertyChangedEventArgs e) { if (e.PropertyName != "enabled" || source.is_control_domain) diff --git a/XenAdmin/ConsoleView/XSVNCScreen.cs b/XenAdmin/ConsoleView/XSVNCScreen.cs index 84c331ebc..6b77783cf 100644 --- a/XenAdmin/ConsoleView/XSVNCScreen.cs +++ b/XenAdmin/ConsoleView/XSVNCScreen.cs @@ -86,7 +86,6 @@ namespace XenAdmin.ConsoleView private Timer connectionPoller = null; private VM sourceVM = null; - private bool sourceIsPV = false; private readonly Object hostedConsolesLock = new Object(); private List> hostedConsoles = null; @@ -119,6 +118,8 @@ namespace XenAdmin.ConsoleView [DefaultValue(false)] public bool UserWantsToSwitchProtocol { get; set; } + private bool hasRDP { get { return Source != null ? Source.HasRDP : false; } } + /// /// Whether we have tried to login without providing a password (covers the case where the user /// has configured VNC not to require a login password). If no password is saved, passwordless @@ -286,7 +287,7 @@ namespace XenAdmin.ConsoleView private void PollRDPPort(Object Sender) { - if (!sourceIsPV && !Properties.Settings.Default.EnableRDPPolling) + if (hasRDP && !Properties.Settings.Default.EnableRDPPolling) { if (connectionPoller != null) connectionPoller.Change(Timeout.Infinite, Timeout.Infinite); @@ -537,7 +538,7 @@ namespace XenAdmin.ConsoleView if (RemoteConsole != null && RemoteConsole.ConsoleControl != null) { RemoteConsole.KeyHandler = this.KeyHandler; - RemoteConsole.SendScanCodes = !this.sourceIsPV; + RemoteConsole.SendScanCodes = hasRDP; RemoteConsole.Scaling = Scaling; RemoteConsole.DisplayBorder = this.displayFocusRectangle; SetKeyboardAndMouseCapture(autoCaptureKeyboardAndMouse); @@ -653,9 +654,7 @@ namespace XenAdmin.ConsoleView if (value != null) { value.PropertyChanged += new PropertyChangedEventHandler(VM_PropertyChanged); - - sourceIsPV = !value.IsHVM; - + startPolling(); lock (hostedConsolesLock) @@ -692,10 +691,14 @@ namespace XenAdmin.ConsoleView //Start the polling again if (Source != null && !Source.is_control_domain) { - connectionPoller = - new Timer( - sourceIsPV ? (TimerCallback)PollVNCPort : (TimerCallback)PollRDPPort, - null, RETRY_SLEEP_TIME, RDP_POLL_INTERVAL); + if (!Source.IsHVM) + { + connectionPoller = new Timer(PollVNCPort, null, RETRY_SLEEP_TIME, RDP_POLL_INTERVAL); + } + else if (hasRDP) + { + connectionPoller = new Timer(PollRDPPort, null, RETRY_SLEEP_TIME, RDP_POLL_INTERVAL); + } } } @@ -1006,7 +1009,7 @@ namespace XenAdmin.ConsoleView } else { - v.SendScanCodes = UseSource && !sourceIsPV; + v.SendScanCodes = UseSource && hasRDP; v.SourceVM = sourceVM; v.Console = console; v.connect(stream, this.vncPassword); diff --git a/XenAdmin/Controls/MainWindowControls/NavigationPane.cs b/XenAdmin/Controls/MainWindowControls/NavigationPane.cs index 076d1700e..c82a19a9a 100644 --- a/XenAdmin/Controls/MainWindowControls/NavigationPane.cs +++ b/XenAdmin/Controls/MainWindowControls/NavigationPane.cs @@ -278,11 +278,15 @@ namespace XenAdmin.Controls.MainWindowControls { if (currentMode == NavigationMode.Notifications) { + SelectionManager.SaveAndClearSelection(); + //restore the last selected view SwitchToNotificationsView(lastNotificationsMode); } else { + SelectionManager.RestoreSavedSelection(); + //show the navigationView first and then hide the notificationsView //to avoid instantaneous appearance of empty panels navigationView.Visible = true; @@ -296,6 +300,7 @@ namespace XenAdmin.Controls.MainWindowControls if (navigationView.SelectionManager.Selection.Count < 1) navigationView.SelectObject(null, false); + navigationView.ForceTreeViewSelectionsChanged(); } if (NavigationModeChanged != null) diff --git a/XenAdmin/Controls/MainWindowControls/NavigationView.cs b/XenAdmin/Controls/MainWindowControls/NavigationView.cs index 7ccfb258a..d14293291 100644 --- a/XenAdmin/Controls/MainWindowControls/NavigationView.cs +++ b/XenAdmin/Controls/MainWindowControls/NavigationView.cs @@ -306,6 +306,11 @@ namespace XenAdmin.Controls.MainWindowControls treeView.Focus(); } + public void ForceTreeViewSelectionsChanged() + { + treeView.ForceSelectionsChanged(); + } + public void RequestRefreshTreeView() { Program.BeginInvoke(this, treeViewUpdateManager.RequestUpdate); diff --git a/XenAdmin/Controls/TreeViews/MultiSelectTreeView.cs b/XenAdmin/Controls/TreeViews/MultiSelectTreeView.cs index ec0fbd26f..6aa205121 100644 --- a/XenAdmin/Controls/TreeViews/MultiSelectTreeView.cs +++ b/XenAdmin/Controls/TreeViews/MultiSelectTreeView.cs @@ -455,7 +455,7 @@ namespace XenAdmin.Controls /// /// Forces the SelectionsChanged event to fire. /// - protected void ForceSelectionsChanged() + public void ForceSelectionsChanged() { EventHandler handler = SelectionsChanged; diff --git a/XenAdmin/Controls/Wlb/WlbReportView.cs b/XenAdmin/Controls/Wlb/WlbReportView.cs index 6a597b0f6..00f351f6e 100644 --- a/XenAdmin/Controls/Wlb/WlbReportView.cs +++ b/XenAdmin/Controls/Wlb/WlbReportView.cs @@ -1052,7 +1052,7 @@ namespace XenAdmin.Controls.Wlb // and this is the first section of report, // change the run button text back to "Run Report", // or disable the run report button and just keep the later report button. - if(btnLaterReport.Visible == true) + if(btnLaterReport.Visible) { this.btnRunReport.Enabled = false; } @@ -1067,12 +1067,17 @@ namespace XenAdmin.Controls.Wlb { this.btnLaterReport.Visible = true; this.btnLaterReport.Enabled = true; + if (!this.btnRunReport.Enabled) + { + this.btnLaterReport.Select(); + } } else if (_currentReportSection == 1 && this.btnRunReport.Text == Messages.FETCH_EARLIER_DATA) { this.btnLaterReport.Visible = true; this.btnLaterReport.Enabled = false; + this.btnRunReport.Select(); } else { @@ -1526,7 +1531,10 @@ namespace XenAdmin.Controls.Wlb private void comboBox_SelectionChanged(object sender, EventArgs e) { - InitializeAuditReport(); + if(_isAuditReport) + { + InitializeAuditReport(); + } } private void InitializeAuditReport() @@ -1537,6 +1545,7 @@ namespace XenAdmin.Controls.Wlb _endLine = _lineLimit; _currentReportSection = 0; btnRunReport.Text = Messages.RUN_REPORT; + btnRunReport.Enabled = true; btnLaterReport.Visible = false; } diff --git a/XenAdmin/Controls/Wlb/WlbReportView.resx b/XenAdmin/Controls/Wlb/WlbReportView.resx index 22a3ba149..c2747c753 100644 --- a/XenAdmin/Controls/Wlb/WlbReportView.resx +++ b/XenAdmin/Controls/Wlb/WlbReportView.resx @@ -304,7 +304,7 @@ NoControl - 7, 7 + 3, 7 61, 13 diff --git a/XenAdmin/Dialogs/AboutDialog.Designer.cs b/XenAdmin/Dialogs/AboutDialog.Designer.cs index 5f7664ddf..e10784eb9 100644 --- a/XenAdmin/Dialogs/AboutDialog.Designer.cs +++ b/XenAdmin/Dialogs/AboutDialog.Designer.cs @@ -33,7 +33,6 @@ namespace XenAdmin.Dialogs this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.VersionLabel = new System.Windows.Forms.Label(); this.OkButton = new System.Windows.Forms.Button(); - this.labelMarathonBlurb = new System.Windows.Forms.Label(); this.linkLabel1 = new System.Windows.Forms.LinkLabel(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); @@ -68,11 +67,6 @@ namespace XenAdmin.Dialogs this.OkButton.UseVisualStyleBackColor = true; this.OkButton.Click += new System.EventHandler(this.OkButton_Click); // - // labelMarathonBlurb - // - resources.ApplyResources(this.labelMarathonBlurb, "labelMarathonBlurb"); - this.labelMarathonBlurb.Name = "labelMarathonBlurb"; - // // linkLabel1 // resources.ApplyResources(this.linkLabel1, "linkLabel1"); @@ -87,7 +81,6 @@ namespace XenAdmin.Dialogs this.tableLayoutPanel1.Controls.Add(this.OkButton, 0, 4); this.tableLayoutPanel1.Controls.Add(this.linkLabel1, 0, 3); this.tableLayoutPanel1.Controls.Add(this.label2, 0, 1); - this.tableLayoutPanel1.Controls.Add(this.labelMarathonBlurb, 0, 2); this.tableLayoutPanel1.Name = "tableLayoutPanel1"; // // AboutDialog @@ -115,7 +108,6 @@ namespace XenAdmin.Dialogs private System.Windows.Forms.PictureBox pictureBox1; private System.Windows.Forms.Label VersionLabel; private System.Windows.Forms.Button OkButton; - private System.Windows.Forms.Label labelMarathonBlurb; private System.Windows.Forms.LinkLabel linkLabel1; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; } diff --git a/XenAdmin/Dialogs/AboutDialog.resx b/XenAdmin/Dialogs/AboutDialog.resx index 499d5cbb3..81dc7dc24 100644 --- a/XenAdmin/Dialogs/AboutDialog.resx +++ b/XenAdmin/Dialogs/AboutDialog.resx @@ -112,23 +112,23 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + True - + Segoe UI, 9pt 14, 46 - + 14, 3, 14, 5 @@ -145,7 +145,7 @@ label2 - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 tableLayoutPanel1 @@ -178,7 +178,7 @@ pictureBox1 - System.Windows.Forms.PictureBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 $this @@ -214,7 +214,7 @@ VersionLabel - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 tableLayoutPanel1 @@ -232,7 +232,7 @@ NoControl - 336, 118 + 336, 95 0, 3, 12, 12 @@ -250,7 +250,7 @@ OkButton - System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 tableLayoutPanel1 @@ -258,38 +258,8 @@ 1 - - True - - - Segoe UI, 9pt - - - 14, 69 - - - 14, 3, 14, 5 - - - 341, 15 - - - 17 - - - Citrix® XenServer™ High Availability is powered by Marathon® - - - labelMarathonBlurb - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanel1 - - - 4 + + Bottom, Left True @@ -298,7 +268,7 @@ Segoe UI, 9pt - 14, 100 + 14, 77 14, 11, 14, 0 @@ -316,7 +286,7 @@ linkLabel1 - System.Windows.Forms.LinkLabel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.LinkLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 tableLayoutPanel1 @@ -330,6 +300,9 @@ True + + GrowAndShrink + 1 @@ -343,7 +316,7 @@ 5 - 423, 153 + 423, 130 19 @@ -352,7 +325,7 @@ tableLayoutPanel1 - System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 $this @@ -361,9 +334,9 @@ 0 - <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="VersionLabel" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="OkButton" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="linkLabel1" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="label2" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="labelMarathonBlurb" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="Percent,100" /><Rows Styles="AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0" /></TableLayoutSettings> + <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="VersionLabel" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="OkButton" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="linkLabel1" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="label2" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="Percent,100" /><Rows Styles="AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0" /></TableLayoutSettings> - + True @@ -372,8 +345,11 @@ True + + GrowAndShrink + - 423, 232 + 423, 208 Tahoma, 8pt diff --git a/XenAdmin/Dialogs/LegalNoticesDialog.resx b/XenAdmin/Dialogs/LegalNoticesDialog.resx index ba107e872..085ad4709 100644 --- a/XenAdmin/Dialogs/LegalNoticesDialog.resx +++ b/XenAdmin/Dialogs/LegalNoticesDialog.resx @@ -112,20 +112,20 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + True - + Segoe UI, 9pt - + NoControl @@ -148,7 +148,7 @@ label2 - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 $this @@ -181,7 +181,7 @@ label1 - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 $this @@ -205,19 +205,19 @@ 5, 5, 5, 5 - 352, 15 + 308, 15 4 - This software includes the following third-party software libraries: + This software includes the following third-party software: label3 - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 $this @@ -244,7 +244,9 @@ 5 - XML-RPC.NET: Copyright © 2001-2006 Charles Cook. + everRun is a registered trademark of Stratus Technologies Bermuda Limited. + +XML-RPC.NET: Copyright © 2001-2006 Charles Cook. Log4Net: Developed by The Apache Software Foundation (http://www.apache.org/) as part of the Apache Logging Services project (http://logging.apache.org/log4net/), and released under the Apache software license. To learn more about the Apache software license, please visit http://www.apache.org/licenses/LICENSE-2.0. @@ -332,7 +334,7 @@ Unless required by applicable law or agreed to in writing, software distributed textBox1 - System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 $this @@ -359,7 +361,7 @@ Unless required by applicable law or agreed to in writing, software distributed button1 - System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 $this @@ -367,7 +369,7 @@ Unless required by applicable law or agreed to in writing, software distributed 0 - + True diff --git a/XenAdmin/Dialogs/LicenseManager/LicenseManager.cs b/XenAdmin/Dialogs/LicenseManager/LicenseManager.cs index 999dd19f2..ad239021f 100644 --- a/XenAdmin/Dialogs/LicenseManager/LicenseManager.cs +++ b/XenAdmin/Dialogs/LicenseManager/LicenseManager.cs @@ -119,25 +119,20 @@ namespace XenAdmin.Dialogs private void checkableDataGridView_RowUpdated(object sender, CheckableDataGridViewRowEventArgs e) { LicenseCheckableDataGridView senderGrid = sender as LicenseCheckableDataGridView; - if (senderGrid == null) + if (senderGrid == null || e.RowIndex >= senderGrid.Rows.Count || e.RowIndex < 0) return; - Program.Invoke(this, delegate - { - if (e.RowIndex >= senderGrid.Rows.Count || e.RowIndex < 0) - return; + LicenseDataGridViewRow lRow = senderGrid.Rows[e.RowIndex] as LicenseDataGridViewRow; + if (lRow == null) + return; - LicenseDataGridViewRow lRow = senderGrid.Rows[e.RowIndex] as LicenseDataGridViewRow; - if (lRow == null) - return; + Controller.SetStatusIcon(e.RowIndex, lRow.RowStatus); - Controller.SetStatusIcon(e.RowIndex, lRow.RowStatus); + if (!e.RefreshGrid && senderGrid.SelectedRows.Count > 0 && senderGrid.SelectedRows[0].Index == e.RowIndex) + { + Controller.SummariseSelectedRow(checkableDataGridView.GetCheckableRow(e.RowIndex)); + } - if (senderGrid.SelectedRows.Count > 0 && senderGrid.SelectedRows[0].Index == e.RowIndex) - { - Controller.SummariseSelectedRow(checkableDataGridView.GetCheckableRow(e.RowIndex)); - } - }); if (e.RefreshGrid) senderGrid.SortAndRefresh(); } diff --git a/XenAdmin/Dialogs/PropertiesDialog.cs b/XenAdmin/Dialogs/PropertiesDialog.cs index bf69c043a..46fefe145 100644 --- a/XenAdmin/Dialogs/PropertiesDialog.cs +++ b/XenAdmin/Dialogs/PropertiesDialog.cs @@ -521,7 +521,7 @@ namespace XenAdmin.Dialogs public void SelectPoolGpuEditPage() { - SelectPage(GpuEditPage); + SelectPage(PoolGpuEditPage); } public void SelectStorageLinkPage() diff --git a/XenAdmin/Dialogs/Wlb/WlbConfigurationDialog.Designer.cs b/XenAdmin/Dialogs/Wlb/WlbConfigurationDialog.Designer.cs index 5fd1d7021..20e2679dd 100644 --- a/XenAdmin/Dialogs/Wlb/WlbConfigurationDialog.Designer.cs +++ b/XenAdmin/Dialogs/Wlb/WlbConfigurationDialog.Designer.cs @@ -60,42 +60,6 @@ namespace XenAdmin.Dialogs.Wlb this.wlbThresholdsPage, this.wlbMetricWeightingPage, this.wlbHostExclusionPage, - this.wlbAdvancedSettingsPage, - this.wlbOptimizationModePage, - this.wlbAutomationPage, - this.wlbThresholdsPage, - this.wlbMetricWeightingPage, - this.wlbHostExclusionPage, - this.wlbAdvancedSettingsPage, - this.wlbOptimizationModePage, - this.wlbAutomationPage, - this.wlbThresholdsPage, - this.wlbMetricWeightingPage, - this.wlbHostExclusionPage, - this.wlbAdvancedSettingsPage, - this.wlbOptimizationModePage, - this.wlbAutomationPage, - this.wlbThresholdsPage, - this.wlbMetricWeightingPage, - this.wlbHostExclusionPage, - this.wlbAdvancedSettingsPage, - this.wlbOptimizationModePage, - this.wlbAutomationPage, - this.wlbThresholdsPage, - this.wlbMetricWeightingPage, - this.wlbHostExclusionPage, - this.wlbAdvancedSettingsPage, - this.wlbOptimizationModePage, - this.wlbAutomationPage, - this.wlbThresholdsPage, - this.wlbMetricWeightingPage, - this.wlbHostExclusionPage, - this.wlbAdvancedSettingsPage, - this.wlbOptimizationModePage, - this.wlbAutomationPage, - this.wlbThresholdsPage, - this.wlbMetricWeightingPage, - this.wlbHostExclusionPage, this.wlbAdvancedSettingsPage}); resources.ApplyResources(this.verticalTabs, "verticalTabs"); // @@ -167,6 +131,7 @@ namespace XenAdmin.Dialogs.Wlb // resources.ApplyResources(this, "$this"); this.Name = "WlbConfigurationDialog"; + this.SizeChanged += new System.EventHandler(this.WlbConfigurationDialog_SizeChanged); this.Controls.SetChildIndex(this.cancelButton, 0); this.Controls.SetChildIndex(this.okButton, 0); this.Controls.SetChildIndex(this.splitContainer, 0); diff --git a/XenAdmin/Dialogs/Wlb/WlbConfigurationDialog.cs b/XenAdmin/Dialogs/Wlb/WlbConfigurationDialog.cs index 389a6a810..a4ed079c2 100644 --- a/XenAdmin/Dialogs/Wlb/WlbConfigurationDialog.cs +++ b/XenAdmin/Dialogs/Wlb/WlbConfigurationDialog.cs @@ -215,5 +215,15 @@ namespace XenAdmin.Dialogs.Wlb } } + private void WlbConfigurationDialog_SizeChanged(object sender, EventArgs e) + { + // When the size of configuration dialog is changed, + // the SplitContainer panels should expand and contract correspondingly. + // Originally the dialog height is 750, SplitContainer height is 674, + // the difference is 76. + // The SplitContainer height must track the change of the dialog height. + splitContainer.Height = this.Height - 76; + } + } } diff --git a/XenAdmin/Dialogs/Wlb/WlbConfigurationDialog.resx b/XenAdmin/Dialogs/Wlb/WlbConfigurationDialog.resx index 78db4771d..4e05816fc 100644 --- a/XenAdmin/Dialogs/Wlb/WlbConfigurationDialog.resx +++ b/XenAdmin/Dialogs/Wlb/WlbConfigurationDialog.resx @@ -331,10 +331,10 @@ 0 - Top, Left + Bottom, Right - 738, 725 + 738, 682 cancelButton @@ -349,10 +349,10 @@ 3 - Top, Left + Bottom, Right - 647, 725 + 647, 682 okButton @@ -535,7 +535,7 @@ 96, 96 - 834, 755 + 834, 712 Tahoma, 8pt diff --git a/XenAdmin/Dialogs/Wlb/WlbConfigurationDialog.zh-CN.resx b/XenAdmin/Dialogs/Wlb/WlbConfigurationDialog.zh-CN.resx index 88136d8b5..bbafc2779 100644 --- a/XenAdmin/Dialogs/Wlb/WlbConfigurationDialog.zh-CN.resx +++ b/XenAdmin/Dialogs/Wlb/WlbConfigurationDialog.zh-CN.resx @@ -331,10 +331,10 @@ 0 - Top, Left + Bottom, Right - 738, 725 + 738, 682 cancelButton @@ -349,10 +349,10 @@ 3 - Top, Left + Bottom, Right - 647, 725 + 647, 682 okButton @@ -535,7 +535,7 @@ 96, 96 - 834, 755 + 834, 712 Tahoma, 8pt diff --git a/XenAdmin/Help/HelpManager.resx b/XenAdmin/Help/HelpManager.resx index 537f30e31..38923a224 100644 --- a/XenAdmin/Help/HelpManager.resx +++ b/XenAdmin/Help/HelpManager.resx @@ -1042,6 +1042,6 @@ 9901 - 9854 + 9857 \ No newline at end of file diff --git a/XenAdmin/Help/WLB.chm b/XenAdmin/Help/WLB.chm index 1807f9823..c47f6df04 100644 Binary files a/XenAdmin/Help/WLB.chm and b/XenAdmin/Help/WLB.chm differ diff --git a/XenAdmin/MainWindow.cs b/XenAdmin/MainWindow.cs index 1b2470784..a1776e787 100644 --- a/XenAdmin/MainWindow.cs +++ b/XenAdmin/MainWindow.cs @@ -434,16 +434,6 @@ namespace XenAdmin { if (meddlingAction == null) SetStatusBar(Properties.Resources._000_error_h32bit_16, action.Exception.Message); - - IXenObject model = - (IXenObject)action.VM ?? - (IXenObject)action.Host ?? - (IXenObject)action.Pool ?? - (IXenObject)action.SR; - if (model != null) - model.InError = true; - - RequestRefreshTreeView(); } else if (meddlingAction == null) { @@ -1747,10 +1737,45 @@ namespace XenAdmin } else if (objectsView != null) { - GroupingTag gt = SelectionManager.Selection.First as GroupingTag - ?? SelectionManager.Selection.GroupAncestor; + //We are in Objects View + GroupingTag gt = null; - SearchPage.Search = Search.SearchForNonVappGroup(gt.Grouping, gt.Parent, gt.Group); + if (SelectionManager.Selection.Count == 1) + { + gt = SelectionManager.Selection.First as GroupingTag + ?? SelectionManager.Selection[0].GroupAncestor; + } + else + { + //If multiple items have been selected we count the number of the grouping tags in the selection + var selectedGroups = SelectionManager.Selection.Where(s => s.GroupingTag != null); + + //if exactly one grouping tag has been selected we show the search view for that one tag, but only if all the other items in the selection belong to this group/tag + if (selectedGroups.Count() == 1) + { + var groupingTag = selectedGroups.First().GroupingTag; + + if (SelectionManager.Selection.Where(s => s.GroupingTag == null).All(s => s.GroupAncestor == groupingTag)) + gt = groupingTag; + else + gt = null; + } + else + { + gt = SelectionManager.Selection.GroupAncestor; + } + } + + //if there has been a grouping tag determined above we use that + //if not we show the search view for the root node + if (gt != null) + { + SearchPage.Search = Search.SearchForNonVappGroup(gt.Grouping, gt.Parent, gt.Group); + } + else + { + SearchPage.Search = Search.SearchForNonVappGroup(rootNodeGrouping.Grouping, rootNodeGrouping.Parent, rootNodeGrouping.Group); + } } else if (foldersView != null) { @@ -1765,7 +1790,19 @@ namespace XenAdmin } else { - SearchPage.XenObject = null; + // Infrastructure View: + // If XenCenter node or a disconnected host is selected, show the default search + // Otherwise, find the top-level parent (= pool or standalone server) and show the search restricted to that + // In the case of multiselect, if all the selections are within one pool (or standalone server), then show that report. + // Otherwise show everything, as on the XenCenter node. + var connection = SelectionManager.Selection.GetConnectionOfAllItems(); // null for cross-pool selection + if (connection != null) + { + var pool = Helpers.GetPool(connection); + SearchPage.XenObject = pool ?? (IXenObject)Helpers.GetMaster(connection); // pool or standalone server + } + else + SearchPage.XenObject = null; } } else if (t == TabPageHA) @@ -2692,12 +2729,7 @@ namespace XenAdmin if (eventsPage.Visible) { - // Unmark node if user has now seen error in log tab - if (SelectionManager.Selection.FirstAsXenObject != null) - SelectionManager.Selection.FirstAsXenObject.InError = false; - eventsPage.RefreshDisplayedEvents(); - RequestRefreshTreeView(); } loggedInLabel1.Connection = null; diff --git a/XenAdmin/MainWindowTreeBuilder.cs b/XenAdmin/MainWindowTreeBuilder.cs index e49746657..c3e498215 100644 --- a/XenAdmin/MainWindowTreeBuilder.cs +++ b/XenAdmin/MainWindowTreeBuilder.cs @@ -501,7 +501,6 @@ namespace XenAdmin _index++; IXenObject xenObject = obj as IXenObject; - bool error = xenObject != null && xenObject.InError; bool highlighted = _highlightedDragTarget != null && obj != null && _highlightedDragTarget.Equals(obj); if (highlighted) @@ -510,12 +509,6 @@ namespace XenAdmin result.ForeColor = SystemColors.HighlightText; result.NodeFont = Program.DefaultFont; } - else if (error) - { - result.BackColor = Program.ErrorBackColor; - result.ForeColor = Program.ErrorForeColor; - result.NodeFont = Program.DefaultFont; - } else if (grayed) { result.BackColor = _treeViewBackColor; diff --git a/XenAdmin/Plugins/PluginDescriptor.cs b/XenAdmin/Plugins/PluginDescriptor.cs index 5ebedb60f..dbf10bc23 100644 --- a/XenAdmin/Plugins/PluginDescriptor.cs +++ b/XenAdmin/Plugins/PluginDescriptor.cs @@ -214,7 +214,12 @@ namespace XenAdmin.Plugins { if (File.Exists(resources)) { - return new ResourceManager(Name, Assembly.LoadFile(resources)); + // We load this "unsafely" because of CA-144950: the plugin is almost certainly + // downloaded from the web and won't install without this. I considered adding + // a confirmation step, but as all we do with the resources is to extract some + // strings, there is no security implication. (This doesn't affect security + // confirmations on programs called by the plugin). + return new ResourceManager(Name, Assembly.UnsafeLoadFrom(resources)); } } catch (Exception e) diff --git a/XenAdmin/SettingsPanels/Wlb/WlbAdvancedSettingsPage.cs b/XenAdmin/SettingsPanels/Wlb/WlbAdvancedSettingsPage.cs index 773c44a38..b283efb1b 100644 --- a/XenAdmin/SettingsPanels/Wlb/WlbAdvancedSettingsPage.cs +++ b/XenAdmin/SettingsPanels/Wlb/WlbAdvancedSettingsPage.cs @@ -269,6 +269,7 @@ namespace XenAdmin.SettingsPanels private void HidePoolAuditTrailGranularitySection() { label2.Visible = false; + label3.Visible = false; sectionHeaderLabelAuditTrail.Visible = false; labelAuditTrail.Visible = false; auditTrailPanel.Visible = false; diff --git a/XenAdmin/SettingsPanels/Wlb/WlbAdvancedSettingsPage.resx b/XenAdmin/SettingsPanels/Wlb/WlbAdvancedSettingsPage.resx index 92a792aab..bc649a863 100644 --- a/XenAdmin/SettingsPanels/Wlb/WlbAdvancedSettingsPage.resx +++ b/XenAdmin/SettingsPanels/Wlb/WlbAdvancedSettingsPage.resx @@ -1615,6 +1615,9 @@ 23 + + Top, Left, Right + Fill diff --git a/XenAdmin/SettingsPanels/Wlb/WlbAdvancedSettingsPage.zh-CN.resx b/XenAdmin/SettingsPanels/Wlb/WlbAdvancedSettingsPage.zh-CN.resx index a5d09b2e6..f6e28ad67 100644 --- a/XenAdmin/SettingsPanels/Wlb/WlbAdvancedSettingsPage.zh-CN.resx +++ b/XenAdmin/SettingsPanels/Wlb/WlbAdvancedSettingsPage.zh-CN.resx @@ -1588,6 +1588,36 @@ 22 + + NoControl + + + 3, 489 + + + 632, 2 + + + 38 + + + label3 + + + label3 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanel1 + + + 23 + + + Top, Left, Right + Fill @@ -1616,7 +1646,7 @@ 0 - <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="labelAuditTrail" Row="21" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="sectionHeaderLabelAuditTrail" Row="20" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="label2" Row="19" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="sectionHeaderLabelRepSub" Row="16" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="sectionHeaderLabelHistData" Row="13" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="sectionHeaderLabelOptAgr" Row="10" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="labelOptAgr" Row="11" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="labelHistData" Row="14" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="sectionHeaderLabelRecSev" Row="7" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="labelRepSub" Row="17" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="sectionHeaderLabelVmMigInt" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="labelVmMigInt" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="label1" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="labelRecSev" Row="8" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="panelVmMigInt" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="sectionHeaderLabelRecCnt" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="labelRecCnt" Row="5" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="panelRecCnt" Row="6" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="panelRecSev" Row="9" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="panelOptAgr" Row="12" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="panelHistData" Row="15" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="panelRepSub" Row="18" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="auditTrailPanel" Row="22" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="Percent,100" /><Rows Styles="AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,Absolute,20" /></TableLayoutSettings> + <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="labelAuditTrail" Row="23" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="sectionHeaderLabelAuditTrail" Row="22" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="label2" Row="21" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="sectionHeaderLabelRepSub" Row="16" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="sectionHeaderLabelHistData" Row="13" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="sectionHeaderLabelOptAgr" Row="10" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="labelOptAgr" Row="11" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="labelHistData" Row="14" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="sectionHeaderLabelRecSev" Row="7" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="labelRepSub" Row="17" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="sectionHeaderLabelVmMigInt" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="labelVmMigInt" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="label1" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="labelRecSev" Row="8" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="panelVmMigInt" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="sectionHeaderLabelRecCnt" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="labelRecCnt" Row="5" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="panelRecCnt" Row="6" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="panelRecSev" Row="9" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="panelOptAgr" Row="12" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="panelHistData" Row="15" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="panelRepSub" Row="18" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="auditTrailPanel" Row="24" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="label3" Row="20" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="Percent,100" /><Rows Styles="AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,Absolute,10,Absolute,10,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0" /></TableLayoutSettings> True diff --git a/XenAdmin/SettingsPanels/Wlb/WlbMetricWeightingPage.cs b/XenAdmin/SettingsPanels/Wlb/WlbMetricWeightingPage.cs index f5d641704..56ec9b336 100644 --- a/XenAdmin/SettingsPanels/Wlb/WlbMetricWeightingPage.cs +++ b/XenAdmin/SettingsPanels/Wlb/WlbMetricWeightingPage.cs @@ -81,6 +81,10 @@ namespace XenAdmin.SettingsPanels trackbarNetWritePriority.Value = GetSafeTrackbarValue(trackbarNetWritePriority, _poolConfiguration.VmNetworkWriteWeightHigh / TRACKBAR_INTERVAL); trackbarDiskReadPriority.Value = GetSafeTrackbarValue(trackbarDiskReadPriority, _poolConfiguration.VmDiskReadWeightHigh / TRACKBAR_INTERVAL); trackbarDiskWritePriority.Value = GetSafeTrackbarValue(trackbarDiskWritePriority, _poolConfiguration.VmDiskWriteWeightHigh / TRACKBAR_INTERVAL); + //CA-134554 - Hide Disk Read/Write until the backend server side is ready + trackbarDiskReadPriority.Visible = false; + trackbarDiskWritePriority.Visible = false; + _loading = false; ; } diff --git a/XenAdmin/SettingsPanels/Wlb/WlbMetricWeightingPage.ja.resx b/XenAdmin/SettingsPanels/Wlb/WlbMetricWeightingPage.ja.resx index 8d873ada1..4834e9118 100644 --- a/XenAdmin/SettingsPanels/Wlb/WlbMetricWeightingPage.ja.resx +++ b/XenAdmin/SettingsPanels/Wlb/WlbMetricWeightingPage.ja.resx @@ -222,6 +222,9 @@ ディスク書き込み(&W) + + False + label11 @@ -255,6 +258,9 @@ ディスク読み取り(&D) + + False + label10 diff --git a/XenAdmin/SettingsPanels/Wlb/WlbMetricWeightingPage.resx b/XenAdmin/SettingsPanels/Wlb/WlbMetricWeightingPage.resx index 41d04432f..be8224df1 100644 --- a/XenAdmin/SettingsPanels/Wlb/WlbMetricWeightingPage.resx +++ b/XenAdmin/SettingsPanels/Wlb/WlbMetricWeightingPage.resx @@ -225,6 +225,9 @@ label11 + + False + System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -258,6 +261,9 @@ label10 + + False + System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -565,7 +571,7 @@ 6, 46 - 578, 266 + 578, 196 32 diff --git a/XenAdmin/SettingsPanels/Wlb/WlbMetricWeightingPage.zh-CN.resx b/XenAdmin/SettingsPanels/Wlb/WlbMetricWeightingPage.zh-CN.resx index 0fbf9b4a3..ec5b0eccb 100644 --- a/XenAdmin/SettingsPanels/Wlb/WlbMetricWeightingPage.zh-CN.resx +++ b/XenAdmin/SettingsPanels/Wlb/WlbMetricWeightingPage.zh-CN.resx @@ -222,6 +222,9 @@ 磁盘写入(&W) + + False + label11 @@ -255,6 +258,9 @@ 磁盘读取(&D) + + False + label10 diff --git a/XenAdmin/SettingsPanels/Wlb/WlbThresholdsPage.Designer.cs b/XenAdmin/SettingsPanels/Wlb/WlbThresholdsPage.Designer.cs index 5a26c88e6..4f9b88d87 100644 --- a/XenAdmin/SettingsPanels/Wlb/WlbThresholdsPage.Designer.cs +++ b/XenAdmin/SettingsPanels/Wlb/WlbThresholdsPage.Designer.cs @@ -34,6 +34,10 @@ namespace XenAdmin.SettingsPanels this.decentGroupBox1 = new XenAdmin.Controls.DecentGroupBox(); this.label1DiskWrite = new System.Windows.Forms.Label(); this.labelDiskRead = new System.Windows.Forms.Label(); + //CA-134554 - Hide Disk Read/Write until the backend server side is ready + this.label1DiskWrite.Visible = false; + this.labelDiskRead.Visible = false; + this.labelNetworkWrite = new System.Windows.Forms.Label(); this.labelNetworkRead = new System.Windows.Forms.Label(); this.labelFreeMemory = new System.Windows.Forms.Label(); diff --git a/XenAdmin/SettingsPanels/Wlb/WlbThresholdsPage.cs b/XenAdmin/SettingsPanels/Wlb/WlbThresholdsPage.cs index 20686361d..8f667f533 100644 --- a/XenAdmin/SettingsPanels/Wlb/WlbThresholdsPage.cs +++ b/XenAdmin/SettingsPanels/Wlb/WlbThresholdsPage.cs @@ -86,7 +86,13 @@ namespace XenAdmin.SettingsPanels labelDiskWriteUnits.Text = string.Format(labelDiskWriteUnits.Text, updownDiskWriteCriticalPoint.Minimum, updownDiskWriteCriticalPoint.Maximum); labelNetworkReadUnits.Text = string.Format(labelNetworkReadUnits.Text, updownNetworkReadCriticalPoint.Minimum, updownNetworkReadCriticalPoint.Maximum); labelNetworkWriteUnits.Text = string.Format(labelNetworkWriteUnits.Text, updownNetworkWriteCriticalPoint.Minimum, updownNetworkWriteCriticalPoint.Maximum); - + + //CA-134554 - Hide Disk Read/Write until the backend server side is ready + updownDiskReadCriticalPoint.Visible = false; + updownDiskWriteCriticalPoint.Visible = false; + labelDiskReadUnits.Visible = false; + labelDiskWriteUnits.Visible = false; + _loading = false; ; } diff --git a/XenAdmin/TabPages/AlertSummaryPage.Designer.cs b/XenAdmin/TabPages/AlertSummaryPage.Designer.cs index 2e5a70801..0cd1f22bf 100644 --- a/XenAdmin/TabPages/AlertSummaryPage.Designer.cs +++ b/XenAdmin/TabPages/AlertSummaryPage.Designer.cs @@ -322,13 +322,13 @@ namespace XenAdmin.TabPages private System.Windows.Forms.ToolStripSplitButton toolStripSplitButtonDismiss; private System.Windows.Forms.ToolStripMenuItem tsmiDismissAll; private System.Windows.Forms.ToolStripMenuItem tsmiDismissSelected; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3; private System.Windows.Forms.DataGridViewImageColumn ColumnExpand; private System.Windows.Forms.DataGridViewImageColumn ColumnSeverity; private System.Windows.Forms.DataGridViewTextBoxColumn ColumnMessage; private System.Windows.Forms.DataGridViewTextBoxColumn ColumnLocation; private System.Windows.Forms.DataGridViewTextBoxColumn ColumnDate; private System.Windows.Forms.DataGridViewTextBoxColumn ColumnActions; - private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; - private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3; } } \ No newline at end of file diff --git a/XenAdmin/TabPages/AlertSummaryPage.resx b/XenAdmin/TabPages/AlertSummaryPage.resx index 4a0c13a99..1ea4fb967 100644 --- a/XenAdmin/TabPages/AlertSummaryPage.resx +++ b/XenAdmin/TabPages/AlertSummaryPage.resx @@ -229,10 +229,10 @@ Magenta - 111, 23 + 97, 23 - Filter by Lo&cation + Filter by S&erver Segoe UI, 9pt @@ -454,7 +454,7 @@ True - Location + Server / Pool 30 diff --git a/XenAdmin/TabPages/GeneralTabPage.cs b/XenAdmin/TabPages/GeneralTabPage.cs index 20926146a..29c6c0c0a 100644 --- a/XenAdmin/TabPages/GeneralTabPage.cs +++ b/XenAdmin/TabPages/GeneralTabPage.cs @@ -152,6 +152,9 @@ namespace XenAdmin.TabPages { set { + if (value == null) + return; + SetupAnStartLicenseStatus(value); if (xenObject != value) { diff --git a/XenAdmin/TabPages/HistoryPage.Designer.cs b/XenAdmin/TabPages/HistoryPage.Designer.cs index 71e523eac..2339681fe 100644 --- a/XenAdmin/TabPages/HistoryPage.Designer.cs +++ b/XenAdmin/TabPages/HistoryPage.Designer.cs @@ -238,17 +238,17 @@ namespace XenAdmin.TabPages private System.Windows.Forms.ToolStripMenuItem tsmiDismissAll; private System.Windows.Forms.ToolStripMenuItem tsmiDismissSelected; private XenAdmin.Controls.DataGridViewEx.DataGridViewEx dataGridView; - private System.Windows.Forms.DataGridViewImageColumn columnExpander; - private System.Windows.Forms.DataGridViewImageColumn columnStatus; - private System.Windows.Forms.DataGridViewTextBoxColumn columnMessage; - private System.Windows.Forms.DataGridViewTextBoxColumn columnLocation; - private System.Windows.Forms.DataGridViewTextBoxColumn columnDate; - private System.Windows.Forms.DataGridViewTextBoxColumn columnActions; private XenAdmin.Controls.FilterStatusToolStripDropDownButton toolStripDdbFilterStatus; private XenAdmin.Controls.FilterLocationToolStripDropDownButton toolStripDdbFilterLocation; private XenAdmin.Controls.FilterDatesToolStripDropDownButton toolStripDdbFilterDates; private System.Windows.Forms.ToolStripLabel toolStripLabelFiltersOnOff; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2; + private System.Windows.Forms.DataGridViewImageColumn columnExpander; + private System.Windows.Forms.DataGridViewImageColumn columnStatus; + private System.Windows.Forms.DataGridViewTextBoxColumn columnMessage; + private System.Windows.Forms.DataGridViewTextBoxColumn columnLocation; + private System.Windows.Forms.DataGridViewTextBoxColumn columnDate; + private System.Windows.Forms.DataGridViewTextBoxColumn columnActions; } } diff --git a/XenAdmin/TabPages/HistoryPage.resx b/XenAdmin/TabPages/HistoryPage.resx index ff88b3a02..82860c397 100644 --- a/XenAdmin/TabPages/HistoryPage.resx +++ b/XenAdmin/TabPages/HistoryPage.resx @@ -142,10 +142,10 @@ Magenta - 111, 23 + 97, 23 - Filter by Lo&cation + Filter by S&erver Magenta @@ -290,7 +290,7 @@ True - Location + Server / Pool 30 diff --git a/XenAdmin/TabPages/ManageUpdatesPage.resx b/XenAdmin/TabPages/ManageUpdatesPage.resx index 36411ccc4..2d780951b 100644 --- a/XenAdmin/TabPages/ManageUpdatesPage.resx +++ b/XenAdmin/TabPages/ManageUpdatesPage.resx @@ -247,10 +247,10 @@ Magenta - 111, 23 + 97, 23 - Filter by Lo&cation + Filter by S&erver Segoe UI, 9pt @@ -507,7 +507,7 @@ True - Location + Server / Pool 95 diff --git a/XenAdmin/Wizards/NewVMWizard/NewVMWizard.cs b/XenAdmin/Wizards/NewVMWizard/NewVMWizard.cs index 11dea53b2..ddc2dda2d 100644 --- a/XenAdmin/Wizards/NewVMWizard/NewVMWizard.cs +++ b/XenAdmin/Wizards/NewVMWizard/NewVMWizard.cs @@ -206,7 +206,7 @@ namespace XenAdmin.Wizards.NewVMWizard page_7_Networking.SelectedTemplate = selectedTemplate; RemovePage(pageVgpu); - if (vgpuCapability && selectedTemplate.IsHVM) + if (vgpuCapability && selectedTemplate.CanHaveVGpu) AddAfterPage(page_5_CpuMem, pageVgpu); RemovePage(page_1b_BiosLocking); diff --git a/XenAdminTests/MainWindowWrapper/NewNetworkWizardWrapper.cs b/XenAdminTests/MainWindowWrapper/NewNetworkWizardWrapper.cs index 93e0de7f3..dc4a5fa32 100644 --- a/XenAdminTests/MainWindowWrapper/NewNetworkWizardWrapper.cs +++ b/XenAdminTests/MainWindowWrapper/NewNetworkWizardWrapper.cs @@ -34,6 +34,7 @@ using XenAdmin.Core; using XenAdmin.TabPages; using System.Windows.Forms; using XenAdmin.Wizards; +using XenAdmin.Wizards.NewNetworkWizard_Pages; namespace XenAdminTests { @@ -56,5 +57,26 @@ namespace XenAdminTests return GetBaseClassField