CP-43000: Fix Post82X call in Host extension

Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>
This commit is contained in:
Danilo Del Busso 2023-07-24 14:12:48 +01:00
parent 382785e3f1
commit 461b6c97b5
No known key found for this signature in database
4 changed files with 6 additions and 6 deletions

View File

@ -163,7 +163,7 @@ namespace XenAdmin.Dialogs
{ {
text = null; text = null;
status = Status.Ok; status = Status.Ok;
if (XenObjectHost == null || XenObjectHost.IsInPreviewRelease() || !Helpers.Post82X(XenObjectHost)) if (XenObjectHost == null || XenObjectHost.IsInPreviewRelease() || !Helpers.NileOrGreater(XenObjectHost))
{ {
return false; return false;
} }
@ -199,7 +199,7 @@ namespace XenAdmin.Dialogs
if (Dialogs.LicenseStatus.PoolIsMixedFreeAndExpiring(pool)) if (Dialogs.LicenseStatus.PoolIsMixedFreeAndExpiring(pool))
text = Messages.POOL_IS_PARTIALLY_LICENSED; text = Messages.POOL_IS_PARTIALLY_LICENSED;
text = licenseStatus.LicenseEntitlements; text = licenseStatus.LicenseEntitlements;
status = Helpers.Post82X(XenObjectHost) && XenObjectHost.IsInPreviewRelease() ? Status.Ok : Status.Warning; status = Helpers.NileOrGreater(XenObjectHost) && XenObjectHost.IsInPreviewRelease() ? Status.Ok : Status.Warning;
} }
break; break;
case Dialogs.LicenseStatus.HostState.PartiallyLicensed: case Dialogs.LicenseStatus.HostState.PartiallyLicensed:

View File

@ -354,14 +354,14 @@ namespace XenAdmin.Dialogs
if (supportLevel != null) if (supportLevel != null)
{ {
entitlements.Add(hosts.Any(Helpers.Post82X) ? Messages.LICENSE_MANAGER_LICENSED : Messages.LICENSE_ELIGIBLE_FOR_SUPPORT); entitlements.Add(hosts.Any(Helpers.NileOrGreater) ? Messages.LICENSE_MANAGER_LICENSED : Messages.LICENSE_ELIGIBLE_FOR_SUPPORT);
entitlements.Add(supportLevel); entitlements.Add(supportLevel);
} }
} }
if (CurrentState == HostState.Free || string.IsNullOrEmpty(supportLevel)) if (CurrentState == HostState.Free || string.IsNullOrEmpty(supportLevel))
{ {
if (hosts.Any(Helpers.Post82X)) if (hosts.Any(Helpers.NileOrGreater))
{ {
// CP-43000: for hosts in preview we show "Licensed" even though they're not // CP-43000: for hosts in preview we show "Licensed" even though they're not
entitlements.Add(hosts.Any(a => a.IsInPreviewRelease()) ? $"{Messages.LICENSE_MANAGER_LICENSED}{Environment.NewLine}{Messages.LICENSE_MANAGER_TRIAL_EDITION}" : Messages.LICENSE_MANAGER_TRIAL_LICENSE); entitlements.Add(hosts.Any(a => a.IsInPreviewRelease()) ? $"{Messages.LICENSE_MANAGER_LICENSED}{Environment.NewLine}{Messages.LICENSE_MANAGER_TRIAL_EDITION}" : Messages.LICENSE_MANAGER_TRIAL_LICENSE);

View File

@ -1241,7 +1241,7 @@ namespace XenAdmin.TabPages
{ {
try try
{ {
Process.Start(InvisibleMessages.UPSELL_SA); Process.Start(InvisibleMessages.LICENSE_BUY_URL);
} }
catch (Exception) catch (Exception)
{ {

View File

@ -333,7 +333,7 @@ namespace XenAPI
/// </summary> /// </summary>
public virtual bool CanShowTrialEditionUpsell() public virtual bool CanShowTrialEditionUpsell()
{ {
return Helpers.Post82X(this) && IsFreeLicense() && !IsInPreviewRelease(); return Helpers.NileOrGreater(this) && IsFreeLicense() && !IsInPreviewRelease();
} }
/// <summary> /// <summary>