mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2025-01-20 07:19:18 +01:00
CP-18013: [XenCenter] Update host updates pane
For servers running Ely or greater we now produce messages for patching requiring reboot using the host.patches_requiring_reboot field. The Pool_patch objects resolved are sufficient to produce the same messages. Note that some patches produce a message in the old API but not the new, this is intentional. Still to do: update pool updates in the same way, Signed-off-by: Callum McIntyre <callumiandavid.mcintyre@citrix.com>
This commit is contained in:
parent
177ae6acee
commit
dffd7507cc
@ -663,6 +663,25 @@ namespace XenAdmin.TabPages
|
||||
|
||||
PDSection s = pdSectionUpdates;
|
||||
|
||||
if (Helpers.ElyOrGreater(host))
|
||||
{
|
||||
// As of Ely we use host.patches_requiring_reboot to generate the list of reboot required messages
|
||||
var patchRefs = host.patches_requiring_reboot;
|
||||
foreach (var patchRef in patchRefs)
|
||||
{
|
||||
var patch = host.Connection.Resolve(patchRef);
|
||||
var key = patch.NameWithLocation;
|
||||
var value = string.Format(
|
||||
Messages.GENERAL_PANEL_UPDATE_WARNING,
|
||||
patch.Connection.FriendlyName,
|
||||
patch.Name);
|
||||
|
||||
s.AddEntry(key, value);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// For older versions no change to how messages are generated
|
||||
List<KeyValuePair<String, String>> messages = CheckServerUpdates(host);
|
||||
if (messages.Count > 0)
|
||||
{
|
||||
@ -671,6 +690,8 @@ namespace XenAdmin.TabPages
|
||||
s.AddEntry(kvp.Key, kvp.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (hostAppliedPatches(host) != "")
|
||||
{
|
||||
s.AddEntry(FriendlyName("Pool_patch.applied"), hostAppliedPatches(host));
|
||||
|
Loading…
Reference in New Issue
Block a user