mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2025-01-20 07:19:18 +01:00
Merge pull request #1456 from MihaelaStoica/CA-236104
CA-236104: Do not allow pre and post Ely servers to be selected at th…
This commit is contained in:
commit
2515c3ca4f
@ -260,14 +260,39 @@ namespace XenAdmin.Wizards.PatchingWizard
|
||||
row.Enabled = false;
|
||||
row.Cells[3].ToolTipText = Messages.PATCHINGWIZARD_SELECTSERVERPAGE_CANNOT_INSTALL_SUPP_PACKS;
|
||||
}
|
||||
if (applicableHosts != null)
|
||||
else
|
||||
{
|
||||
disableNotApplicableHosts(row, applicableHosts, host);
|
||||
if (applicableHosts != null)
|
||||
{
|
||||
disableNotApplicableHosts(row, applicableHosts, host);
|
||||
}
|
||||
else
|
||||
{
|
||||
var firstCheckedHost = GetFirstCheckedHost();
|
||||
if (firstCheckedHost != null && (Helpers.ElyOrGreater(firstCheckedHost) != Helpers.ElyOrGreater(host)))
|
||||
{
|
||||
row.Enabled = false;
|
||||
row.Cells[3].ToolTipText = string.Format(Messages.PATCHINGWIZARD_SELECTSERVERPAGE_MIXED_VERSIONS, firstCheckedHost.ProductVersionTextShort, host.ProductVersionTextShort);
|
||||
}
|
||||
else if (!row.Enabled)
|
||||
{
|
||||
row.Enabled = true;
|
||||
row.Cells[3].ToolTipText = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private Host GetFirstCheckedHost()
|
||||
{
|
||||
var firstCheckedRow = dataGridViewHosts.Rows.Cast<PatchingHostsDataGridViewRow>().FirstOrDefault(row => row.CheckValue > UNCHECKED);
|
||||
if (firstCheckedRow == null)
|
||||
return null;
|
||||
return firstCheckedRow.Tag as Host ?? Helpers.GetMaster(firstCheckedRow.Tag as Pool);
|
||||
}
|
||||
|
||||
private void disableNotApplicableHosts(PatchingHostsDataGridViewRow row, List<Host> applicableHosts, Host host)
|
||||
{
|
||||
if (applicableHosts == null)
|
||||
@ -574,6 +599,12 @@ namespace XenAdmin.Wizards.PatchingWizard
|
||||
|
||||
private void dataGridViewHosts_CheckBoxClicked(object sender, EventArgs e)
|
||||
{
|
||||
foreach (PatchingHostsDataGridViewRow row in dataGridViewHosts.Rows)
|
||||
{
|
||||
var host = row.Tag as Host ?? Helpers.GetMaster(row.Tag as Pool);
|
||||
if (host != null)
|
||||
EnabledRow(host, SelectedUpdateType, row.Index);
|
||||
}
|
||||
OnPageUpdated();
|
||||
}
|
||||
|
||||
|
77
XenModel/Messages.Designer.cs
generated
77
XenModel/Messages.Designer.cs
generated
@ -11333,10 +11333,10 @@ namespace XenAdmin {
|
||||
public static string DISABLED_VMSS {
|
||||
get {
|
||||
return ResourceManager.GetString("DISABLED_VMSS", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Disabling.
|
||||
/// </summary>
|
||||
public static string DISABLING {
|
||||
@ -13641,10 +13641,10 @@ namespace XenAdmin {
|
||||
public static string ENABLED_VMSS {
|
||||
get {
|
||||
return ResourceManager.GetString("ENABLED_VMSS", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Enabling.
|
||||
/// </summary>
|
||||
public static string ENABLING {
|
||||
@ -15973,10 +15973,10 @@ namespace XenAdmin {
|
||||
public static string GENERAL_PAGE_VMSS_SETTINGS {
|
||||
get {
|
||||
return ResourceManager.GetString("GENERAL_PAGE_VMSS_SETTINGS", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to {0} on {1}.
|
||||
/// </summary>
|
||||
public static string GENERAL_PANEL_UPDATE_KEY {
|
||||
@ -23404,10 +23404,10 @@ namespace XenAdmin {
|
||||
public static string NEW_SCHEDULE {
|
||||
get {
|
||||
return ResourceManager.GetString("NEW_SCHEDULE", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to New Search.
|
||||
/// </summary>
|
||||
public static string NEW_SEARCH {
|
||||
@ -27109,6 +27109,15 @@ namespace XenAdmin {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The same update cannot be applied to {0} and {1} versions of [XenServer].
|
||||
/// </summary>
|
||||
public static string PATCHINGWIZARD_SELECTSERVERPAGE_MIXED_VERSIONS {
|
||||
get {
|
||||
return ResourceManager.GetString("PATCHINGWIZARD_SELECTSERVERPAGE_MIXED_VERSIONS", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Update already applied.
|
||||
/// </summary>
|
||||
@ -36557,15 +36566,6 @@ namespace XenAdmin {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Details:.
|
||||
/// </summary>
|
||||
public static string VMSS_ALERT_DETAILS {
|
||||
get {
|
||||
return ResourceManager.GetString("VMSS_ALERT_DETAILS", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to {0} VMs.
|
||||
/// </summary>
|
||||
public static string VMS_MANY {
|
||||
@ -36574,6 +36574,24 @@ namespace XenAdmin {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to 1 VM.
|
||||
/// </summary>
|
||||
public static string VMS_ONE {
|
||||
get {
|
||||
return ResourceManager.GetString("VMS_ONE", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Details:.
|
||||
/// </summary>
|
||||
public static string VMSS_ALERT_DETAILS {
|
||||
get {
|
||||
return ResourceManager.GetString("VMSS_ALERT_DETAILS", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to {0}. {1}: {2}.
|
||||
/// </summary>
|
||||
@ -36751,15 +36769,6 @@ namespace XenAdmin {
|
||||
public static string VMSS_WIZARD_TITLE {
|
||||
get {
|
||||
return ResourceManager.GetString("VMSS_WIZARD_TITLE", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to 1 VM.
|
||||
/// </summary>
|
||||
public static string VMS_ONE {
|
||||
get {
|
||||
return ResourceManager.GetString("VMS_ONE", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -9362,6 +9362,9 @@ However, there is not enough space to perform the repartitioning, so the current
|
||||
<data name="PATCHINGWIZARD_SELECTSERVERPAGE_HOST_UNREACHABLE" xml:space="preserve">
|
||||
<value>The server is unreachable</value>
|
||||
</data>
|
||||
<data name="PATCHINGWIZARD_SELECTSERVERPAGE_MIXED_VERSIONS" xml:space="preserve">
|
||||
<value>The same update cannot be applied to {0} and {1} versions of [XenServer]</value>
|
||||
</data>
|
||||
<data name="PATCHINGWIZARD_SELECTSERVERPAGE_PATCH_ALREADY_APPLIED" xml:space="preserve">
|
||||
<value>Update already applied</value>
|
||||
</data>
|
||||
|
Loading…
Reference in New Issue
Block a user