CA-248252: Show version numbers for updates

This commit is contained in:
Stephen Turner 2017-03-22 17:29:11 +00:00
parent 40074d5969
commit 7bd5dd98ca

View File

@ -692,9 +692,10 @@ namespace XenAdmin.TabPages
}
}
if (hostAppliedPatches(host) != "")
var appliedPatches = hostAppliedPatches(host);
if (!string.IsNullOrEmpty(appliedPatches))
{
s.AddEntry(FriendlyName("Pool_patch.applied"), hostAppliedPatches(host));
s.AddEntry(FriendlyName("Pool_patch.applied"), appliedPatches);
}
var recommendedPatches = RecommendedPatchesForHost(host);
@ -1677,7 +1678,7 @@ namespace XenAdmin.TabPages
if (Helpers.ElyOrGreater(host))
{
foreach (var update in host.AppliedUpdates())
result.Add(UpdatesFriendlyName(update.Name));
result.Add(UpdatesFriendlyNameAndVersion(update));
}
else
{
@ -1770,7 +1771,7 @@ namespace XenAdmin.TabPages
foreach (var update in updates)
if (predicate(update))
output.Add(UpdatesFriendlyName(update.Name));
output.Add(UpdatesFriendlyNameAndVersion(update));
output.Sort(StringUtility.NaturalCompare);
@ -1914,6 +1915,14 @@ namespace XenAdmin.TabPages
return Core.PropertyManager.FriendlyNames.GetString(string.Format("Label-{0}", propertyName)) ?? propertyName;
}
private static string UpdatesFriendlyNameAndVersion(Pool_update update)
{
var friendlyName = UpdatesFriendlyName(update.Name);
if (string.IsNullOrEmpty(update.version))
return friendlyName;
return string.Format(Messages.SUPP_PACK_DESCTIPTION, friendlyName, update.version);
}
private void linkLabelExpand_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
foreach (PDSection s in sections)