Merge pull request #42 from stephen-turner/CA-115256

[CA-115256] Don't show the Buy Licenses link for pre-Clearwater servers
This commit is contained in:
Gabor Apati-Nagy 2014-04-16 09:51:35 +01:00
commit c0f1dc43a1
2 changed files with 7 additions and 2 deletions

View File

@ -221,6 +221,11 @@ namespace XenAdmin.Dialogs
} }
} }
public bool HelperUrlRequired
{
get { return XenObject == null ? false : Helpers.ClearwaterOrGreater(XenObject.Connection); } // CA-115256
}
public Status RowStatus public Status RowStatus
{ {
get get

View File

@ -200,12 +200,12 @@ namespace XenAdmin.Dialogs
Program.Invoke(this, delegate Program.Invoke(this, delegate
{ {
LicenseDataGridViewRow lRow = row as LicenseDataGridViewRow; LicenseDataGridViewRow lRow = row as LicenseDataGridViewRow;
if(lRow == null) if(lRow == null || lRow.XenObject == null)
return; return;
summaryPanel.Title = lRow.XenObject.Name; summaryPanel.Title = lRow.XenObject.Name;
summaryPanel.HelperUrl = Messages.LICENSE_MANAGER_BUY_LICENSE_LINK_TEXT; summaryPanel.HelperUrl = Messages.LICENSE_MANAGER_BUY_LICENSE_LINK_TEXT;
summaryPanel.HelperUrlVisible = true; summaryPanel.HelperUrlVisible = lRow.HelperUrlRequired;
summaryPanel.WarningVisible = lRow.WarningRequired; summaryPanel.WarningVisible = lRow.WarningRequired;
summaryPanel.WarningText = lRow.WarningText; summaryPanel.WarningText = lRow.WarningText;
summaryPanel.SummaryText = summaryComponent; summaryPanel.SummaryText = summaryComponent;