mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2025-01-20 07:19:18 +01:00
Merge pull request #811 from MihaelaStoica/CP-15399
CP-15399: Move check for updates url to Branding.cs
This commit is contained in:
commit
ce80c8a9a7
@ -46,6 +46,31 @@ namespace XenAdmin
|
||||
public const string PRODUCT_BRAND = "@BRANDING_PRODUCT_BRAND@";
|
||||
public const string COMPANY_NAME_SHORT = "@BRANDING_COMPANY_NAME_SHORT@";
|
||||
public const string SEARCH = "@BRANDING_SEARCH@";
|
||||
public const string UPDATE = "." + "@BRANDING_UPDATE@";
|
||||
public const string UPDATE = "@BRANDING_UPDATE@";
|
||||
public const string CHECK_FOR_UPDATES_URL = "@BRANDING_XENSERVER_UPDATE_URL@";
|
||||
|
||||
public static string Search
|
||||
{
|
||||
get
|
||||
{
|
||||
return SEARCH != "@BRANDING_SEARCH@" ? SEARCH : InvisibleMessages.XEN_SEARCH;
|
||||
}
|
||||
}
|
||||
|
||||
public static string Update
|
||||
{
|
||||
get
|
||||
{
|
||||
return UPDATE != "@BRANDING_UPDATE@" ? UPDATE : InvisibleMessages.XEN_UPDATE;
|
||||
}
|
||||
}
|
||||
|
||||
public static string CheckForUpdatesUrl
|
||||
{
|
||||
get
|
||||
{
|
||||
return CHECK_FOR_UPDATES_URL != "@BRANDING_XENSERVER_UPDATE_URL@" ? CHECK_FOR_UPDATES_URL : InvisibleMessages.XENSERVER_UPDATE_URL;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -88,10 +88,10 @@ namespace XenAdmin.Commands
|
||||
oldDir = Directory.GetCurrentDirectory();
|
||||
OpenFileDialog dialog = new OpenFileDialog();
|
||||
dialog.AddExtension = true;
|
||||
dialog.Filter = string.Format("{0} (*." + Branding.SEARCH + ")|*." + Branding.SEARCH, Messages.XENSEARCH_SAVED_SEARCH);
|
||||
dialog.Filter = string.Format(Messages.XENSEARCH_SAVED_SEARCH, Branding.Search);
|
||||
dialog.FilterIndex = 0;
|
||||
dialog.RestoreDirectory = true;
|
||||
dialog.DefaultExt = Branding.SEARCH;
|
||||
dialog.DefaultExt = Branding.Search;
|
||||
dialog.CheckPathExists = false;
|
||||
|
||||
if (dialog.ShowDialog(Parent) == DialogResult.OK)
|
||||
@ -108,7 +108,7 @@ namespace XenAdmin.Commands
|
||||
{
|
||||
log.InfoFormat("Importing search from '{0}'", filename);
|
||||
|
||||
if (filename.EndsWith("." + Branding.SEARCH) && MainWindowCommandInterface.DoSearch(filename))
|
||||
if (filename.EndsWith("." + Branding.Search) && MainWindowCommandInterface.DoSearch(filename))
|
||||
{
|
||||
log.InfoFormat("Imported search from '{0}' successfully.", filename);
|
||||
}
|
||||
@ -119,7 +119,7 @@ namespace XenAdmin.Commands
|
||||
new ThreeButtonDialog(
|
||||
new ThreeButtonDialog.Details(
|
||||
SystemIcons.Error,
|
||||
String.Format(Messages.UNABLE_TO_IMPORT_SEARCH, filename),
|
||||
String.Format(Messages.UNABLE_TO_IMPORT_SEARCH, filename, Branding.Search),
|
||||
Messages.XENCENTER)).ShowDialog(Parent);
|
||||
}
|
||||
}
|
||||
|
@ -196,7 +196,8 @@ namespace XenAdmin.Core
|
||||
DownloadUpdatesXmlAction action = new DownloadUpdatesXmlAction(
|
||||
Properties.Settings.Default.AllowXenCenterUpdates || force,
|
||||
Properties.Settings.Default.AllowXenServerUpdates || force,
|
||||
Properties.Settings.Default.AllowPatchesUpdates || force);
|
||||
Properties.Settings.Default.AllowPatchesUpdates || force,
|
||||
Branding.CheckForUpdatesUrl);
|
||||
{
|
||||
action.Completed += actionCompleted;
|
||||
}
|
||||
|
@ -227,7 +227,7 @@ namespace XenAdmin
|
||||
ConnectionsManager.XenConnections.Clear();
|
||||
ConnectionsManager.History.Clear();
|
||||
|
||||
Search.InitSearch();
|
||||
Search.InitSearch(Branding.Search);
|
||||
TreeSearch.InitSearch();
|
||||
|
||||
ArgType argType = ArgType.None;
|
||||
|
@ -290,8 +290,7 @@ namespace XenAdmin.TabPages
|
||||
using (SaveFileDialog dialog = new SaveFileDialog())
|
||||
{
|
||||
dialog.AddExtension = true;
|
||||
dialog.Filter = string.Format("{0} (*." + Branding.SEARCH + ")|*." + Branding.SEARCH,
|
||||
Messages.XENSEARCH_SAVED_SEARCH);
|
||||
dialog.Filter = string.Format(Messages.XENSEARCH_SAVED_SEARCH, Branding.Search);
|
||||
dialog.FilterIndex = 0;
|
||||
dialog.RestoreDirectory = true;
|
||||
dialog.DefaultExt = Branding.SEARCH;
|
||||
|
@ -145,7 +145,7 @@ namespace XenAdmin.Wizards.PatchingWizard
|
||||
{
|
||||
if (isValidFile())
|
||||
{
|
||||
if (fileName.EndsWith(Branding.UPDATE))
|
||||
if (fileName.EndsWith(UpdateExtension))
|
||||
SelectedUpdateType = UpdateType.NewRetail;
|
||||
else if (fileName.EndsWith(".iso"))
|
||||
SelectedUpdateType = UpdateType.NewSuppPack;
|
||||
@ -258,10 +258,15 @@ namespace XenAdmin.Wizards.PatchingWizard
|
||||
return false;
|
||||
}
|
||||
|
||||
private string UpdateExtension
|
||||
{
|
||||
get { return "." + Branding.Update; }
|
||||
}
|
||||
|
||||
private bool isValidFile()
|
||||
{
|
||||
var fileName = fileNameTextBox.Text;
|
||||
return !string.IsNullOrEmpty(fileName) && File.Exists(fileName) && (fileName.EndsWith(Branding.UPDATE) || fileName.EndsWith(".iso"));
|
||||
return !string.IsNullOrEmpty(fileName) && File.Exists(fileName) && (fileName.EndsWith(UpdateExtension) || fileName.EndsWith(".iso"));
|
||||
}
|
||||
|
||||
|
||||
@ -285,7 +290,7 @@ namespace XenAdmin.Wizards.PatchingWizard
|
||||
OpenFileDialog dlg = new OpenFileDialog();
|
||||
dlg.Multiselect = false;
|
||||
dlg.ShowReadOnly = false;
|
||||
dlg.Filter = Messages.PATCHINGWIZARD_SELECTPATCHPAGE_UPDATESEXT;
|
||||
dlg.Filter = string.Format(Messages.PATCHINGWIZARD_SELECTPATCHPAGE_UPDATESEXT, Branding.Update);
|
||||
dlg.FilterIndex = 0;
|
||||
dlg.CheckFileExists = true;
|
||||
dlg.ShowHelp = false;
|
||||
@ -305,14 +310,15 @@ namespace XenAdmin.Wizards.PatchingWizard
|
||||
|
||||
public void AddFile(string fileName)
|
||||
{
|
||||
if (fileName.EndsWith(Branding.UPDATE) || fileName.EndsWith(".iso"))
|
||||
if (fileName.EndsWith(UpdateExtension) || fileName.EndsWith(".iso"))
|
||||
{
|
||||
fileNameTextBox.Text = fileName;
|
||||
selectFromDiskRadioButton.Checked = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
new ThreeButtonDialog(new ThreeButtonDialog.Details(SystemIcons.Error, Messages.UPDATES_WIZARD_NOTVALID_EXTENSION, Messages.UPDATES)).ShowDialog(this);
|
||||
new ThreeButtonDialog(new ThreeButtonDialog.Details(
|
||||
SystemIcons.Error, string.Format(Messages.UPDATES_WIZARD_NOTVALID_EXTENSION, Branding.Update), Messages.UPDATES)).ShowDialog(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -514,7 +514,7 @@ namespace XenAdmin.Wizards.PatchingWizard
|
||||
if (!canDownload)
|
||||
{
|
||||
var msgtemplate = SelectedExistingPatch.host_patches.Count > 0 ? Messages.PATCH_DOWNLOAD_FAILED_MORE_INFO : Messages.PATCH_DOWNLOAD_FAILED_MORE_INFO_NOT_APPLIED;
|
||||
var msg = string.Format(msgtemplate, SelectedExistingPatch.name_label, SelectedExistingPatch.Connection.Name);
|
||||
var msg = string.Format(msgtemplate, SelectedExistingPatch.name_label, SelectedExistingPatch.Connection.Name, Branding.Update);
|
||||
new ThreeButtonDialog(
|
||||
new ThreeButtonDialog.Details(SystemIcons.Error, msg))
|
||||
.ShowDialog(this);
|
||||
|
@ -68,8 +68,8 @@ namespace XenAdminTests.WizardTests.updatesState_xml
|
||||
else
|
||||
{
|
||||
MW(TestUtils.GetRadioButton(wizard, "PatchingWizard_SelectPatchPage.selectFromDiskRadioButton").Select);
|
||||
MW(() => TestUtils.GetTextBox(wizard, "PatchingWizard_SelectPatchPage.fileNameTextBox").Text =
|
||||
TestResource("succeed" + XenAdmin.Branding.UPDATE));
|
||||
MW(() => TestUtils.GetTextBox(wizard, "PatchingWizard_SelectPatchPage.fileNameTextBox").Text =
|
||||
TestResource("succeed." + XenAdmin.Branding.Update));
|
||||
}
|
||||
}
|
||||
else if (pageName == "Select Servers")
|
||||
|
@ -70,8 +70,9 @@ namespace XenAdmin.Actions
|
||||
private readonly bool _checkForXenCenter;
|
||||
private readonly bool _checkForServerVersion;
|
||||
private readonly bool _checkForPatches;
|
||||
private readonly string _checkForUpdatesUrl;
|
||||
|
||||
public DownloadUpdatesXmlAction(bool checkForXenCenter, bool checkForServerVersion, bool checkForPatches)
|
||||
public DownloadUpdatesXmlAction(bool checkForXenCenter, bool checkForServerVersion, bool checkForPatches, string checkForUpdatesUrl)
|
||||
: base(null, "_get_updates", "_get_updates", true)
|
||||
{
|
||||
XenServerPatches = new List<XenServerPatch>();
|
||||
@ -81,13 +82,18 @@ namespace XenAdmin.Actions
|
||||
_checkForXenCenter = checkForXenCenter;
|
||||
_checkForServerVersion = checkForServerVersion;
|
||||
_checkForPatches = checkForPatches;
|
||||
_checkForUpdatesUrl = string.IsNullOrEmpty(checkForUpdatesUrl) ? InvisibleMessages.XENSERVER_UPDATE_URL : checkForUpdatesUrl;
|
||||
}
|
||||
|
||||
public DownloadUpdatesXmlAction(bool checkForXenCenter, bool checkForServerVersion, bool checkForPatches)
|
||||
: this(checkForXenCenter, checkForServerVersion, checkForPatches, null)
|
||||
{ }
|
||||
|
||||
protected override void Run()
|
||||
{
|
||||
this.Description = Messages.AVAILABLE_UPDATES_SEARCHING;
|
||||
|
||||
XmlDocument xdoc = FetchCheckForUpdatesXml(InvisibleMessages.XENSERVER_UPDATE_URL);
|
||||
XmlDocument xdoc = FetchCheckForUpdatesXml(_checkForUpdatesUrl);
|
||||
|
||||
GetXenCenterVersions(xdoc);
|
||||
GetXenServerPatches(xdoc);
|
||||
|
10
XenModel/InvisibleMessages.Designer.cs
generated
10
XenModel/InvisibleMessages.Designer.cs
generated
@ -1,7 +1,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.34209
|
||||
// Runtime Version:4.0.30319.18444
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@ -176,6 +176,8 @@ namespace XenAdmin {
|
||||
return ResourceManager.GetString("LOG_FILENAME", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to -mapid {0} {1}.
|
||||
/// </summary>
|
||||
public static string MAINWINDOW_HELP_PARAMS {
|
||||
@ -401,7 +403,7 @@ namespace XenAdmin {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to @BRANDING_SEARCH@.
|
||||
/// Looks up a localized string similar to xensearch.
|
||||
/// </summary>
|
||||
public static string XEN_SEARCH {
|
||||
get {
|
||||
@ -410,7 +412,7 @@ namespace XenAdmin {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to @BRANDING_UPDATE@.
|
||||
/// Looks up a localized string similar to xsupdate.
|
||||
/// </summary>
|
||||
public static string XEN_UPDATE {
|
||||
get {
|
||||
@ -428,7 +430,7 @@ namespace XenAdmin {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to @BRANDING_XENSERVER_UPDATE_URL@.
|
||||
/// Looks up a localized string similar to http://updates.xensource.com/XenServer/updates.xml.
|
||||
/// </summary>
|
||||
public static string XENSERVER_UPDATE_URL {
|
||||
get {
|
||||
|
@ -175,7 +175,7 @@
|
||||
<value>http://citrix.com/English/aboutCitrix/legal/privacyStatement.asp?ntref=hp_nav_US</value>
|
||||
</data>
|
||||
<data name="XEN_SEARCH" xml:space="preserve">
|
||||
<value>@BRANDING_SEARCH@</value>
|
||||
<value>xensearch</value>
|
||||
</data>
|
||||
<data name="SUPPORT_URL" xml:space="preserve">
|
||||
<value>http://support.citrix.com/</value>
|
||||
@ -235,9 +235,9 @@
|
||||
<value>http://www.citrix.com/TryXenDesktop</value>
|
||||
</data>
|
||||
<data name="XEN_UPDATE" xml:space="preserve">
|
||||
<value>@BRANDING_UPDATE@</value>
|
||||
<value>xsupdate</value>
|
||||
</data>
|
||||
<data name="XENSERVER_UPDATE_URL" xml:space="preserve">
|
||||
<value>@BRANDING_XENSERVER_UPDATE_URL@</value>
|
||||
<value>http://updates.xensource.com/XenServer/updates.xml</value>
|
||||
</data>
|
||||
</root>
|
@ -178,7 +178,7 @@
|
||||
<value>http://citrix.com/English/aboutCitrix/legal/privacyStatement.asp?ntref=hp_nav_US</value>
|
||||
</data>
|
||||
<data name="XEN_SEARCH" xml:space="preserve">
|
||||
<value>@BRANDING_SEARCH@</value>
|
||||
<value>xensearch</value>
|
||||
</data>
|
||||
<data name="SUPPORT_URL" xml:space="preserve">
|
||||
<value>http://support.citrix.com/</value>
|
||||
@ -238,9 +238,9 @@
|
||||
<value>http://www.citrix.com/TryXenDesktop</value>
|
||||
</data>
|
||||
<data name="XEN_UPDATE" xml:space="preserve">
|
||||
<value>@BRANDING_UPDATE@</value>
|
||||
<value>xsupdate</value>
|
||||
</data>
|
||||
<data name="XENSERVER_UPDATE_URL" xml:space="preserve">
|
||||
<value>@BRANDING_XENSERVER_UPDATE_URL@</value>
|
||||
<value>http://updates.xensource.com/XenServer/updates.xml</value>
|
||||
</data>
|
||||
</root>
|
@ -175,7 +175,7 @@
|
||||
<value>http://citrix.com/English/aboutCitrix/legal/privacyStatement.asp?ntref=hp_nav_US</value>
|
||||
</data>
|
||||
<data name="XEN_SEARCH" xml:space="preserve">
|
||||
<value>@BRANDING_SEARCH@</value>
|
||||
<value>xensearch</value>
|
||||
</data>
|
||||
<data name="SUPPORT_URL" xml:space="preserve">
|
||||
<value>http://support.citrix.com/</value>
|
||||
@ -235,9 +235,9 @@
|
||||
<value>http://www.citrix.com/TryXenDesktop</value>
|
||||
</data>
|
||||
<data name="XEN_UPDATE" xml:space="preserve">
|
||||
<value>@BRANDING_UPDATE@</value>
|
||||
<value>xsupdate</value>
|
||||
</data>
|
||||
<data name="XENSERVER_UPDATE_URL" xml:space="preserve">
|
||||
<value>@BRANDING_XENSERVER_UPDATE_URL@</value>
|
||||
<value>http://updates.xensource.com/XenServer/updates.xml</value>
|
||||
</data>
|
||||
</root>
|
14
XenModel/Messages.Designer.cs
generated
14
XenModel/Messages.Designer.cs
generated
@ -1,7 +1,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.34209
|
||||
// Runtime Version:4.0.30319.18444
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@ -25230,7 +25230,7 @@ namespace XenAdmin {
|
||||
///
|
||||
///The update is installed on '{1}', but the update installation file may have since been deleted.
|
||||
///
|
||||
///Upload the update from an .@BRANDING_UPDATE@ file instead..
|
||||
///Upload the update from an .{2} file instead..
|
||||
/// </summary>
|
||||
public static string PATCH_DOWNLOAD_FAILED_MORE_INFO {
|
||||
get {
|
||||
@ -25243,7 +25243,7 @@ namespace XenAdmin {
|
||||
///
|
||||
///The update has previously been uploaded to '{1}', but the update installation file may have since been deleted.
|
||||
///
|
||||
///Upload the update from an .@BRANDING_UPDATE@ file instead..
|
||||
///Upload the update from an .{2} file instead..
|
||||
/// </summary>
|
||||
public static string PATCH_DOWNLOAD_FAILED_MORE_INFO_NOT_APPLIED {
|
||||
get {
|
||||
@ -25707,7 +25707,7 @@ namespace XenAdmin {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to @BRANDING_SERVER@ Updates and Supplemental Packs (*.@BRANDING_UPDATE@, *.iso)|*.@BRANDING_UPDATE@;*.iso.
|
||||
/// Looks up a localized string similar to @BRANDING_SERVER@ Updates and Supplemental Packs (*.{0}, *.iso)|*.{0};*.iso.
|
||||
/// </summary>
|
||||
public static string PATCHINGWIZARD_SELECTPATCHPAGE_UPDATESEXT {
|
||||
get {
|
||||
@ -31609,7 +31609,7 @@ namespace XenAdmin {
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to @BRANDING_BRAND_CONSOLE@ was unable to import a saved search from file '{0}'.
|
||||
///
|
||||
///Verify that the file is a valid @BRANDING_SEARCH@ export..
|
||||
///Verify that the file is a valid {1} export..
|
||||
/// </summary>
|
||||
public static string UNABLE_TO_IMPORT_SEARCH {
|
||||
get {
|
||||
@ -32403,7 +32403,7 @@ namespace XenAdmin {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The selected file does not have a valid extension. Valid extensions are: *.@BRANDING_UPDATE@ and *.iso.
|
||||
/// Looks up a localized string similar to The selected file does not have a valid extension. Valid extensions are: *.{0} and *.iso.
|
||||
/// </summary>
|
||||
public static string UPDATES_WIZARD_NOTVALID_EXTENSION {
|
||||
get {
|
||||
@ -37026,7 +37026,7 @@ namespace XenAdmin {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Saved Searches.
|
||||
/// Looks up a localized string similar to Saved Searches (*.{0})|*.{0}.
|
||||
/// </summary>
|
||||
public static string XENSEARCH_SAVED_SEARCH {
|
||||
get {
|
||||
|
@ -8423,7 +8423,7 @@ VM が再起動したら、[@BRANDING_PRODUCT_BRAND@ Tools のインストール
|
||||
<value>既存のアップデートを選択するか、新たにアップロードします</value>
|
||||
</data>
|
||||
<data name="PATCHINGWIZARD_SELECTPATCHPAGE_UPDATESEXT" xml:space="preserve">
|
||||
<value>@BRANDING_SERVER@ アップデート|*.@BRANDING_UPDATE@;*.xsoem</value>
|
||||
<value>@BRANDING_SERVER@ アップデート|*.{0};*.xsoem</value>
|
||||
</data>
|
||||
<data name="PATCHINGWIZARD_SELECTSERVERPAGE_HOST_UNLICENSED" xml:space="preserve">
|
||||
<value>Subscription Advantage が必要です</value>
|
||||
@ -10409,7 +10409,7 @@ VM が再起動したら、[@BRANDING_PRODUCT_BRAND@ Tools のインストール
|
||||
<data name="UNABLE_TO_IMPORT_SEARCH" xml:space="preserve">
|
||||
<value>ファイル '{0}' に保存されている検索をインポートできません。
|
||||
|
||||
このファイルが有効な @BRANDING_SEARCH@ ファイルであることを確認してください。</value>
|
||||
このファイルが有効な {1} ファイルであることを確認してください。</value>
|
||||
</data>
|
||||
<data name="UNCOMPRESS_APPLIANCE_DESCRIPTION" xml:space="preserve">
|
||||
<value>ファイルが '{0}' に圧縮解除されます。元のファイル '{1}' は削除されます。続行しますか?</value>
|
||||
@ -10618,7 +10618,7 @@ VM が再起動したら、[@BRANDING_PRODUCT_BRAND@ Tools のインストール
|
||||
<value>{0}: VM '{1}' はローカル ストレージを使用しているため移行できません。</value>
|
||||
</data>
|
||||
<data name="UPDATES_WIZARD_NOTVALID_EXTENSION" xml:space="preserve">
|
||||
<value>選択したファイルには有効な拡張子がありません。有効な拡張子: *.xsoem および *.@BRANDING_UPDATE@</value>
|
||||
<value>選択したファイルには有効な拡張子がありません。有効な拡張子: *.xsoem および *.{0}</value>
|
||||
</data>
|
||||
<data name="UPDATES_WIZARD_NOT_ENOUGH_SPACE" xml:space="preserve">
|
||||
<value>要求された VM を一時停止するために必要な空き容量がこのストレージ リポジトリにありません。</value>
|
||||
@ -12106,7 +12106,7 @@ VM が再起動したら、[@BRANDING_PRODUCT_BRAND@ Tools のインストール
|
||||
<value>新しい @BRANDING_BRAND_CONSOLE@ が使用可能</value>
|
||||
</data>
|
||||
<data name="XENSEARCH_SAVED_SEARCH" xml:space="preserve">
|
||||
<value>保存済みの検索</value>
|
||||
<value>保存済みの検索 (*.{0})|*.{0}</value>
|
||||
</data>
|
||||
<data name="XENSERVER" xml:space="preserve">
|
||||
<value>@BRANDING_SERVER@</value>
|
||||
|
@ -8888,7 +8888,7 @@ However, there is not enough space to perform the repartitioning, so the current
|
||||
<value>Choose an existing update to install or upload a new one</value>
|
||||
</data>
|
||||
<data name="PATCHINGWIZARD_SELECTPATCHPAGE_UPDATESEXT" xml:space="preserve">
|
||||
<value>@BRANDING_SERVER@ Updates and Supplemental Packs (*.@BRANDING_UPDATE@, *.iso)|*.@BRANDING_UPDATE@;*.iso</value>
|
||||
<value>@BRANDING_SERVER@ Updates and Supplemental Packs (*.{0}, *.iso)|*.{0};*.iso</value>
|
||||
</data>
|
||||
<data name="PATCHINGWIZARD_SELECTSERVERPAGE_CANNOT_INSTALL_SUPP_PACKS" xml:space="preserve">
|
||||
<value>Cannot install supplemental packs on this @BRANDING_SERVER@ version</value>
|
||||
@ -8971,14 +8971,14 @@ Installation size: {1}</value>
|
||||
|
||||
The update is installed on '{1}', but the update installation file may have since been deleted.
|
||||
|
||||
Upload the update from an .@BRANDING_UPDATE@ file instead.</value>
|
||||
Upload the update from an .{2} file instead.</value>
|
||||
</data>
|
||||
<data name="PATCH_DOWNLOAD_FAILED_MORE_INFO_NOT_APPLIED" xml:space="preserve">
|
||||
<value>Failed to download the update {0} from '{1}'.
|
||||
|
||||
The update has previously been uploaded to '{1}', but the update installation file may have since been deleted.
|
||||
|
||||
Upload the update from an .@BRANDING_UPDATE@ file instead.</value>
|
||||
Upload the update from an .{2} file instead.</value>
|
||||
</data>
|
||||
<data name="PATCH_EXPANDED_DESCRIPTION" xml:space="preserve">
|
||||
<value>{0}
|
||||
@ -10967,7 +10967,7 @@ Refer to the "@BRANDING_PRODUCT_BRAND@ Administrator's Guide" for instructions o
|
||||
<data name="UNABLE_TO_IMPORT_SEARCH" xml:space="preserve">
|
||||
<value>@BRANDING_BRAND_CONSOLE@ was unable to import a saved search from file '{0}'.
|
||||
|
||||
Verify that the file is a valid @BRANDING_SEARCH@ export.</value>
|
||||
Verify that the file is a valid {1} export.</value>
|
||||
</data>
|
||||
<data name="UNCOMPRESS_APPLIANCE_DESCRIPTION" xml:space="preserve">
|
||||
<value>@BRANDING_BRAND_CONSOLE@ will uncompress the file to '{0}'. After uncompression the original file '{1}' will be deleted. Continue?</value>
|
||||
@ -11179,7 +11179,7 @@ Check your settings and try again.</value>
|
||||
<value>{0}: The VM '{1}' uses local storage and cannot be migrated.</value>
|
||||
</data>
|
||||
<data name="UPDATES_WIZARD_NOTVALID_EXTENSION" xml:space="preserve">
|
||||
<value>The selected file does not have a valid extension. Valid extensions are: *.@BRANDING_UPDATE@ and *.iso</value>
|
||||
<value>The selected file does not have a valid extension. Valid extensions are: *.{0} and *.iso</value>
|
||||
</data>
|
||||
<data name="UPDATES_WIZARD_NOT_ENOUGH_SPACE" xml:space="preserve">
|
||||
<value>This storage repository does not have enough space to suspend the required VMs.</value>
|
||||
@ -12796,7 +12796,7 @@ Are you sure you want to enable automated power management for this Host?</value
|
||||
<value>Newer @BRANDING_BRAND_CONSOLE@ Available</value>
|
||||
</data>
|
||||
<data name="XENSEARCH_SAVED_SEARCH" xml:space="preserve">
|
||||
<value>Saved Searches</value>
|
||||
<value>Saved Searches (*.{0})|*.{0}</value>
|
||||
</data>
|
||||
<data name="XENSERVER" xml:space="preserve">
|
||||
<value>@BRANDING_SERVER@</value>
|
||||
|
@ -8426,7 +8426,7 @@ VM 克隆使用文件管理器的快照和克隆功能来实现高性能,并
|
||||
<value>选择现有更新进行安装,或上载新更新</value>
|
||||
</data>
|
||||
<data name="PATCHINGWIZARD_SELECTPATCHPAGE_UPDATESEXT" xml:space="preserve">
|
||||
<value>@BRANDING_SERVER@ 更新|*.@BRANDING_UPDATE@;*.xsoem</value>
|
||||
<value>@BRANDING_SERVER@ 更新|*.{0};*.xsoem</value>
|
||||
</data>
|
||||
<data name="PATCHINGWIZARD_SELECTSERVERPAGE_HOST_UNLICENSED" xml:space="preserve">
|
||||
<value>需要专享升级服务</value>
|
||||
@ -10412,7 +10412,7 @@ VM 克隆使用文件管理器的快照和克隆功能来实现高性能,并
|
||||
<data name="UNABLE_TO_IMPORT_SEARCH" xml:space="preserve">
|
||||
<value>@BRANDING_BRAND_CONSOLE@ 无法从文件 {0} 中导入保存的搜索。
|
||||
|
||||
请确认该文件属于有效的 @BRANDING_SEARCH@ 导出。</value>
|
||||
请确认该文件属于有效的 {1} 导出。</value>
|
||||
</data>
|
||||
<data name="UNCOMPRESS_APPLIANCE_DESCRIPTION" xml:space="preserve">
|
||||
<value>@BRANDING_BRAND_CONSOLE@ 将文件解压到“{0}”。 解压后,将删除原始文件“{1}”。是否继续?</value>
|
||||
@ -10621,7 +10621,7 @@ VM 克隆使用文件管理器的快照和克隆功能来实现高性能,并
|
||||
<value>{0}: VM {1} 使用本地存储,无法迁移。</value>
|
||||
</data>
|
||||
<data name="UPDATES_WIZARD_NOTVALID_EXTENSION" xml:space="preserve">
|
||||
<value>所选文件的扩展名无效。有效扩展名为: *.xsoem 和 *.@BRANDING_UPDATE@</value>
|
||||
<value>所选文件的扩展名无效。有效扩展名为: *.xsoem 和 *.{0}</value>
|
||||
</data>
|
||||
<data name="UPDATES_WIZARD_NOT_ENOUGH_SPACE" xml:space="preserve">
|
||||
<value>此存储库空间不足,无法挂起所需的 VM。</value>
|
||||
@ -12109,7 +12109,7 @@ VM 克隆使用文件管理器的快照和克隆功能来实现高性能,并
|
||||
<value>更新的 @BRANDING_BRAND_CONSOLE@ 可用</value>
|
||||
</data>
|
||||
<data name="XENSEARCH_SAVED_SEARCH" xml:space="preserve">
|
||||
<value>保存的搜索</value>
|
||||
<value>保存的搜索 (*.{0})|*.{0}</value>>
|
||||
</data>
|
||||
<data name="XENSERVER" xml:space="preserve">
|
||||
<value>@BRANDING_SERVER@</value>
|
||||
|
@ -295,7 +295,7 @@ namespace XenAdmin.XenSearch
|
||||
if (uuid == null)
|
||||
uuid = System.Guid.NewGuid().ToString();
|
||||
|
||||
String key = InvisibleMessages.XEN_SEARCH + ".Search-" + uuid;
|
||||
String key = SearchPrefix + uuid;
|
||||
String value = GetXML();
|
||||
|
||||
if (connection == null)
|
||||
@ -339,7 +339,7 @@ namespace XenAdmin.XenSearch
|
||||
|
||||
public void Delete()
|
||||
{
|
||||
String key = InvisibleMessages.XEN_SEARCH + ".Search-" + uuid;
|
||||
String key = SearchPrefix + uuid;
|
||||
|
||||
foreach (IXenConnection connection in ConnectionsManager.XenConnectionsCopy)
|
||||
{
|
||||
@ -672,6 +672,7 @@ namespace XenAdmin.XenSearch
|
||||
}
|
||||
|
||||
private static Dictionary<String, Search> searches =new Dictionary<string, Search>();
|
||||
public static string BrandedSearchKey { get; private set; }
|
||||
public static event Action SearchesChanged;
|
||||
|
||||
private static void OnSearchesChanged()
|
||||
@ -693,9 +694,10 @@ namespace XenAdmin.XenSearch
|
||||
}
|
||||
}
|
||||
|
||||
public static void InitSearch()
|
||||
public static void InitSearch(string brandedSearchKey)
|
||||
{
|
||||
searches = new Dictionary<String, Search>();
|
||||
BrandedSearchKey = brandedSearchKey;
|
||||
|
||||
InitDefaultSearches();
|
||||
|
||||
@ -714,10 +716,14 @@ namespace XenAdmin.XenSearch
|
||||
SynchroniseSearches();
|
||||
}
|
||||
|
||||
private static string SearchPrefix
|
||||
{
|
||||
get { return BrandedSearchKey + ".Search-"; }
|
||||
}
|
||||
|
||||
private static void SynchroniseSearches()
|
||||
{
|
||||
Dictionary<String, Search> localSearches = new Dictionary<String, Search>();
|
||||
string SearchPrefix = InvisibleMessages.XEN_SEARCH + ".Search-";
|
||||
foreach (IXenConnection connection in ConnectionsManager.XenConnectionsCopy)
|
||||
{
|
||||
connection.Cache.RegisterBatchCollectionChanged<Pool>(Pool_BatchCollectionChanged);
|
||||
|
@ -307,7 +307,7 @@ namespace XenAdmin.XenSearch
|
||||
document.XmlResolver = new BasicXMLResolver();
|
||||
|
||||
document.AppendChild(document.CreateXmlDeclaration("1.0", Encoding.UTF8.WebName, null));
|
||||
document.AppendChild(document.CreateDocumentType(InvisibleMessages.XEN_SEARCH, "-//" + InvisibleMessages.XEN_SEARCH.ToUpper() + "//DTD " + InvisibleMessages.XEN_SEARCH.ToUpper() + " 1//EN", InvisibleMessages.XEN_SEARCH + "-1.dtd", null));
|
||||
document.AppendChild(document.CreateDocumentType(Search.BrandedSearchKey, "-//" + Search.BrandedSearchKey.ToUpper() + "//DTD " + Search.BrandedSearchKey.ToUpper() + " 1//EN", Search.BrandedSearchKey + "-1.dtd", null));
|
||||
|
||||
XmlNode node = document.CreateElement("Searches");
|
||||
AddAttribute(document, node, "xmlns", xmlns);
|
||||
|
Loading…
Reference in New Issue
Block a user