Merge pull request #3024 from kc284/master

CP-38582: Corrected version check - last_software_update was added in xapi 22.20.0
This commit is contained in:
Danilo Del Busso 2022-06-21 15:23:10 +01:00 committed by GitHub
commit ae9d7120e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -1024,7 +1024,7 @@ namespace XenAdmin.TabPages
if (host.software_version.ContainsKey("dbv")) if (host.software_version.ContainsKey("dbv"))
pdSectionVersion.AddEntry("DBV", host.software_version["dbv"]); pdSectionVersion.AddEntry("DBV", host.software_version["dbv"]);
if (Helpers.Post82X(host) && Helpers.XapiEqualOrGreater_22_19_0(host) && if (Helpers.Post82X(host) && Helpers.XapiEqualOrGreater_22_20_0(host) &&
host.last_software_update > softwareVersionDate && host.last_software_update > unixMinDateTime) host.last_software_update > softwareVersionDate && host.last_software_update > unixMinDateTime)
pdSectionVersion.AddEntry(Messages.SOFTWARE_VERSION_LAST_UPDATED, pdSectionVersion.AddEntry(Messages.SOFTWARE_VERSION_LAST_UPDATED,
HelpersGUI.DateTimeToString(host.last_software_update.ToLocalTime(), Messages.DATEFORMAT_DMY_HMS, true)); HelpersGUI.DateTimeToString(host.last_software_update.ToLocalTime(), Messages.DATEFORMAT_DMY_HMS, true));

View File

@ -434,9 +434,9 @@ namespace XenAdmin.Core
return coordinator == null || ProductVersionCompare(coordinator.GetXapiVersion(), "22.19.0") >= 0; return coordinator == null || ProductVersionCompare(coordinator.GetXapiVersion(), "22.19.0") >= 0;
} }
public static bool XapiEqualOrGreater_22_19_0(Host host) public static bool XapiEqualOrGreater_22_20_0(Host host)
{ {
return host == null || ProductVersionCompare(host.GetXapiVersion(), "22.19.0") >= 0; return host == null || ProductVersionCompare(host.GetXapiVersion(), "22.20.0") >= 0;
} }
#endregion #endregion