mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-25 06:16:37 +01:00
CP-10798: XenCenter work for CAR-1711: Pre-Checks for hotfix installation space
-Fixed code following the code review Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
This commit is contained in:
parent
91789256e8
commit
878229e9a8
@ -58,7 +58,7 @@ namespace XenAdmin.Diagnostics.Problems.HostProblem
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get { return string.Format(Messages.NOT_ENOUGH_SPACE_MESSAGE, Server.Name, Messages.NOT_ENOUGH_SPACE_MESSAGE_INSTALL, patch.Name); }
|
||||
get { return string.Format(Messages.NOT_ENOUGH_SPACE_MESSAGE_INSTALL, Server.Name, patch.Name); }
|
||||
}
|
||||
|
||||
protected override AsyncAction CreateAction(out bool cancelled)
|
||||
@ -107,7 +107,7 @@ namespace XenAdmin.Diagnostics.Problems.HostProblem
|
||||
{
|
||||
get
|
||||
{
|
||||
return base.IsFixable;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -147,7 +147,7 @@ namespace XenAdmin.Actions
|
||||
|
||||
public override string Message
|
||||
{
|
||||
get { return String.Format(Messages.NOT_ENOUGH_SPACE_MESSAGE, host, fileName); }
|
||||
get { return String.Format(Messages.NOT_ENOUGH_SPACE_MESSAGE_UPLOAD, host, fileName); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -160,21 +160,18 @@ namespace XenAdmin.Actions
|
||||
|
||||
public string GetSpaceRequirementsMessage()
|
||||
{
|
||||
string operation = string.Empty;
|
||||
StringBuilder sbMessage = new StringBuilder();
|
||||
|
||||
switch (Operation)
|
||||
{
|
||||
case OperationTypes.install :
|
||||
operation = Messages.NOT_ENOUGH_SPACE_MESSAGE_INSTALL;
|
||||
sbMessage.AppendFormat(Messages.NOT_ENOUGH_SPACE_MESSAGE_INSTALL, Host.Name, UpdateName);
|
||||
break;
|
||||
case OperationTypes.upload :
|
||||
operation = Messages.NOT_ENOUGH_SPACE_MESSAGE_UPLOAD;
|
||||
sbMessage.AppendFormat(Messages.NOT_ENOUGH_SPACE_MESSAGE_UPLOAD, Host.Name, UpdateName);
|
||||
break;
|
||||
}
|
||||
|
||||
StringBuilder sbMessage = new StringBuilder();
|
||||
|
||||
sbMessage.AppendFormat(Messages.NOT_ENOUGH_SPACE_MESSAGE, Host.Name, operation, UpdateName);
|
||||
sbMessage.AppendLine();
|
||||
sbMessage.AppendLine();
|
||||
sbMessage.AppendFormat(Messages.NOT_ENOUGH_SPACE_MESSAGE_REQUIRED_SPACE, Util.DiskSizeString(RequiredDiskSpace));
|
||||
|
31
XenModel/Messages.Designer.cs
generated
31
XenModel/Messages.Designer.cs
generated
@ -10473,14 +10473,14 @@ namespace XenAdmin {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Docker Processes Properties.
|
||||
/// Looks up a localized string similar to Docker Processes.
|
||||
/// </summary>
|
||||
public static string DOCKER_PROCESS_TAB_TITLE {
|
||||
get {
|
||||
return ResourceManager.GetString("DOCKER_PROCESS_TAB_TITLE", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to does not use.
|
||||
/// </summary>
|
||||
@ -17915,34 +17915,34 @@ namespace XenAdmin {
|
||||
return ResourceManager.GetString("LABEL_SYNC", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to the informaiton is not valid.
|
||||
/// Looks up a localized string similar to The information is not available..
|
||||
/// </summary>
|
||||
public static string LAST_REFRESH_FAIL {
|
||||
get {
|
||||
return ResourceManager.GetString("LAST_REFRESH_FAIL", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to loading the information.
|
||||
/// Looks up a localized string similar to Loading....
|
||||
/// </summary>
|
||||
public static string LAST_REFRESH_IN_PROGRESS {
|
||||
get {
|
||||
return ResourceManager.GetString("LAST_REFRESH_IN_PROGRESS", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to last refresh.
|
||||
/// Looks up a localized string similar to Last refresh: {0}.
|
||||
/// </summary>
|
||||
public static string LAST_REFRESH_SUCCESS {
|
||||
get {
|
||||
return ResourceManager.GetString("LAST_REFRESH_SUCCESS", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to was last week.
|
||||
/// </summary>
|
||||
@ -23739,15 +23739,6 @@ namespace XenAdmin {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to There is not enough space on '{0}' to {1} '{2}'..
|
||||
/// </summary>
|
||||
public static string NOT_ENOUGH_SPACE_MESSAGE {
|
||||
get {
|
||||
return ResourceManager.GetString("NOT_ENOUGH_SPACE_MESSAGE", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Space available: {0}.
|
||||
/// </summary>
|
||||
@ -23767,7 +23758,7 @@ namespace XenAdmin {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to install.
|
||||
/// Looks up a localized string similar to There is not enough space on '{0}' to install update '{1}'..
|
||||
/// </summary>
|
||||
public static string NOT_ENOUGH_SPACE_MESSAGE_INSTALL {
|
||||
get {
|
||||
@ -23794,7 +23785,7 @@ namespace XenAdmin {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to upload.
|
||||
/// Looks up a localized string similar to There is not enough space on '{0}' to upload update '{1}'..
|
||||
/// </summary>
|
||||
public static string NOT_ENOUGH_SPACE_MESSAGE_UPLOAD {
|
||||
get {
|
||||
|
@ -8245,9 +8245,6 @@ It is strongly recommended that you Cancel and apply the latest version of the p
|
||||
<data name="NOT_ENOUGH_SPACE_DESCRIPTION" xml:space="preserve">
|
||||
<value>This host does not have enough disk space to install this update</value>
|
||||
</data>
|
||||
<data name="NOT_ENOUGH_SPACE_MESSAGE" xml:space="preserve">
|
||||
<value>There is not enough space on '{0}' to {1} '{2}'.</value>
|
||||
</data>
|
||||
<data name="NOT_ENOUGH_SPACE_MESSAGE_AVAILABLE_SPACE" xml:space="preserve">
|
||||
<value>Space available: {0}</value>
|
||||
</data>
|
||||
@ -8255,7 +8252,7 @@ It is strongly recommended that you Cancel and apply the latest version of the p
|
||||
<value>XenCenter can free up {0} by removing residual update files. Do you wish to proceed with the cleanup?</value>
|
||||
</data>
|
||||
<data name="NOT_ENOUGH_SPACE_MESSAGE_INSTALL" xml:space="preserve">
|
||||
<value>install</value>
|
||||
<value>There is not enough space on '{0}' to install update '{1}'.</value>
|
||||
</data>
|
||||
<data name="NOT_ENOUGH_SPACE_MESSAGE_NOCLEANUP" xml:space="preserve">
|
||||
<value>You need to manually free up more space and try again.</value>
|
||||
@ -8264,7 +8261,7 @@ It is strongly recommended that you Cancel and apply the latest version of the p
|
||||
<value>Space required: {0}</value>
|
||||
</data>
|
||||
<data name="NOT_ENOUGH_SPACE_MESSAGE_UPLOAD" xml:space="preserve">
|
||||
<value>upload</value>
|
||||
<value>There is not enough space on '{0}' to upload update '{1}'.</value>
|
||||
</data>
|
||||
<data name="NOT_IN_A_FOLDER" xml:space="preserve">
|
||||
<value>Not in any folder</value>
|
||||
|
Loading…
Reference in New Issue
Block a user