CP-39817: Removed the option to check for server new versions since it is not relevant any longer.

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
This commit is contained in:
Konstantina Chremmou 2022-06-08 15:51:44 +01:00
parent 7deb50ee79
commit 414eff9c2f
12 changed files with 17 additions and 103 deletions

View File

@ -75,7 +75,6 @@ namespace XenAdmin.Core
internal struct CFU
{
public bool AllowXenCenterUpdates;
public bool AllowXenServerUpdates;
}
internal struct Proxy
@ -130,11 +129,7 @@ namespace XenAdmin.Core
},
Settings = new XenCenterSettings
{
CFU = new CFU
{
AllowXenCenterUpdates = Properties.Settings.Default.AllowXenCenterUpdates,
AllowXenServerUpdates = Properties.Settings.Default.AllowXenServerUpdates
},
CFU = new CFU {AllowXenCenterUpdates = Properties.Settings.Default.AllowXenCenterUpdates},
Proxy = new Proxy
{
UseProxy = (HTTPHelper.ProxyStyle) Properties.Settings.Default.ProxySetting == HTTPHelper.ProxyStyle.SpecifiedProxy,

View File

@ -94,13 +94,9 @@ namespace XenAdmin.Core
if (Helpers.CommonCriteriaCertificationRelease)
return;
if (Properties.Settings.Default.AllowXenCenterUpdates ||
Properties.Settings.Default.AllowXenServerUpdates ||
force || forceRefresh)
if (Properties.Settings.Default.AllowXenCenterUpdates || force || forceRefresh)
{
var action = CreateDownloadUpdatesXmlAction(
Properties.Settings.Default.AllowXenCenterUpdates || force,
Properties.Settings.Default.AllowXenServerUpdates || force);
var action = CreateDownloadUpdatesXmlAction(Properties.Settings.Default.AllowXenCenterUpdates || force);
action.Completed += actionCompleted;

View File

@ -30,9 +30,8 @@ namespace XenAdmin.Dialogs.OptionsPages
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(UpdatesOptionsPage));
this.UpdatesTableLayoutPanel = new System.Windows.Forms.TableLayoutPanel();
this.AllowXenServerUpdatesCheckBox = new System.Windows.Forms.CheckBox();
this.AllowXenCenterUpdatesCheckBox = new System.Windows.Forms.CheckBox();
this.UpdatesBlurb = new System.Windows.Forms.Label();
this.AllowXenCenterUpdatesCheckBox = new System.Windows.Forms.CheckBox();
this.UpdatesTableLayoutPanel.SuspendLayout();
this.SuspendLayout();
//
@ -42,14 +41,12 @@ namespace XenAdmin.Dialogs.OptionsPages
this.UpdatesTableLayoutPanel.BackColor = System.Drawing.Color.Transparent;
this.UpdatesTableLayoutPanel.Controls.Add(this.UpdatesBlurb, 0, 0);
this.UpdatesTableLayoutPanel.Controls.Add(this.AllowXenCenterUpdatesCheckBox, 0, 1);
this.UpdatesTableLayoutPanel.Controls.Add(this.AllowXenServerUpdatesCheckBox, 0, 2);
this.UpdatesTableLayoutPanel.Name = "UpdatesTableLayoutPanel";
//
// AllowXenServerUpdatesCheckBox
// UpdatesBlurb
//
resources.ApplyResources(this.AllowXenServerUpdatesCheckBox, "AllowXenServerUpdatesCheckBox");
this.AllowXenServerUpdatesCheckBox.Name = "AllowXenServerUpdatesCheckBox";
this.AllowXenServerUpdatesCheckBox.UseVisualStyleBackColor = true;
resources.ApplyResources(this.UpdatesBlurb, "UpdatesBlurb");
this.UpdatesBlurb.Name = "UpdatesBlurb";
//
// AllowXenCenterUpdatesCheckBox
//
@ -57,11 +54,6 @@ namespace XenAdmin.Dialogs.OptionsPages
this.AllowXenCenterUpdatesCheckBox.Name = "AllowXenCenterUpdatesCheckBox";
this.AllowXenCenterUpdatesCheckBox.UseVisualStyleBackColor = true;
//
// UpdatesBlurb
//
resources.ApplyResources(this.UpdatesBlurb, "UpdatesBlurb");
this.UpdatesBlurb.Name = "UpdatesBlurb";
//
// UpdatesOptionsPage
//
resources.ApplyResources(this, "$this");
@ -79,7 +71,6 @@ namespace XenAdmin.Dialogs.OptionsPages
private System.Windows.Forms.TableLayoutPanel UpdatesTableLayoutPanel;
private System.Windows.Forms.Label UpdatesBlurb;
private System.Windows.Forms.CheckBox AllowXenServerUpdatesCheckBox;
private System.Windows.Forms.CheckBox AllowXenCenterUpdatesCheckBox;
}
}

View File

@ -41,8 +41,7 @@ namespace XenAdmin.Dialogs.OptionsPages
public UpdatesOptionsPage()
{
InitializeComponent();
UpdatesBlurb.Text = string.Format(UpdatesBlurb.Text, BrandManager.BrandConsole, BrandManager.ProductBrand);
AllowXenServerUpdatesCheckBox.Text = string.Format(AllowXenServerUpdatesCheckBox.Text, BrandManager.ProductBrand);
UpdatesBlurb.Text = string.Format(UpdatesBlurb.Text, BrandManager.BrandConsole);
AllowXenCenterUpdatesCheckBox.Text = string.Format(AllowXenCenterUpdatesCheckBox.Text, BrandManager.BrandConsole);
}
@ -52,9 +51,6 @@ namespace XenAdmin.Dialogs.OptionsPages
{
// XenCenter updates
AllowXenCenterUpdatesCheckBox.Checked = Properties.Settings.Default.AllowXenCenterUpdates;
// XenServer updates
AllowXenServerUpdatesCheckBox.Checked = Properties.Settings.Default.AllowXenServerUpdates;
}
public bool IsValidToSave()
@ -72,16 +68,12 @@ namespace XenAdmin.Dialogs.OptionsPages
public void Save()
{
bool checkXenCenterUpdates = AllowXenCenterUpdatesCheckBox.Checked != Properties.Settings.Default.AllowXenCenterUpdates;
bool checkVersionUpdates = AllowXenServerUpdatesCheckBox.Checked != Properties.Settings.Default.AllowXenServerUpdates;
if (checkXenCenterUpdates)
{
Properties.Settings.Default.AllowXenCenterUpdates = AllowXenCenterUpdatesCheckBox.Checked;
if (checkVersionUpdates)
Properties.Settings.Default.AllowXenServerUpdates = AllowXenServerUpdatesCheckBox.Checked;
if(checkXenCenterUpdates || checkVersionUpdates)
Updates.CheckForUpdates(false, true);
}
}
#endregion

View File

@ -154,7 +154,7 @@
<value>0</value>
</data>
<data name="UpdatesBlurb.Text" xml:space="preserve">
<value>You can configure {0} to periodically check for available updates and prompt you when a new version of {0} or {1} is available for download.</value>
<value>You can configure {0} to periodically check for available updates and prompt you when a new version of the application is available for download.</value>
</data>
<data name="&gt;&gt;UpdatesBlurb.Name" xml:space="preserve">
<value>UpdatesBlurb</value>
@ -204,42 +204,6 @@
<data name="&gt;&gt;AllowXenCenterUpdatesCheckBox.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="AllowXenServerUpdatesCheckBox.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="AllowXenServerUpdatesCheckBox.Font" type="System.Drawing.Font, System.Drawing">
<value>Tahoma, 8pt</value>
</data>
<data name="AllowXenServerUpdatesCheckBox.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="AllowXenServerUpdatesCheckBox.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 64</value>
</data>
<data name="AllowXenServerUpdatesCheckBox.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 0, 0, 0</value>
</data>
<data name="AllowXenServerUpdatesCheckBox.Size" type="System.Drawing.Size, System.Drawing">
<value>173, 17</value>
</data>
<data name="AllowXenServerUpdatesCheckBox.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="AllowXenServerUpdatesCheckBox.Text" xml:space="preserve">
<value>Check for new &amp;versions of {0}</value>
</data>
<data name="&gt;&gt;AllowXenServerUpdatesCheckBox.Name" xml:space="preserve">
<value>AllowXenServerUpdatesCheckBox</value>
</data>
<data name="&gt;&gt;AllowXenServerUpdatesCheckBox.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;AllowXenServerUpdatesCheckBox.Parent" xml:space="preserve">
<value>UpdatesTableLayoutPanel</value>
</data>
<data name="&gt;&gt;AllowXenServerUpdatesCheckBox.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="UpdatesTableLayoutPanel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
@ -250,7 +214,7 @@
<value>0, 0</value>
</data>
<data name="UpdatesTableLayoutPanel.RowCount" type="System.Int32, mscorlib">
<value>4</value>
<value>3</value>
</data>
<data name="UpdatesTableLayoutPanel.Size" type="System.Drawing.Size, System.Drawing">
<value>447, 225</value>
@ -271,7 +235,7 @@
<value>0</value>
</data>
<data name="UpdatesTableLayoutPanel.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="UpdatesBlurb" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="AllowXenCenterUpdatesCheckBox" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="AllowXenServerUpdatesCheckBox" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Percent,100" /&gt;&lt;Rows Styles="AutoSize,0,AutoSize,0,AutoSize,0,Percent,100" /&gt;&lt;/TableLayoutSettings&gt;</value>
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="UpdatesBlurb" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="AllowXenCenterUpdatesCheckBox" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Percent,100" /&gt;&lt;Rows Styles="AutoSize,0,AutoSize,0,Percent,100,Absolute,20" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>

View File

@ -608,8 +608,7 @@ namespace XenAdmin
if (!Program.RunInAutomatedTestMode && !Helpers.CommonCriteriaCertificationRelease)
{
if (!Properties.Settings.Default.SeenAllowUpdatesDialog)
using (var dlg = new NoIconDialog(string.Format(Messages.ALLOWED_UPDATES_DIALOG_MESSAGE,
BrandManager.BrandConsole, BrandManager.ProductBrand),
using (var dlg = new NoIconDialog(string.Format(Messages.ALLOWED_UPDATES_DIALOG_MESSAGE, BrandManager.BrandConsole),
ThreeButtonDialog.ButtonYes, ThreeButtonDialog.ButtonNo)
{
HelpButton = true,
@ -621,7 +620,6 @@ namespace XenAdmin
var result = dlg.ShowDialog(this) == DialogResult.Yes;
Properties.Settings.Default.AllowXenCenterUpdates = result;
Properties.Settings.Default.AllowXenServerUpdates = result;
Properties.Settings.Default.SeenAllowUpdatesDialog = true;
if (result && dlg.IsCheckBoxChecked)

View File

@ -424,19 +424,6 @@ namespace XenAdmin.Properties {
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
[global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
public bool AllowXenServerUpdates {
get {
return ((bool)(this["AllowXenServerUpdates"]));
}
set {
this["AllowXenServerUpdates"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]

View File

@ -96,9 +96,6 @@
<Setting Name="AllowXenCenterUpdates" Roaming="true" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="AllowXenServerUpdates" Roaming="true" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="LatestXenCenterSeen" Roaming="true" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>

View File

@ -682,11 +682,8 @@ namespace XenAdmin
log.Info($"=== RemindChangePassword: {Properties.Settings.Default.RemindChangePassword}");
if (!Helpers.CommonCriteriaCertificationRelease)
{
log.Info($"=== AllowXenCenterUpdates: {Properties.Settings.Default.AllowXenCenterUpdates}");
log.Info($"=== AllowXenServerUpdates: {Properties.Settings.Default.AllowXenServerUpdates}");
}
log.Info($"=== FillAreaUnderGraphs: {Properties.Settings.Default.FillAreaUnderGraphs}");
log.Info($"=== RememberLastSelectedTab: {Properties.Settings.Default.RememberLastSelectedTab}");

View File

@ -96,9 +96,6 @@
<setting name="AllowXenCenterUpdates" serializeAs="String">
<value>True</value>
</setting>
<setting name="AllowXenServerUpdates" serializeAs="String">
<value>False</value>
</setting>
<setting name="LatestXenCenterSeen" serializeAs="String">
<value />
</setting>

View File

@ -5387,7 +5387,7 @@ namespace XenAdmin {
}
/// <summary>
/// Looks up a localized string similar to Would you like {0} to periodically check the internet for new versions of {0} and {1}?.
/// Looks up a localized string similar to Would you like {0} to periodically check the internet for new versions of the application?.
/// </summary>
public static string ALLOWED_UPDATES_DIALOG_MESSAGE {
get {

View File

@ -1970,7 +1970,7 @@ Note that if RBAC is enabled, only alerts which you have privileges to dismiss w
<value>&amp;Show internet proxy settings</value>
</data>
<data name="ALLOWED_UPDATES_DIALOG_MESSAGE" xml:space="preserve">
<value>Would you like {0} to periodically check the internet for new versions of {0} and {1}?</value>
<value>Would you like {0} to periodically check the internet for new versions of the application?</value>
</data>
<data name="ALREADY_ATTACHED_ELSEWHERE" xml:space="preserve">
<value>The SR '{0}' is currently attached elsewhere. Do you want to attach it to '{1}'?