mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-25 14:27:26 +01:00
Merge pull request #1070 from GaborApatiNagy/master_batch_new2
CA-216162, CA-215573
This commit is contained in:
commit
abc58d92af
@ -550,7 +550,23 @@ namespace XenAdmin.Core
|
||||
return AllPatches.Distinct().ToList();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public bool AllHostsUpToDate
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.Count == 0)
|
||||
return false;
|
||||
|
||||
foreach (var host in this.Keys)
|
||||
{
|
||||
if (this[host].Count > 0)
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static XenServerVersionAlert NewXenServerVersionAlert(List<XenServerVersion> xenServerVersions)
|
||||
|
@ -341,10 +341,10 @@ namespace XenAdmin.Wizards.PatchingWizard
|
||||
ShowErrors();
|
||||
|
||||
_thisPageIsCompleted = true;
|
||||
|
||||
_cancelEnabled = false;
|
||||
_nextEnabled = true;
|
||||
}
|
||||
|
||||
_cancelEnabled = false;
|
||||
_nextEnabled = true;
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -41,6 +41,7 @@ using XenAdmin.Network;
|
||||
using XenAdmin.Properties;
|
||||
using XenAPI;
|
||||
using XenAdmin.Alerts;
|
||||
using System.Linq;
|
||||
|
||||
namespace XenAdmin.Wizards.PatchingWizard
|
||||
{
|
||||
@ -92,6 +93,8 @@ namespace XenAdmin.Wizards.PatchingWizard
|
||||
base.PageLoaded(direction);
|
||||
try
|
||||
{
|
||||
label1.Text = IsInAutomaticMode ? Messages.PATCHINGWIZARD_SELECTSERVERPAGGE_RUBRIC_AUTOMATIC_MODE : Messages.PATCHINGWIZARD_SELECTSERVERPAGGE_RUBRIC_DEFAULT;
|
||||
|
||||
// catch selected servers, in order to restore selection after the dataGrid is reloaded
|
||||
List<Host> selectedServers = SelectedServers;
|
||||
|
||||
@ -180,20 +183,24 @@ namespace XenAdmin.Wizards.PatchingWizard
|
||||
}
|
||||
|
||||
//check updgrade sequences
|
||||
var us = Updates.GetUpgradeSequence(host.Connection);
|
||||
Updates.UpgradeSequence us = Updates.GetUpgradeSequence(host.Connection);
|
||||
|
||||
if (us.ContainsKey(host))
|
||||
{
|
||||
if (us[host].Count == 0)
|
||||
{
|
||||
row.Enabled = false;
|
||||
row.Cells[3].ToolTipText = Messages.PATCHINGWIZARD_SELECTSERVERPAGE_SERVER_UP_TO_DATE;
|
||||
}
|
||||
}
|
||||
else
|
||||
//if there is a host missing from the upgrade sequence
|
||||
if (host.Connection.Cache.Hosts.Any(h => !us.Keys.Contains(h)))
|
||||
{
|
||||
row.Enabled = false;
|
||||
row.Cells[3].ToolTipText = Messages.PATCHINGWIZARD_SELECTSERVERPAGE_SERVER_NOT_AUTO_UPGRADABLE;
|
||||
row.Cells[3].ToolTipText = Messages.PATCHINGWIZARD_SELECTSERVERPAGE_SERVER_NOT_AUTO_UPGRADABLE;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//if all hosts are up-to-date
|
||||
if (us.AllHostsUpToDate)
|
||||
{
|
||||
row.Enabled = false;
|
||||
row.Cells[3].ToolTipText = Messages.PATCHINGWIZARD_SELECTSERVERPAGE_SERVER_UP_TO_DATE;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
return;
|
||||
|
@ -133,8 +133,7 @@
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="label1.Text" xml:space="preserve">
|
||||
<value>Select one or more servers from the list of available servers.
|
||||
Servers where the selected update cannot be applied appear disabled in this list.</value>
|
||||
<value>rubric</value>
|
||||
</data>
|
||||
<data name=">>label1.Name" xml:space="preserve">
|
||||
<value>label1</value>
|
||||
|
20
XenModel/Messages.Designer.cs
generated
20
XenModel/Messages.Designer.cs
generated
@ -1,7 +1,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18444
|
||||
// Runtime Version:4.0.30319.34209
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@ -26134,6 +26134,24 @@ namespace XenAdmin {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to .
|
||||
/// </summary>
|
||||
public static string PATCHINGWIZARD_SELECTSERVERPAGGE_RUBRIC_AUTOMATIC_MODE {
|
||||
get {
|
||||
return ResourceManager.GetString("PATCHINGWIZARD_SELECTSERVERPAGGE_RUBRIC_AUTOMATIC_MODE", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to .
|
||||
/// </summary>
|
||||
public static string PATCHINGWIZARD_SELECTSERVERPAGGE_RUBRIC_DEFAULT {
|
||||
get {
|
||||
return ResourceManager.GetString("PATCHINGWIZARD_SELECTSERVERPAGGE_RUBRIC_DEFAULT", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Automatic update has finished..
|
||||
/// </summary>
|
||||
|
@ -9033,6 +9033,14 @@ However, there is not enough space to perform the repartitioning, so the current
|
||||
<data name="PATCHINGWIZARD_SELECTSERVERPAGE_TITLE" xml:space="preserve">
|
||||
<value>Select the servers you wish to update</value>
|
||||
</data>
|
||||
<data name="PATCHINGWIZARD_SELECTSERVERPAGGE_RUBRIC_AUTOMATIC_MODE" xml:space="preserve">
|
||||
<value>Select one or more pools or standalone hosts that you want to have automatically updated.
|
||||
Greyed out servers cannot be updated automatically.</value>
|
||||
</data>
|
||||
<data name="PATCHINGWIZARD_SELECTSERVERPAGGE_RUBRIC_DEFAULT" xml:space="preserve">
|
||||
<value>Select one or more servers from the list of available servers.
|
||||
Servers where the selected update cannot be applied appear disabled in this list.</value>
|
||||
</data>
|
||||
<data name="PATCHINGWIZARD_UPDATES_DONE_AUTOMATIC_MODE" xml:space="preserve">
|
||||
<value>Automatic update has finished.</value>
|
||||
</data>
|
||||
|
Loading…
Reference in New Issue
Block a user