diff --git a/XenAdmin/Controls/GPU/GpuPlacementPolicyPanel.Designer.cs b/XenAdmin/Controls/GPU/GpuPlacementPolicyPanel.Designer.cs index 8c829ea71..712bca87c 100644 --- a/XenAdmin/Controls/GPU/GpuPlacementPolicyPanel.Designer.cs +++ b/XenAdmin/Controls/GPU/GpuPlacementPolicyPanel.Designer.cs @@ -29,43 +29,39 @@ private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(GpuPlacementPolicyPanel)); - this.panel = new XenAdmin.Controls.PanelWithBorder(); - this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); - this.placementPolicyLabel = new XenAdmin.Controls.Common.AutoHeightLabel(); + this.panelWithBorder = new XenAdmin.Controls.PanelWithBorder(); + this.containerPanel = new System.Windows.Forms.Panel(); + this.placementPolicyLabel = new System.Windows.Forms.Label(); this.editPlacementPolicyButton = new System.Windows.Forms.Button(); - this.panel.SuspendLayout(); - this.tableLayoutPanel1.SuspendLayout(); + this.panelWithBorder.SuspendLayout(); + this.containerPanel.SuspendLayout(); this.SuspendLayout(); // - // panel + // panelWithBorder // - resources.ApplyResources(this.panel, "panel"); - this.panel.BackColor = System.Drawing.Color.Transparent; - this.panel.Controls.Add(this.tableLayoutPanel1); - this.panel.Name = "panel"; - this.panel.VisibleChanged += new System.EventHandler(this.GpuPlacementPolicyPanel_VisibleChanged); + resources.ApplyResources(this.panelWithBorder, "panelWithBorder"); + this.panelWithBorder.BackColor = System.Drawing.Color.Transparent; + this.panelWithBorder.Controls.Add(this.containerPanel); + this.panelWithBorder.Name = "panelWithBorder"; // - // tableLayoutPanel1 + // containerPanel // - resources.ApplyResources(this.tableLayoutPanel1, "tableLayoutPanel1"); - this.tableLayoutPanel1.Controls.Add(this.placementPolicyLabel, 0, 0); - this.tableLayoutPanel1.Controls.Add(this.editPlacementPolicyButton, 1, 0); - this.tableLayoutPanel1.Name = "tableLayoutPanel1"; + resources.ApplyResources(this.containerPanel, "containerPanel"); + this.containerPanel.Controls.Add(this.placementPolicyLabel); + this.containerPanel.Controls.Add(this.editPlacementPolicyButton); + this.containerPanel.Name = "containerPanel"; // // placementPolicyLabel // - resources.ApplyResources(this.placementPolicyLabel, "placementPolicyLabel"); this.placementPolicyLabel.AutoEllipsis = true; - this.placementPolicyLabel.BackColor = System.Drawing.Color.Transparent; - this.placementPolicyLabel.MinimumSize = new System.Drawing.Size(0, 16); + resources.ApplyResources(this.placementPolicyLabel, "placementPolicyLabel"); this.placementPolicyLabel.Name = "placementPolicyLabel"; // // editPlacementPolicyButton // resources.ApplyResources(this.editPlacementPolicyButton, "editPlacementPolicyButton"); - this.editPlacementPolicyButton.BackColor = System.Drawing.Color.Transparent; this.editPlacementPolicyButton.Name = "editPlacementPolicyButton"; - this.editPlacementPolicyButton.UseVisualStyleBackColor = false; + this.editPlacementPolicyButton.UseVisualStyleBackColor = true; this.editPlacementPolicyButton.Click += new System.EventHandler(this.editPlacementPolicyButton_Click); // // GpuPlacementPolicyPanel @@ -73,21 +69,25 @@ resources.ApplyResources(this, "$this"); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; this.BackColor = System.Drawing.Color.Transparent; - this.Controls.Add(this.panel); + this.Controls.Add(this.panelWithBorder); this.DoubleBuffered = true; - this.MinimumSize = new System.Drawing.Size(519, 32); + this.MinimumSize = new System.Drawing.Size(400, 32); this.Name = "GpuPlacementPolicyPanel"; - this.panel.ResumeLayout(false); - this.tableLayoutPanel1.ResumeLayout(false); + this.VisibleChanged += new System.EventHandler(this.GpuPlacementPolicyPanel_VisibleChanged); + this.panelWithBorder.ResumeLayout(false); + this.containerPanel.ResumeLayout(false); + this.containerPanel.PerformLayout(); this.ResumeLayout(false); + this.PerformLayout(); } #endregion - private PanelWithBorder panel; - private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; + private PanelWithBorder panelWithBorder; private System.Windows.Forms.Button editPlacementPolicyButton; - private XenAdmin.Controls.Common.AutoHeightLabel placementPolicyLabel; + private System.Windows.Forms.Label placementPolicyLabel; + private System.Windows.Forms.Panel containerPanel; + } } diff --git a/XenAdmin/Controls/GPU/GpuPlacementPolicyPanel.cs b/XenAdmin/Controls/GPU/GpuPlacementPolicyPanel.cs index 0f5fd9071..832f8071b 100644 --- a/XenAdmin/Controls/GPU/GpuPlacementPolicyPanel.cs +++ b/XenAdmin/Controls/GPU/GpuPlacementPolicyPanel.cs @@ -46,7 +46,7 @@ namespace XenAdmin.Controls } currentAllocationAlgorithm = gpu_group.allocation_algorithm; } - placementPolicyLabel.Text = string.Format("Placement policy: {0}", + placementPolicyLabel.Text = string.Format(Messages.GPU_PLACEMENT_POLICY_DESCRIPTION, PlacementPolicyWrapper.ToString(currentAllocationAlgorithm)); } @@ -135,11 +135,11 @@ namespace XenAdmin.Controls switch (x) { case allocation_algorithm.breadth_first: - return "Maximum performance: put VMs on as many GPUs as possible"; + return Messages.GPU_PLACEMENT_POLICY_MAX_PERFORMANCE_DESCRIPTION; case allocation_algorithm.depth_first: - return "Maximum density: put as many VMs as possible on the same GPU"; + return Messages.GPU_PLACEMENT_POLICY_MAX_DENSITY_DESCRIPTION; default: - return "Unknown or mixture"; + return Messages.GPU_PLACEMENT_POLICY_MIXED_DESCRIPTION; } } } diff --git a/XenAdmin/Controls/GPU/GpuPlacementPolicyPanel.resx b/XenAdmin/Controls/GPU/GpuPlacementPolicyPanel.resx index 7af24dbf9..c67abcda8 100644 --- a/XenAdmin/Controls/GPU/GpuPlacementPolicyPanel.resx +++ b/XenAdmin/Controls/GPU/GpuPlacementPolicyPanel.resx @@ -117,44 +117,47 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + - + + GrowAndShrink + + Top, Bottom, Left, Right - - - 2 + + GrowAndShrink - - Top, Left, Right - - - - Microsoft Sans Serif, 8.25pt + + True NoControl + - 5, 10 - - - 5, 10, 5, 5 + 3, 10 - 431, 16 + 110, 13 - 15 + 2 + + + placementPolicyLabel placementPolicyLabel - XenAdmin.Controls.Common.AutoHeightLabel, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - tableLayoutPanel1 + containerPanel 0 @@ -166,16 +169,13 @@ NoControl - 447, 6 - - - 6, 6, 6, 6 + 398, 5 - 66, 22 + 61, 22 - 14 + 1 &Edit... @@ -187,63 +187,57 @@ System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - tableLayoutPanel1 + containerPanel 1 - - Fill + + 1, 1 - - 0, 0 + + 462, 33 - - 1 - - - 519, 32 - - - 0 - - - tableLayoutPanel1 - - - System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - panel - - - 0 - - - <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="placementPolicyLabel" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="editPlacementPolicyButton" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /></Controls><Columns Styles="Percent,81.8951,AutoSize,0" /><Rows Styles="AutoSize,0" /></TableLayoutSettings> - - - 0, 0 - - - 0, 0, 0, 0 - - - 519, 32 - - + 3 - - panel + + containerPanel - + + System.Windows.Forms.Panel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panelWithBorder + + + 0 + + + Fill + + + 0, 0 + + + 0, 0, 0, 0 + + + 464, 35 + + + 3 + + + panelWithBorder + + XenAdmin.Controls.PanelWithBorder, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - + $this - + 0 @@ -252,11 +246,14 @@ 96, 96 + + GrowAndShrink + 0, 0, 0, 0 - 519, 32 + 464, 35 GpuPlacementPolicyPanel diff --git a/XenModel/Messages.Designer.cs b/XenModel/Messages.Designer.cs index 780aa2c64..2a5e1540b 100644 --- a/XenModel/Messages.Designer.cs +++ b/XenModel/Messages.Designer.cs @@ -13929,6 +13929,15 @@ namespace XenAdmin { } } + /// + /// Looks up a localized string similar to Placement policy: {0}. + /// + public static string GPU_PLACEMENT_POLICY_DESCRIPTION { + get { + return ResourceManager.GetString("GPU_PLACEMENT_POLICY_DESCRIPTION", resourceCulture); + } + } + /// /// Looks up a localized string similar to Maximum density. /// @@ -13938,6 +13947,15 @@ namespace XenAdmin { } } + /// + /// Looks up a localized string similar to Maximum density: put as many VMs as possible on the same GPU. + /// + public static string GPU_PLACEMENT_POLICY_MAX_DENSITY_DESCRIPTION { + get { + return ResourceManager.GetString("GPU_PLACEMENT_POLICY_MAX_DENSITY_DESCRIPTION", resourceCulture); + } + } + /// /// Looks up a localized string similar to Maximum performance. /// @@ -13947,6 +13965,33 @@ namespace XenAdmin { } } + /// + /// Looks up a localized string similar to Maximum performance: put VMs on as many GPUs as possible. + /// + public static string GPU_PLACEMENT_POLICY_MAX_PERFORMANCE_DESCRIPTION { + get { + return ResourceManager.GetString("GPU_PLACEMENT_POLICY_MAX_PERFORMANCE_DESCRIPTION", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Mixed. + /// + public static string GPU_PLACEMENT_POLICY_MIXED { + get { + return ResourceManager.GetString("GPU_PLACEMENT_POLICY_MIXED", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Mixed: different settings for different GPU groups. + /// + public static string GPU_PLACEMENT_POLICY_MIXED_DESCRIPTION { + get { + return ResourceManager.GetString("GPU_PLACEMENT_POLICY_MIXED_DESCRIPTION", resourceCulture); + } + } + /// /// Looks up a localized string similar to You can improve graphics performance by assigning a dedicated graphics processing unit (GPU) to a VM. However, no GPUs have been detected in this pool, so this option is not currently available.. /// diff --git a/XenModel/Messages.resx b/XenModel/Messages.resx index 3ddc85c9d..5f458c36e 100644 --- a/XenModel/Messages.resx +++ b/XenModel/Messages.resx @@ -4880,12 +4880,27 @@ Would you like to eject these ISOs before continuing? None + + Placement policy: {0} + Maximum density + + Maximum density: put as many VMs as possible on the same GPU + Maximum performance + + Maximum performance: put VMs on as many GPUs as possible + + + Mixed + + + Mixed: different settings for different GPU groups + You can improve graphics performance by assigning a dedicated graphics processing unit (GPU) to a VM. However, no GPUs have been detected in this pool, so this option is not currently available.