mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-23 20:36:33 +01:00
CA-157501: Fixing inconsistent GPU dialogs in XS "Standard" when compared with "Enterprise"
- In the case that there are two hosts in a pool, one with GPU and one without, then the one without will display a text saying "There are no GPUs on this server". Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
This commit is contained in:
parent
ed6266a421
commit
88aa3d4bb4
@ -35,6 +35,7 @@ using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using XenAdmin.Controls;
|
||||
using XenAdmin.Controls.Common;
|
||||
using XenAdmin.Controls.GPU;
|
||||
using XenAdmin.Core;
|
||||
using XenAPI;
|
||||
@ -134,6 +135,9 @@ namespace XenAdmin.TabPages
|
||||
AddRowToPanel(new GpuRow(xenObject, settingsToPGPUs[settings]), ref top);
|
||||
}
|
||||
|
||||
if (listSettings.Count == 0)
|
||||
AddRowToPanel(CreateNoGpuPanel(), ref top);
|
||||
|
||||
// Remove old controls
|
||||
foreach (Control c in oldControls)
|
||||
{
|
||||
@ -159,6 +163,15 @@ namespace XenAdmin.TabPages
|
||||
};
|
||||
}
|
||||
|
||||
private AutoHeightLabel CreateNoGpuPanel()
|
||||
{
|
||||
return new AutoHeightLabel
|
||||
{
|
||||
Name = "noGpuPanel1",
|
||||
Text = Messages.NO_GPU_ON_SERVER
|
||||
};
|
||||
}
|
||||
|
||||
private void ReLayout()
|
||||
{
|
||||
Program.AssertOnEventThread();
|
||||
@ -174,7 +187,7 @@ namespace XenAdmin.TabPages
|
||||
}
|
||||
}
|
||||
|
||||
private void AddRowToPanel(UserControl row, ref int top)
|
||||
private void AddRowToPanel(Control row, ref int top)
|
||||
{
|
||||
row.Top = top;
|
||||
row.Left = pageContainerPanel.Padding.Left - pageContainerPanel.HorizontalScroll.Value;
|
||||
|
11
XenModel/Messages.Designer.cs
generated
11
XenModel/Messages.Designer.cs
generated
@ -23118,6 +23118,15 @@ namespace XenAdmin {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to There are no GPUs on this server..
|
||||
/// </summary>
|
||||
public static string NO_GPU_ON_SERVER {
|
||||
get {
|
||||
return ResourceManager.GetString("NO_GPU_ON_SERVER", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to There are no halted or suspended VMs to export.
|
||||
/// </summary>
|
||||
@ -31735,7 +31744,7 @@ namespace XenAdmin {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Update succesfully uploaded to selected server(s).
|
||||
/// Looks up a localized string similar to Update successfully uploaded to selected server(s).
|
||||
/// </summary>
|
||||
public static string UPLOAD_PATCH_END_DESCRIPTION {
|
||||
get {
|
||||
|
@ -12319,5 +12319,7 @@ Desktop features enabled</value>
|
||||
<value>Eligible for support
|
||||
Desktop+ features enabled</value>
|
||||
</data>
|
||||
</root>
|
||||
|
||||
<data name="NO_GPU_ON_SERVER" xml:space="preserve">
|
||||
<value>There are no GPUs on this server.</value>
|
||||
</data>
|
||||
</root>
|
Loading…
Reference in New Issue
Block a user