mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2025-01-20 07:19:18 +01:00
CA-225731: XenCenter: Find the ISO update in the zip file defined in CFU
Moved ISO to InvisibleMessages and Branding Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
This commit is contained in:
parent
225885ac45
commit
27581fa7a1
@ -47,6 +47,7 @@ namespace XenAdmin
|
||||
public const string COMPANY_NAME_SHORT = "[Citrix]";
|
||||
public const string SEARCH = "[xensearch]";
|
||||
public const string UPDATE = "[xsupdate]";
|
||||
public const string UPDATEISO = "[iso]";
|
||||
public const string BACKUP = "[xbk]";
|
||||
public const string CHECK_FOR_UPDATES_URL = "[BRANDING_XENSERVER_UPDATE_URL]";
|
||||
|
||||
@ -68,6 +69,15 @@ namespace XenAdmin
|
||||
}
|
||||
}
|
||||
|
||||
public static string UpdateIso
|
||||
{
|
||||
get
|
||||
{
|
||||
var s = UPDATEISO;
|
||||
return s != "[" + "iso]" ? s : InvisibleMessages.ISO_UPDATE;
|
||||
}
|
||||
}
|
||||
|
||||
public static string CheckForUpdatesUrl
|
||||
{
|
||||
get
|
||||
|
@ -199,7 +199,7 @@ namespace XenAdmin.Wizards.PatchingWizard
|
||||
{
|
||||
if (fileName.EndsWith(UpdateExtension.ToLowerInvariant()))
|
||||
SelectedUpdateType = UpdateType.NewRetail;
|
||||
else if (fileName.EndsWith(".iso"))
|
||||
else if (fileName.EndsWith("." + Branding.UpdateIso))
|
||||
SelectedUpdateType = UpdateType.ISO;
|
||||
else
|
||||
SelectedUpdateType = UpdateType.Existing;
|
||||
@ -341,12 +341,12 @@ namespace XenAdmin.Wizards.PatchingWizard
|
||||
|
||||
private string UpdateExtension
|
||||
{
|
||||
get { return SelectedUpdateType != UpdateType.ISO ? "." + Branding.Update : ".iso"; }
|
||||
get { return SelectedUpdateType != UpdateType.ISO ? "." + Branding.Update : "." + Branding.UpdateIso; }
|
||||
}
|
||||
|
||||
private bool isValidFile(string fileName)
|
||||
{
|
||||
return !string.IsNullOrEmpty(fileName) && File.Exists(fileName) && (fileName.ToLowerInvariant().EndsWith(UpdateExtension.ToLowerInvariant()) || fileName.ToLowerInvariant().EndsWith(".iso"));
|
||||
return !string.IsNullOrEmpty(fileName) && File.Exists(fileName) && (fileName.ToLowerInvariant().EndsWith(UpdateExtension.ToLowerInvariant()) || fileName.ToLowerInvariant().EndsWith(".iso")); //this iso is supplemental pack iso for XS, not branded
|
||||
}
|
||||
|
||||
private void BrowseButton_Click(object sender, EventArgs e)
|
||||
@ -384,7 +384,7 @@ namespace XenAdmin.Wizards.PatchingWizard
|
||||
|
||||
public void AddFile(string fileName)
|
||||
{
|
||||
if (fileName.ToLowerInvariant().EndsWith(UpdateExtension.ToLowerInvariant()) || fileName.ToLowerInvariant().EndsWith(".iso"))
|
||||
if (fileName.ToLowerInvariant().EndsWith(UpdateExtension.ToLowerInvariant()) || fileName.ToLowerInvariant().EndsWith(".iso")) //this iso is supplemental pack iso for XS, not branded
|
||||
{
|
||||
fileNameTextBox.Text = fileName;
|
||||
selectFromDiskRadioButton.Checked = true;
|
||||
|
@ -106,8 +106,8 @@ namespace XenAdmin.Wizards.PatchingWizard
|
||||
string tempFile = Path.GetTempFileName();
|
||||
|
||||
bool isIso = SelectedUpdateType == UpdateType.ISO;
|
||||
|
||||
downloadAction = new DownloadAndUnzipXenServerPatchAction(SelectedUpdateAlert.Name, address, tempFile, isIso ? "iso" : Branding.Update);
|
||||
|
||||
downloadAction = new DownloadAndUnzipXenServerPatchAction(SelectedUpdateAlert.Name, address, tempFile, isIso ? Branding.UpdateIso : Branding.Update);
|
||||
|
||||
if (downloadAction != null)
|
||||
{
|
||||
|
@ -89,7 +89,7 @@ namespace XenAdmin.Wizards.PatchingWizard.PlanActions
|
||||
Uri address = new Uri(patchUri);
|
||||
tempFileName = Path.GetTempFileName();
|
||||
|
||||
var downloadAction = new DownloadAndUnzipXenServerPatchAction(patch.Name, address, tempFileName, Helpers.ElyOrGreater(Connection) ? "iso" : Branding.Update);
|
||||
var downloadAction = new DownloadAndUnzipXenServerPatchAction(patch.Name, address, tempFileName, Helpers.ElyOrGreater(Connection) ? Branding.UpdateIso : Branding.Update);
|
||||
|
||||
if (downloadAction != null)
|
||||
{
|
||||
|
9
XenModel/InvisibleMessages.Designer.cs
generated
9
XenModel/InvisibleMessages.Designer.cs
generated
@ -150,6 +150,15 @@ namespace XenAdmin {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to iso.
|
||||
/// </summary>
|
||||
public static string ISO_UPDATE {
|
||||
get {
|
||||
return ResourceManager.GetString("ISO_UPDATE", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to http://www.citrix.com/xenserverenterprise.
|
||||
/// </summary>
|
||||
|
@ -249,4 +249,7 @@
|
||||
<data name="UPSELL_LEARNMOREURL_AD" xml:space="preserve">
|
||||
<value>http://www.citrix.com/xenserver/le/features/ad</value>
|
||||
</data>
|
||||
<data name="ISO_UPDATE" xml:space="preserve">
|
||||
<value>iso</value>
|
||||
</data>
|
||||
</root>
|
Loading…
Reference in New Issue
Block a user