mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-25 06:16:37 +01:00
Merge pull request #1810 from jijiang/CA-268683
CA-268683: Turn on disable HA on unlicensed pool
This commit is contained in:
commit
3eed721f64
@ -1415,7 +1415,7 @@ namespace XenAdmin
|
||||
bool show_home = SelectionManager.Selection.Count == 1 && SelectionManager.Selection[0].Value == null;
|
||||
// The upsell pages use the first selected XenObject: but they're only shown if there is only one selected object (see calls to ShowTab() below).
|
||||
bool dmc_upsell = Helpers.FeatureForbidden(SelectionManager.Selection.FirstAsXenObject, Host.RestrictDMC);
|
||||
bool ha_upsell = Helpers.FeatureForbidden(SelectionManager.Selection.FirstAsXenObject, Host.RestrictHA);
|
||||
bool ha_upsell = Helpers.FeatureForbidden(SelectionManager.Selection.FirstAsXenObject, Host.RestrictHA) && (selectionPool != null && !selectionPool.ha_enabled);
|
||||
bool wlb_upsell = Helpers.FeatureForbidden(SelectionManager.Selection.FirstAsXenObject, Host.RestrictWLB);
|
||||
bool ad_upsell = Helpers.FeatureForbidden(SelectionManager.Selection.FirstAsXenObject, Host.RestrictAD);
|
||||
bool is_connected = selectionConnection != null && selectionConnection.IsConnected;
|
||||
|
@ -218,13 +218,15 @@ namespace XenAdmin.TabPages
|
||||
|
||||
if (PassedRbacChecks())
|
||||
{
|
||||
buttonConfigure.Visible = true;
|
||||
buttonConfigure.Enabled = true;
|
||||
bool haRestricted = Helpers.FeatureForbidden(pool, Host.RestrictHA);
|
||||
|
||||
buttonConfigure.Visible = !haRestricted;
|
||||
buttonConfigure.Enabled = !haRestricted;
|
||||
buttonEnableDisableHa.Visible = true;
|
||||
buttonEnableDisableHa.Enabled = true;
|
||||
|
||||
pictureBoxWarningTriangle.Visible = false;
|
||||
labelStatus.Text = string.Format(Messages.HA_TAB_CONFIGURED_BLURB, Helpers.GetName(pool).Ellipsise(30));
|
||||
labelStatus.Text = string.Format(haRestricted ? Messages.HA_TAB_CONFIGURED_UNLICENSED : Messages.HA_TAB_CONFIGURED_BLURB, Helpers.GetName(pool).Ellipsise(30));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
9
XenModel/Messages.Designer.cs
generated
9
XenModel/Messages.Designer.cs
generated
@ -16776,6 +16776,15 @@ namespace XenAdmin {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to HA is currently enabled for pool '{0}'..
|
||||
/// </summary>
|
||||
public static string HA_TAB_CONFIGURED_UNLICENSED {
|
||||
get {
|
||||
return ResourceManager.GetString("HA_TAB_CONFIGURED_UNLICENSED", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Unable to calculate maximum pool failure capacity..
|
||||
/// </summary>
|
||||
|
@ -5899,6 +5899,9 @@ Reduce protection levels, or bring more servers online to increase the maximum s
|
||||
|
||||
Click Configure HA to alter the settings displayed below.</value>
|
||||
</data>
|
||||
<data name="HA_TAB_CONFIGURED_UNLICENSED" xml:space="preserve">
|
||||
<value>HA is currently enabled for pool '{0}'.</value>
|
||||
</data>
|
||||
<data name="HA_UNABLE_TO_CALCULATE_MESSAGE" xml:space="preserve">
|
||||
<value>Unable to calculate maximum pool failure capacity.</value>
|
||||
</data>
|
||||
|
Loading…
Reference in New Issue
Block a user