mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2025-01-20 15:29:26 +01:00
Merge pull request #1473 from letsboogey/gpu
CP-21120 - XenCenter shows MxGPU as 'passthrough' rather than model
This commit is contained in:
commit
5f3d49e9da
@ -203,10 +203,10 @@ namespace XenAdmin.Controls.GPU
|
||||
vGpusPerGpuColumn.Value = string.Empty;
|
||||
|
||||
if (!isPassThru)
|
||||
maxResolutionColumn.Value = VGpuType.MaxResolution;
|
||||
maxResolutionColumn.Value = (VGpuType.MaxResolution == "0x0" || String.IsNullOrEmpty(VGpuType.MaxResolution)) ? "" : VGpuType.MaxResolution;
|
||||
|
||||
if (!isPassThru)
|
||||
maxDisplaysColumn.Value = VGpuType.max_heads;
|
||||
maxDisplaysColumn.Value = VGpuType.max_heads < 1 ? "" : String.Format("{0}",VGpuType.max_heads);
|
||||
else
|
||||
maxDisplaysColumn.Value = string.Empty;
|
||||
|
||||
|
9
XenModel/Messages.Designer.cs
generated
9
XenModel/Messages.Designer.cs
generated
@ -35476,6 +35476,15 @@ namespace XenAdmin {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to {0} virtual GPU ({1} per GPU).
|
||||
/// </summary>
|
||||
public static string VGPU_DESCRIPTION_ZEROES {
|
||||
get {
|
||||
return ResourceManager.GetString("VGPU_DESCRIPTION_ZEROES", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Pass-through whole GPU.
|
||||
/// </summary>
|
||||
|
@ -12295,6 +12295,9 @@ To learn more about the [XenServer] Dynamic Workload Balancing feature or to sta
|
||||
<data name="VGPU_DESCRIPTION_ONE" xml:space="preserve">
|
||||
<value>{0} virtual GPU ({1} per GPU, {2}, {3} display)</value>
|
||||
</data>
|
||||
<data name="VGPU_DESCRIPTION_ZEROES" xml:space="preserve">
|
||||
<value>{0} virtual GPU ({1} per GPU)</value>
|
||||
</data>
|
||||
<data name="VGPU_PASSTHRU_TOSTRING" xml:space="preserve">
|
||||
<value>Pass-through whole GPU</value>
|
||||
</data>
|
||||
|
@ -55,6 +55,9 @@ namespace XenAPI
|
||||
if (IsPassthrough)
|
||||
return Messages.VGPU_PASSTHRU_TOSTRING;
|
||||
|
||||
if ((MaxResolution == "0x0" || string.IsNullOrEmpty(MaxResolution)) && max_heads < 1)
|
||||
return string.Format(Messages.VGPU_DESCRIPTION_ZEROES, model_name, Capacity);
|
||||
|
||||
return string.Format(max_heads == 1 ? Messages.VGPU_DESCRIPTION_ONE : Messages.VGPU_DESCRIPTION_MANY,
|
||||
model_name, Capacity, MaxResolution, max_heads);
|
||||
}
|
||||
@ -129,7 +132,7 @@ namespace XenAPI
|
||||
|
||||
public bool IsPassthrough
|
||||
{
|
||||
get { return max_heads == 0; }
|
||||
get { return model_name == "passthrough"; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user