Merge pull request #1501 from stephen-turner/CA-248252b

CA-248252: Show version numbers for updates
This commit is contained in:
Konstantina Chremmou 2017-03-23 12:39:39 +00:00 committed by GitHub
commit 8f1a539cca
6 changed files with 19 additions and 10 deletions

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_DESCRIPTION, friendlyName, update.version);
}
private void linkLabelExpand_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
foreach (PDSection s in sections)

View File

@ -32338,9 +32338,9 @@ namespace XenAdmin {
/// <summary>
/// Looks up a localized string similar to {0} (version {1}).
/// </summary>
public static string SUPP_PACK_DESCTIPTION {
public static string SUPP_PACK_DESCRIPTION {
get {
return ResourceManager.GetString("SUPP_PACK_DESCTIPTION", resourceCulture);
return ResourceManager.GetString("SUPP_PACK_DESCRIPTION", resourceCulture);
}
}

View File

@ -11209,7 +11209,7 @@ VM が再起動したら、[[XenServer product] Tools のインストール] を
<data name="SUNDAY_SHORT" xml:space="preserve">
<value>日</value>
</data>
<data name="SUPP_PACK_DESCTIPTION" xml:space="preserve">
<data name="SUPP_PACK_DESCRIPTION" xml:space="preserve">
<value>{0} (Version {1})</value>
</data>
<data name="SUPP_PACK_INSTALL_FAILED" xml:space="preserve">

View File

@ -11218,7 +11218,7 @@ The upper limit: SR size / {2}</value>
<data name="SUNDAY_SHORT" xml:space="preserve">
<value>Sun</value>
</data>
<data name="SUPP_PACK_DESCTIPTION" xml:space="preserve">
<data name="SUPP_PACK_DESCRIPTION" xml:space="preserve">
<value>{0} (version {1})</value>
</data>
<data name="SUPP_PACK_INSTALL_FAILED" xml:space="preserve">

View File

@ -11207,7 +11207,7 @@ VM 克隆使用文件管理器的快照和克隆功能来实现高性能,并
<data name="SUNDAY_SHORT" xml:space="preserve">
<value>日</value>
</data>
<data name="SUPP_PACK_DESCTIPTION" xml:space="preserve">
<data name="SUPP_PACK_DESCRIPTION" xml:space="preserve">
<value>{0} (版本: {1})</value>
</data>
<data name="SUPP_PACK_INSTALL_FAILED" xml:space="preserve">

View File

@ -1658,7 +1658,7 @@ namespace XenAPI
private bool parsed = false;
public bool IsValid { get { return parsed; } }
public string LongDescription { get { return string.Format(Messages.SUPP_PACK_DESCTIPTION, description, version); } }
public string LongDescription { get { return string.Format(Messages.SUPP_PACK_DESCRIPTION, description, version); } }
/// <summary>
/// Try to parse the supp pack information from one key of software_version