Merge pull request #3182 from kc284/feature/cdn-updates

CP-43266: New notifications page and alerts for out of sync with repo
This commit is contained in:
Konstantina Chremmou 2023-08-01 09:23:43 +01:00 committed by GitHub
commit 879c63b0e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
81 changed files with 8290 additions and 1848 deletions

2
Jenkinsfile vendored
View File

@ -32,7 +32,7 @@
def XENADMIN_BRANDING_TAG = 'cdn-updates'
@Library(['PacmanSharedLibrary', "xencenter-pipeline@v4.8"])
@Library(['PacmanSharedLibrary', "xencenter-pipeline@v4.9"])
import com.citrix.pipeline.xencenter.*
properties([

View File

@ -146,10 +146,13 @@
<Directory Id="ApplicationProgramsFolder" Name="$(var.BrandProduct)" />
</Directory>
<Directory Id="DesktopFolder" Name="Desktop">
<Component Id="ProgramFilesShortcut" Guid="63b44222-b5e8-4ab1-8f68-baed79abbf36">
<Component Id="ApplicationDesktopShortcut" Guid="63b44222-b5e8-4ab1-8f68-baed79abbf36">
<Condition>INSTALLSHORTCUT</Condition>
<Shortcut Id="ApplicationDesktopShortcut" Name="$(var.BrandConsole)" Target="[INSTALLDIR]$(var.BrandConsoleNoSpace).exe" WorkingDirectory="INSTALLDIR"/>
<RemoveFolder Id="DesktopFolder" On="both"/>
<Shortcut Id="DesktopXenCenter"
Name="$(var.BrandConsole)"
Target="[INSTALLDIR]$(var.BrandConsoleNoSpace).exe"
WorkingDirectory="INSTALLDIR"
/>
<RegistryValue Root="HKCU" Key="Software\$(var.BrandProduct)\$(var.BrandConsoleNoSpace)" Name="installed" Type="integer" Value="1" KeyPath="yes" />
</Component>
</Directory>
@ -167,9 +170,10 @@
</RegistryKey>
</Component>
</DirectoryRef>
<DirectoryRef Id="ApplicationProgramsFolder">
<Component Id="ApplicationShortcut" Guid="$(var.AppShortcutGuid)">
<Shortcut Id="startmenuXenCenter" ShortName="$(var.BrandConsoleShort)" Name="$(var.BrandConsole)" Target="[INSTALLDIR]$(var.BrandConsoleNoSpace).exe" WorkingDirectory="INSTALLDIR" Icon="XenCenterICO" />
<Shortcut Id="StartmenuXenCenter" ShortName="$(var.BrandConsoleShort)" Name="$(var.BrandConsole)" Target="[INSTALLDIR]$(var.BrandConsoleNoSpace).exe" WorkingDirectory="INSTALLDIR" Icon="XenCenterICO" />
<RemoveFolder Id="ApplicationProgramsFolder" On="both" />
<RegistryValue Root="HKCU" Key="Software\$(var.BrandProduct)\$(var.BrandConsoleNoSpace)" Name="installed" Type="integer" Value="1" KeyPath="yes" />
</Component>
@ -183,7 +187,7 @@
<ComponentRef Id="ExternalToolsComponent" />
<ComponentRef Id="RegistryEntries" />
<ComponentRef Id="ApplicationShortcut" />
<ComponentRef Id="ProgramFilesShortcut" />
<ComponentRef Id="ApplicationDesktopShortcut" />
</Feature>
<UIRef Id="$(var.BrandInstallerUI)" />
@ -200,7 +204,7 @@
<RegistrySearch Id="InstallRegistry" Type="raw" Root="HKLM" Key="Software\$(var.BrandProduct)\$(var.BrandConsoleNoSpace)" Name="InstallDir" />
</Property>
<Property Id="REINSTALLMODE" Value="amus" />
<Property Id="INSTALLSHORTCUT" Value="1"/>
<Property Id="INSTALLSHORTCUT" Value="0"/>
<CustomAction Id="ClearAllUsers" Property="ALLUSERS" Value="" />
<CustomAction Id="SetAllUsers" Property="ALLUSERS" Value="1" />
<InstallExecuteSequence>

View File

@ -106,48 +106,51 @@ diff -ru wixlib/CustomizeDlg.wxs wixlib/CustomizeDlg.wxs
<Dialog Id="CustomizeDlg" Width="370" Height="270" Title="!(loc.CustomizeDlg_Title)" TrackDiskSpace="yes">
- <Control Id="Tree" Type="SelectionTree" X="25" Y="85" Width="175" Height="115" Property="_BrowseProperty" Sunken="yes" TabSkip="no" Text="!(loc.CustomizeDlgTree)" />
- <Control Id="Browse" Type="PushButton" X="294" Y="210" Width="66" Height="17" Text="!(loc.CustomizeDlgBrowse)">
+ <Control Id="Tree" Type="SelectionTree" X="20" Y="75" Width="200" Height="89" Property="_BrowseProperty" Sunken="no" TabSkip="no" Text="!(loc.CustomizeDlgTree)" />
+ <Control Id="Browse" Type="PushButton" X="294" Y="172" Width="66" Height="17" Text="!(loc.CustomizeDlgBrowse)">
+ <Control Id="Tree" Type="SelectionTree" X="20" Y="70" Width="200" Height="79" Property="_BrowseProperty" Sunken="no" TabSkip="no" Text="!(loc.CustomizeDlgTree)" />
+ <Control Id="Browse" Type="PushButton" X="294" Y="162" Width="66" Height="17" Text="!(loc.CustomizeDlgBrowse)">
<Publish Event="SelectionBrowse" Value="BrowseDlg">1</Publish>
<Condition Action="hide">Installed</Condition>
<Condition Action="disable">Installed</Condition>
@@ -28,27 +28,34 @@
@@ -28,27 +28,37 @@
<Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
</Control>
<Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="!(loc.CustomizeDlgBannerBitmap)" />
- <Control Id="Text" Type="Text" X="25" Y="55" Width="320" Height="20" Text="!(loc.CustomizeDlgText)" />
+ <Control Id="Text" Type="Text" X="20" Y="55" Width="320" Height="20" Text="!(loc.CustomizeDlgText)" />
+ <Control Id="Text" Type="Text" X="20" Y="45" Width="320" Height="20" Text="!(loc.CustomizeDlgText)" />
<Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" />
<Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
<Control Id="Description" Type="Text" X="25" Y="23" Width="280" Height="15" Transparent="yes" NoPrefix="yes" Text="!(loc.CustomizeDlgDescription)" />
<Control Id="Title" Type="Text" X="15" Y="6" Width="210" Height="15" Transparent="yes" NoPrefix="yes" Text="!(loc.CustomizeDlgTitle)" />
- <Control Id="Box" Type="GroupBox" X="210" Y="81" Width="150" Height="118" />
- <Control Id="ItemDescription" Type="Text" X="215" Y="90" Width="131" Height="50" Text="!(loc.CustomizeDlgItemDescription)">
+ <Control Id="Box" Type="GroupBox" X="222" Y="70" Width="138" Height="85" />
+ <Control Id="ItemDescription" Type="Text" X="228" Y="82" Width="128" Height="20" Text="!(loc.CustomizeDlgItemDescription)">
+ <Control Id="Box" Type="GroupBox" X="222" Y="65" Width="138" Height="85" />
+ <Control Id="ItemDescription" Type="Text" X="228" Y="72" Width="128" Height="20" Text="!(loc.CustomizeDlgItemDescription)">
<Subscribe Event="SelectionDescription" Attribute="Text" />
</Control>
- <Control Id="ItemSize" Type="Text" X="215" Y="140" Width="131" Height="50" Text="!(loc.CustomizeDlgItemSize)">
+ <Control Id="ItemSize" Type="Text" X="228" Y="105" Width="128" Height="56" Text="!(loc.CustomizeDlgItemSize)">
+ <Control Id="ItemSize" Type="Text" X="228" Y="85" Width="128" Height="56" Text="!(loc.CustomizeDlgItemSize)">
<Subscribe Event="SelectionSize" Attribute="Text" />
</Control>
- <Control Id="Location" Type="Text" X="90" Y="210" Width="200" Height="20" Text="!(loc.CustomizeDlgLocation)">
+ <Control Id="Location" Type="Text" X="70" Y="175" Width="220" Height="20" Text="!(loc.CustomizeDlgLocation)">
+ <Control Id="Location" Type="Text" X="70" Y="165" Width="220" Height="20" Text="!(loc.CustomizeDlgLocation)">
<Subscribe Event="SelectionPath" Attribute="Text" />
<Subscribe Event="SelectionPathOn" Attribute="Visible" />
<Condition Action="hide">Installed</Condition>
</Control>
- <Control Id="LocationLabel" Type="Text" X="25" Y="210" Width="65" Height="10" Text="!(loc.CustomizeDlgLocationLabel)">
+ <Control Id="LocationLabel" Type="Text" X="20" Y="175" Width="50" Height="10" Text="!(loc.CustomizeDlgLocationLabel)">
+ <Control Id="LocationLabel" Type="Text" X="20" Y="165" Width="50" Height="10" Text="!(loc.CustomizeDlgLocationLabel)">
<Subscribe Event="SelectionPathOn" Attribute="Visible" />
<Condition Action="hide">Installed</Condition>
</Control>
+ <Control Id="UsersLabel" Type="Text" X="20" Y="210" Width="50" Height="20" Text="!(loc.InstallDirDlgUsersLabel)" />
+ <Control Id="UsersRadioButtonGroupControl" Type="RadioButtonGroup" X="70" Y="205" Width="290" Height="20" Property="Install_All">
+ <Control Id="UsersLabel" Type="Text" X="20" Y="189" Width="50" Height="20" Text="!(loc.InstallDirDlgUsersLabel)" />
+ <Control Id="UsersRadioButtonGroupControl" Type="RadioButtonGroup" X="70" Y="183" Width="290" Height="20" Property="Install_All">
+ <RadioButtonGroup Property="Install_All">
+ <RadioButton Value="1" X="0" Y="1" Width="60" Height="20" Text="!(loc.InstallDirDlgUsersAllRadioButton)" />
+ <RadioButton Value="0" X="60" Y="1" Width="120" Height="20" Text="!(loc.InstallDirDlgUsersOneRadioButton)" />
+ </RadioButtonGroup>
+ </Control>
+ <Control Id="InstallShortcutCheckbox" Type="CheckBox" X="20" Y="210" Width="290" Height="10" Property="INSTALLSHORTCUT" CheckBoxValue="0" Text="!(loc.InstallDirDlgShortCut)">
+ <Condition Action="hide">Installed</Condition>
+ </Control>
</Dialog>
</UI>
@ -210,7 +213,7 @@ diff -ru wixlib/InstallDirDlg.wxs wixlib/InstallDirDlg.wxs
<Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Transparent="yes" NoPrefix="yes" Text="!(loc.InstallDirDlgTitle)" />
<Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="!(loc.InstallDirDlgBannerBitmap)" />
<Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" />
@@ -21,6 +22,13 @@
@@ -21,6 +22,13 @@
<Control Id="FolderLabel" Type="Text" X="20" Y="60" Width="290" Height="30" NoPrefix="yes" Text="!(loc.InstallDirDlgFolderLabel)" />
<Control Id="Folder" Type="PathEdit" X="20" Y="100" Width="320" Height="18" Property="WIXUI_INSTALLDIR" Indirect="yes" />
<Control Id="ChangeFolder" Type="PushButton" X="20" Y="120" Width="56" Height="17" Text="!(loc.InstallDirDlgChange)" />
@ -220,7 +223,7 @@ diff -ru wixlib/InstallDirDlg.wxs wixlib/InstallDirDlg.wxs
+ <RadioButton Value="1" X="20" Y="0" Width="260" Height="20" Text="!(loc.InstallDirDlgUsersAllRadioButton)" />
+ <RadioButton Value="0" X="20" Y="20" Width="260" Height="20" Text="!(loc.InstallDirDlgUsersOneRadioButton)" />
+ </RadioButtonGroup>
+ </Control>
+ </Control>
</Dialog>
</UI>
</Fragment>
@ -825,7 +828,7 @@ diff -ru wixlib/WixUI_ja-jp.wxl wixlib/WixUI_ja-jp.wxl
+ <String Id="ErrorNewerProduct" Overridable="yes">より新しいバージョンが既にインストールされています。</String>
+ <String Id="InstallDirDlgUsersLabel" Overridable="yes">対象ユーザー:</String>
+ <String Id="InstallDirDlgUsersAllRadioButton" Overridable="yes">すべてのユーザー(&amp;A)</String>
+ <String Id="InstallDirDlgUsersOneRadioButton" Overridable="yes">現在のユーザー(&amp;J)</String>
+ <String Id="InstallDirDlgUsersOneRadioButton" Overridable="yes">現在のユーザー(&amp;J)</String>
+ <String Id="InstallDirDlgShortCut">Create shortcut on Desktop(&amp;C)</String>
</WixLocalization>
diff -ru wixlib/WixUI_zh-CN.wxl wixlib/WixUI_zh-CN.wxl
@ -991,17 +994,16 @@ diff -ru wixlib/WixUI_zh-CN.wxl wixlib/WixUI_zh-CN.wxl
+ <String Id="ErrorNewerProduct" Overridable="yes">已经安装了这种产品的较新版本。</String>
+ <String Id="InstallDirDlgUsersLabel" Overridable="yes">安装:</String>
+ <String Id="InstallDirDlgUsersAllRadioButton" Overridable="yes">所有用户(&amp;A)</String>
+ <String Id="InstallDirDlgUsersOneRadioButton" Overridable="yes">只有我(&amp;J)</String>
+ <String Id="InstallDirDlgUsersOneRadioButton" Overridable="yes">只有我(&amp;J)</String>
+ <String Id="InstallDirDlgShortCut">添加桌面快捷方式(&amp;C)</String>
</WixLocalization>
diff -ru wixlib/ExitDialog.wxl wixlib/ExitDialog.wxl
--- wixlib/ExitDialog.wxs 2019-09-15 07:13:54.000000000 +0100
+++ wixlib/ExitDialog.wxs 2022-06-09 15:28:09.123686200 +0100
@@ -18,4 +18,5 @@
@@ -18,4 +18,4 @@
</Control>
- <Control Id="OptionalCheckBox" Type="CheckBox" X="135" Y="190" Width="220" Height="40" Hidden="yes" Property="WIXUI_EXITDIALOGOPTIONALCHECKBOX" CheckBoxValue="1" Text="[WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT]">
- <Condition Action="show">WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT AND NOT Installed</Condition>
+ <Control Id="InstallShortcutCheckbox" Type="CheckBox" X="135" Y="185" Width="290" Height="10" Property="INSTALLSHORTCUT" CheckBoxValue="1" Text="!(loc.InstallDirDlgShortCut)" />
+ <Control Id="OptionalCheckBox" Type="CheckBox" X="135" Y="200" Width="220" Height="10" Hidden="yes" Property="WIXUI_EXITDIALOGOPTIONALCHECKBOX" CheckBoxValue="1" Text="[WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT]">
+ <Condition Action="show">WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT AND NOT (WixUI_InstallMode="Remove") AND XS_WixUIRMPressedOk="0"</Condition>
</Control>

View File

@ -96,9 +96,12 @@ namespace XenAdmin.Actions
if (_alerts.Count > 0)
midPoint = 100 * msgAlerts.Count / _alerts.Count;
RelatedTask = Message.async_destroy_many(Session, msgRefs);
PollToCompletion(0, midPoint);
Alert.RemoveAlert(a => msgAlerts.Contains(a));
if (msgAlerts.Count > 0)
{
RelatedTask = Message.async_destroy_many(Session, msgRefs);
PollToCompletion(0, midPoint);
Alert.RemoveAlert(a => msgAlerts.Contains(a));
}
for (var i = 0; i < otherAlerts.Count; i++)
{

View File

@ -39,18 +39,13 @@ namespace XenAdmin.Alerts
if (alert1 == null || alert2 == null)
return 0;
int sortResult = 0;
if (IsVersionOrVersionUpdateAlert(alert1) && !IsVersionOrVersionUpdateAlert(alert2))
sortResult = 1;
return -1;
if (!IsVersionOrVersionUpdateAlert(alert1) && IsVersionOrVersionUpdateAlert(alert2))
sortResult = -1;
return 1;
if (sortResult == 0)
sortResult = Alert.CompareOnDate(alert1, alert2);
return -sortResult;
return -Alert.CompareOnDate(alert1, alert2); //descending date
}
private bool IsVersionOrVersionUpdateAlert(Alert alert)

View File

@ -0,0 +1,117 @@
/* Copyright (c) Cloud Software Group, Inc.
*
* Redistribution and use in source and binary forms,
* with or without modification, are permitted provided
* that the following conditions are met:
*
* * Redistributions of source code must retain the above
* copyright notice, this list of conditions and the
* following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the
* following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
using System;
using XenAPI;
using static XenAPI.Message;
namespace XenAdmin.Alerts
{
public class LeafCoalesceAlert : MessageAlert
{
private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
private readonly VM _vm;
private readonly VDI _vdi;
public LeafCoalesceAlert(Message msg)
: base(msg)
{
var obj = msg.GetXenObject();
if (obj is VDI vdi && vdi.Connection != null)
{
_vdi = vdi;
foreach (var vbdRef in vdi.VBDs)
{
var vbd = vdi.Connection.Resolve(vbdRef);
if (vbd != null)
{
VM vm = vbd.Connection.Resolve(vbd.VM);
if (vm != null)
{
_vm = vm;
break;
}
}
}
}
}
public override string Description
{
get
{
switch (Message.Type)
{
case MessageType.LEAF_COALESCE_START_MESSAGE:
return string.Format(Messages.LEAF_COALESCE_START_DESCRIPTION,
_vdi?.Name() ?? Message.obj_uuid, _vm?.Name() ?? Messages.UNKNOWN);
case MessageType.LEAF_COALESCE_COMPLETED:
return string.Format(Messages.LEAF_COALESCE_COMPLETED_DESCRIPTION,
_vdi?.Name() ?? Message.obj_uuid, _vm?.Name() ?? Messages.UNKNOWN);
case MessageType.LEAF_COALESCE_FAILED:
return string.Format(Messages.LEAF_COALESCE_FAILED_DESCRIPTION,
_vdi?.Name() ?? Message.obj_uuid, _vm?.Name() ?? Messages.UNKNOWN);
default:
return base.Description;
}
}
}
public override string Title
{
get
{
switch (Message.Type)
{
case MessageType.LEAF_COALESCE_START_MESSAGE:
return string.Format(Messages.LEAF_COALESCE_START_TITLE, _vm?.Name() ?? Messages.UNKNOWN);
case MessageType.LEAF_COALESCE_COMPLETED:
return string.Format(Messages.LEAF_COALESCE_COMPLETED_TITLE, _vm?.Name() ?? Messages.UNKNOWN);
case MessageType.LEAF_COALESCE_FAILED:
return string.Format(Messages.LEAF_COALESCE_FAILED_TITLE, _vm?.Name() ?? Messages.UNKNOWN);
default:
return base.Title;
}
}
}
public override Action FixLinkAction => null;
public override string HelpLinkText => Messages.ALERT_GENERIC_HELP;
public override string HelpID => "LeafCoalesceAlert";
}
}

View File

@ -44,7 +44,8 @@ namespace XenAdmin.Alerts
{
private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
public readonly Message Message;
public Message Message { get; }
public IXenObject XenObject;
private const int DEFAULT_PRIORITY = 0;
@ -355,7 +356,7 @@ namespace XenAdmin.Alerts
case Message.MessageType.LICENSE_EXPIRES_SOON:
case Message.MessageType.LICENSE_DOES_NOT_SUPPORT_POOLING:
return () => Program.OpenURL(HiddenFeatures.LinkLabelHidden ? null : InvisibleMessages.LICENSE_EXPIRY_WEBPAGE);
return () => Program.OpenURL(HiddenFeatures.LinkLabelHidden ? null : InvisibleMessages.LICENSE_BUY_URL);
case Message.MessageType.VBD_QOS_FAILED:
case Message.MessageType.VCPU_QOS_FAILED:
case Message.MessageType.VIF_QOS_FAILED:
@ -511,6 +512,10 @@ namespace XenAdmin.Alerts
case Message.MessageType.FAILED_LOGIN_ATTEMPTS:
return new FailedLoginAttemptAlert(msg);
case Message.MessageType.LEAF_COALESCE_START_MESSAGE:
case Message.MessageType.LEAF_COALESCE_COMPLETED:
case Message.MessageType.LEAF_COALESCE_FAILED:
return new LeafCoalesceAlert(msg);
default:
// For all other kinds of alert
return new MessageAlert(msg);

View File

@ -0,0 +1,159 @@
/* Copyright (c) Cloud Software Group, Inc.
*
* Redistribution and use in source and binary forms,
* with or without modification, are permitted provided
* that the following conditions are met:
*
* * Redistributions of source code must retain the above
* copyright notice, this list of conditions and the
* following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the
* following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
using System;
using XenAdmin.Actions;
using XenAdmin.Core;
using XenAdmin.Dialogs.ServerUpdates;
using XenAdmin.Network;
using XenAPI;
namespace XenAdmin.Alerts
{
public class OutOfSyncWithCdnAlert : Alert
{
private readonly int _outOfSyncDays;
private readonly Pool _pool;
private OutOfSyncWithCdnAlert(Pool pool, DateTime timestamp)
{
_timestamp = timestamp;
_pool = pool;
Connection = _pool.Connection;
if (_timestamp - _pool.last_update_sync >= TimeSpan.FromDays(180))
{
_outOfSyncDays = 180;
Priority = AlertPriority.Priority1;
}
else if (_timestamp - _pool.last_update_sync >= TimeSpan.FromDays(90))
{
_outOfSyncDays = 180;
Priority = AlertPriority.Priority2;
}
}
public static bool TryCreate(IXenConnection connection, out Alert alert)
{
if (Helpers.XapiEqualOrGreater_23_18_0(connection))
{
var pool = Helpers.GetPoolOfOne(connection);
var timestamp = DateTime.UtcNow;
if (timestamp - pool.last_update_sync >= TimeSpan.FromDays(90))
{
alert = new OutOfSyncWithCdnAlert(pool, timestamp);
return true;
}
}
alert = null;
return false;
}
public override AlertPriority Priority { get; }
public override string AppliesTo => Helpers.GetName(_pool);
public override string Description => Title;
public override Action FixLinkAction
{
get
{
return () =>
{
var syncAction = new SyncWithCdnAction(_pool);
syncAction.Completed += a => Updates.CheckForCdnUpdates(a.Connection);
syncAction.RunAsync();
};
}
}
public override string FixLinkText => Messages.UPDATES_GENERAL_TAB_SYNC_NOW;
public override string HelpID => "TODO";
public override string Title => string.Format(Messages.ALERT_CDN_OUT_OF_SYNC_TITLE, _outOfSyncDays);
}
public class YumRepoNotConfiguredAlert : Alert
{
private readonly Pool _pool;
private YumRepoNotConfiguredAlert(Pool pool, DateTime timestamp)
{
_timestamp = timestamp;
_pool = pool;
Connection = _pool.Connection;
}
public static bool TryCreate(IXenConnection connection, out Alert alert)
{
var pool = Helpers.GetPoolOfOne(connection);
var timestamp = DateTime.UtcNow;
if (pool.repositories.Count == 0)
{
alert = new YumRepoNotConfiguredAlert(pool, timestamp);
return true;
}
alert = null;
return false;
}
public override AlertPriority Priority => AlertPriority.Priority3;
public override string AppliesTo => Helpers.GetName(_pool);
public override string Description => Messages.ALERT_CDN_REPO_NOT_CONFIGURED_DESCRIPTION;
public override Action FixLinkAction
{
get
{
return () =>
{
using (var dialog = new ConfigUpdatesDialog())
dialog.ShowDialog(Program.MainWindow);
};
}
}
public override string FixLinkText => Messages.ALERT_CDN_REPO_NOT_CONFIGURED_ACTION_LINK;
public override string HelpID => "TODO";
public override string Title => string.Format(Messages.ALERT_CDN_REPO_NOT_CONFIGURED_TITLE, Connection.Name);
}
}

View File

@ -78,9 +78,13 @@ namespace XenAdmin.Controls.CheckableDataGridView
public bool LockDisabledState { get; set; }
public abstract bool WarningRequired { get; }
public abstract bool LicenseWarningRequired { get; }
public abstract string WarningText { get; }
public abstract string LicenseWarningText { get; }
public abstract bool SupportWarningRequired { get; }
public abstract string SupportWarningText { get; }
/// <summary>
/// Override this if you cells data is loaded after it is first drawn

View File

@ -36,39 +36,29 @@ namespace XenAdmin.Controls
{
public class DataGridViewTextAndImageCell : DataGridViewTextBoxCell
{
public Image Image { get; set; }
protected override void Paint(Graphics graphics, Rectangle clipBounds, Rectangle cellBounds, int rowIndex, DataGridViewElementStates cellState, object value, object formattedValue, string errorText, DataGridViewCellStyle cellStyle, DataGridViewAdvancedBorderStyle advancedBorderStyle, DataGridViewPaintParts paintParts)
{
var indent = 0;
if (Image != null)
{
base.Paint(graphics, clipBounds,
new Rectangle(cellBounds.X + Image.Width, cellBounds.Y, cellBounds.Width - Image.Height,cellBounds.Height),
rowIndex, cellState, value, formattedValue,errorText, cellStyle, advancedBorderStyle, paintParts);
var color = (cellState & DataGridViewElementStates.Selected) != 0
? DataGridView.DefaultCellStyle.SelectionBackColor
: DataGridView.DefaultCellStyle.BackColor;
if ((cellState & DataGridViewElementStates.Selected) != 0)
{
using (var brush = new SolidBrush(DataGridView.DefaultCellStyle.SelectionBackColor))
graphics.FillRectangle(
brush, cellBounds.X, cellBounds.Y, Image.Width, cellBounds.Height);
}
else
{
using (var brush = new SolidBrush(DataGridView.DefaultCellStyle.BackColor))
graphics.FillRectangle(brush,
cellBounds.X, cellBounds.Y, Image.Width, cellBounds.Height);
}
graphics.DrawImage(Image, cellBounds.X, cellBounds.Y+2, Image.Width,
Math.Min(Image.Height,cellBounds.Height));
using (var brush = new SolidBrush(color))
graphics.FillRectangle(brush, cellBounds.X, cellBounds.Y, Image.Width, cellBounds.Height);
}
else
{
base.Paint(graphics, clipBounds, cellBounds, rowIndex, cellState, value, formattedValue, errorText, cellStyle, advancedBorderStyle, paintParts);
graphics.DrawImage(Image, cellBounds.X, cellBounds.Y + 2, Image.Width, Math.Min(Image.Height, cellBounds.Height));
indent += Image.Width;
}
var textBounds = new Rectangle(cellBounds.X + indent, cellBounds.Y, cellBounds.Width - indent, cellBounds.Height);
base.Paint(graphics, clipBounds, textBounds, rowIndex, cellState, value, formattedValue, errorText, cellStyle, advancedBorderStyle, paintParts);
}
}
}

View File

@ -58,6 +58,7 @@ namespace XenAdmin.Controls
private readonly CollectionChangeEventHandler m_hostCollectionChangedWithInvoke;
private bool inFilterListUpdate;
private bool retryFilterListUpdate;
private Func<IXenConnection, bool> _connectionPredicate = c => true;
private ToolStripMenuItem toolStripMenuItemAll;
@ -84,13 +85,20 @@ namespace XenAdmin.Controls
/// Build the list of hosts to filter by for the first time and set all
/// of them to be checked
/// </summary>
public void InitializeHostList()
/// <param name="connectionPredicate">The criteria for allowing connections to show in the filter.</param>
public void InitializeHostList(Func<IXenConnection, bool> connectionPredicate = null)
{
foreach (IXenConnection c in ConnectionsManager.XenConnectionsCopy)
_connectionPredicate = connectionPredicate ?? (c => true);
var connections = ConnectionsManager.XenConnectionsCopy.Where(_connectionPredicate).ToList();
foreach (IXenConnection c in connections)
{
foreach (Host h in c.Cache.Hosts)
HostCheckStates[h.uuid] = true;
}
BuildFilterList();
}
public void RefreshLists()
@ -99,7 +107,7 @@ namespace XenAdmin.Controls
OnFilterChanged();
}
public void BuildFilterList()
private void BuildFilterList()
{
Program.AssertOnEventThread();
@ -119,7 +127,9 @@ namespace XenAdmin.Controls
DeregisterEvents();
RegisterEvents();
foreach (var c in ConnectionsManager.XenConnectionsCopy)
var connections = ConnectionsManager.XenConnectionsCopy.Where(_connectionPredicate).ToList();
foreach (var c in connections)
{
var p = Helpers.GetPool(c);
@ -185,7 +195,7 @@ namespace XenAdmin.Controls
return hostUuids.TrueForAll(uuid => HostCheckStates.ContainsKey(uuid) && !HostCheckStates[uuid]);
}
public bool FilterIsOn
{
get { return HostCheckStates.ContainsValue(false); }
@ -225,7 +235,9 @@ namespace XenAdmin.Controls
private void RegisterEvents()
{
foreach (IXenConnection c in ConnectionsManager.XenConnectionsCopy)
var connections = ConnectionsManager.XenConnectionsCopy.Where(_connectionPredicate).ToList();
foreach (IXenConnection c in connections)
{
c.ConnectionStateChanged += connection_ConnectionStateChanged;
c.Cache.RegisterCollectionChanged<Host>(m_hostCollectionChangedWithInvoke);
@ -294,10 +306,9 @@ namespace XenAdmin.Controls
private void XenConnections_CollectionChanged(object sender, CollectionChangeEventArgs e)
{
if (e.Action == CollectionChangeAction.Add)
if (e.Action == CollectionChangeAction.Add && e.Element is IXenConnection connection &&
_connectionPredicate(connection))
{
IXenConnection connection = e.Element as IXenConnection;
foreach (Host host in connection.Cache.Hosts)
HostCheckStates[host.uuid] = true;
}
@ -369,7 +380,6 @@ namespace XenAdmin.Controls
{
toolStripMenuItemAll.Enabled = false;
InitializeHostList();
BuildFilterList();
}
else
{
@ -378,9 +388,7 @@ namespace XenAdmin.Controls
item.Checked = !item.Checked;
HostCheckStates[uuid] = item.Checked;
ToolStripMenuItem poolItem = item.OwnerItem as ToolStripMenuItem;
if (poolItem != null)
if (item.OwnerItem is ToolStripMenuItem poolItem)
{
//this is not a standalone host; change the parent pool's check state

View File

@ -40,7 +40,7 @@ namespace XenAdmin.Controls
[Browsable(true)]
public event Action FilterChanged;
private bool internalUpdating;
private bool _internalUpdating;
private ToolStripMenuItem toolStripMenuItem0;
private ToolStripMenuItem toolStripMenuItem1;
@ -53,69 +53,66 @@ namespace XenAdmin.Controls
public FilterSeveritiesToolStripDropDownButton()
{
toolStripMenuItem0 = new ToolStripMenuItem
{
Text = Messages.SEVERITY_FILTER_0,
Checked = true,
CheckOnClick = true,
Image = Images.StaticImages.alert6_16,
ToolTipText = Messages.SEVERITY_FILTER_0_DETAIL
};
{
Text = Messages.SEVERITY_FILTER_0,
Image = Images.StaticImages.alert6_16,
ToolTipText = Messages.SEVERITY_FILTER_0_DETAIL
};
toolStripMenuItem1 = new ToolStripMenuItem
{
Text = Messages.SEVERITY_FILTER_1,
Checked = true,
CheckOnClick = true,
Image = Images.StaticImages.alert1_16,
ToolTipText = Messages.SEVERITY_FILTER_1_DETAIL
};
{
Text = Messages.SEVERITY_FILTER_1,
Image = Images.StaticImages.alert1_16,
ToolTipText = Messages.SEVERITY_FILTER_1_DETAIL
};
toolStripMenuItem2 = new ToolStripMenuItem
{
Text = Messages.SEVERITY_FILTER_2,
Checked = true,
CheckOnClick = true,
Image = Images.StaticImages.alert2_16,
ToolTipText = Messages.SEVERITY_FILTER_2_DETAIL
};
{
Text = Messages.SEVERITY_FILTER_2,
Image = Images.StaticImages.alert2_16,
ToolTipText = Messages.SEVERITY_FILTER_2_DETAIL
};
toolStripMenuItem3 = new ToolStripMenuItem
{
Text = Messages.SEVERITY_FILTER_3,
Checked = true,
CheckOnClick = true,
Image = Images.StaticImages.alert3_16,
ToolTipText = Messages.SEVERITY_FILTER_3_DETAIL
};
{
Text = Messages.SEVERITY_FILTER_3,
Image = Images.StaticImages.alert3_16,
ToolTipText = Messages.SEVERITY_FILTER_3_DETAIL
};
toolStripMenuItem4 = new ToolStripMenuItem
{
Text = Messages.SEVERITY_FILTER_4,
Checked = true,
CheckOnClick = true,
Image = Images.StaticImages.alert4_16,
ToolTipText = Messages.SEVERITY_FILTER_4_DETAIL
};
{
Text = Messages.SEVERITY_FILTER_4,
Image = Images.StaticImages.alert4_16,
ToolTipText = Messages.SEVERITY_FILTER_4_DETAIL
};
toolStripMenuItem5 = new ToolStripMenuItem
{
Text = Messages.SEVERITY_FILTER_5,
Checked = true,
CheckOnClick = true,
Image = Images.StaticImages.alert5_16,
ToolTipText = Messages.SEVERITY_FILTER_5_DETAIL
};
{
Text = Messages.SEVERITY_FILTER_5,
Image = Images.StaticImages.alert5_16,
ToolTipText = Messages.SEVERITY_FILTER_5_DETAIL
};
toolStripMenuItemAll = new ToolStripMenuItem
{
Text = Messages.FILTER_SHOW_ALL,
Enabled = false
};
{
Text = Messages.FILTER_SHOW_ALL,
Enabled = false
};
DropDownItems.AddRange(new ToolStripItem[]
{
toolStripMenuItem1,
toolStripMenuItem2,
toolStripMenuItem3,
toolStripMenuItem4,
toolStripMenuItem5,
toolStripMenuItem0,
new ToolStripSeparator(),
toolStripMenuItemAll
});
{
toolStripMenuItem1,
toolStripMenuItem2,
toolStripMenuItem3,
toolStripMenuItem4,
toolStripMenuItem5,
toolStripMenuItem0,
new ToolStripSeparator(),
toolStripMenuItemAll
});
NormalizeItems(toolStripMenuItem0, toolStripMenuItem1, toolStripMenuItem2, toolStripMenuItem3, toolStripMenuItem4, toolStripMenuItem5);
toolStripMenuItem0.CheckedChanged += Item_CheckedChanged;
toolStripMenuItem1.CheckedChanged += Item_CheckedChanged;
@ -125,19 +122,24 @@ namespace XenAdmin.Controls
toolStripMenuItem5.CheckedChanged += Item_CheckedChanged;
}
public bool FilterIsOn
private void NormalizeItems(params ToolStripMenuItem[] items)
{
get
foreach (var item in items)
{
return !toolStripMenuItem0.Checked
|| !toolStripMenuItem1.Checked
|| !toolStripMenuItem2.Checked
|| !toolStripMenuItem3.Checked
|| !toolStripMenuItem4.Checked
|| !toolStripMenuItem5.Checked;
item.Checked = true;
item.CheckOnClick = true;
item.ImageScaling = ToolStripItemImageScaling.None;
}
}
public bool FilterIsOn =>
!toolStripMenuItem0.Checked ||
!toolStripMenuItem1.Checked ||
!toolStripMenuItem2.Checked ||
!toolStripMenuItem3.Checked ||
!toolStripMenuItem4.Checked ||
!toolStripMenuItem5.Checked;
public bool HideBySeverity(AlertPriority priority)
{
return !((toolStripMenuItem1.Checked && priority == AlertPriority.Priority1)
@ -154,14 +156,14 @@ namespace XenAdmin.Controls
if (e.ClickedItem == toolStripMenuItemAll)
{
internalUpdating = true;
_internalUpdating = true;
toolStripMenuItem0.Checked = true;
toolStripMenuItem1.Checked = true;
toolStripMenuItem2.Checked = true;
toolStripMenuItem3.Checked = true;
toolStripMenuItem4.Checked = true;
toolStripMenuItem5.Checked = true;
internalUpdating = false;
_internalUpdating = false;
Item_CheckedChanged(null, null);
}
@ -169,12 +171,10 @@ namespace XenAdmin.Controls
private void Item_CheckedChanged(object sender, EventArgs e)
{
if (!internalUpdating)
if (!_internalUpdating)
{
toolStripMenuItemAll.Enabled = FilterIsOn;
if (FilterChanged != null)
FilterChanged();
FilterChanged?.Invoke();
}
}
}

View File

@ -48,6 +48,7 @@ namespace XenAdmin.Controls.MainWindowControls
public NotificationsView()
{
Items.Add(new NotificationsSubModeItem(NotificationsSubMode.Alerts));
Items.Add(new NotificationsSubModeItem(NotificationsSubMode.UpdatesFromCdn));
if (!Helpers.CommonCriteriaCertificationRelease)
Items.Add(new NotificationsSubModeItem(NotificationsSubMode.Updates));
Items.Add(new NotificationsSubModeItem(NotificationsSubMode.Events));
@ -95,6 +96,12 @@ namespace XenAdmin.Controls.MainWindowControls
}
}
protected override void OnHandleCreated(EventArgs e)
{
base.OnHandleCreated(e);
ItemHeight = 40;
}
protected override void OnDrawItem(DrawItemEventArgs e)
{
base.OnDrawItem(e);
@ -122,7 +129,11 @@ namespace XenAdmin.Controls.MainWindowControls
var textRec = new Rectangle(textLeft, e.Bounds.Top,
e.Bounds.Right - textLeft, itemHeight);
Drawing.DrawText(e.Graphics, item.Text, font, textRec, e.ForeColor,
var txt = item.Text;
if (!string.IsNullOrWhiteSpace(item.SubText))
txt = $"{txt}\n{item.SubText}";
Drawing.DrawText(e.Graphics, txt, font, textRec, e.ForeColor,
TextFormatFlags.VerticalCenter | TextFormatFlags.Left | TextFormatFlags.EndEllipsis);
}
}
@ -136,7 +147,7 @@ namespace XenAdmin.Controls.MainWindowControls
}
}
public enum NotificationsSubMode { Alerts, Updates, Events }
public enum NotificationsSubMode { Alerts, Updates, UpdatesFromCdn, Events }
public class NotificationsSubModeItem
{
@ -157,6 +168,8 @@ namespace XenAdmin.Controls.MainWindowControls
public string Text => GetText(SubMode, UnreadEntries);
public string SubText => GetSubText(SubMode);
public static Image GetImage(NotificationsSubMode subMode, int unreadEntries)
{
switch (subMode)
@ -164,11 +177,13 @@ namespace XenAdmin.Controls.MainWindowControls
case NotificationsSubMode.Alerts:
return Images.StaticImages._000_Alert2_h32bit_16;
case NotificationsSubMode.Updates:
return Images.StaticImages._015_Download_h32bit_16;
case NotificationsSubMode.UpdatesFromCdn:
return Images.StaticImages.notif_updates_16;
case NotificationsSubMode.Events:
return unreadEntries == 0
? Images.StaticImages.notif_events_16
: Images.StaticImages.notif_events_errors_16;
? Images.StaticImages.notif_events_16
: Images.StaticImages.notif_events_errors_16;
default:
return null;
}
@ -180,12 +195,13 @@ namespace XenAdmin.Controls.MainWindowControls
{
case NotificationsSubMode.Alerts:
return unreadEntries == 0
? Messages.NOTIFICATIONS_SUBMODE_ALERTS_READ
: string.Format(Messages.NOTIFICATIONS_SUBMODE_ALERTS_UNREAD, unreadEntries);
? Messages.NOTIFICATIONS_SUBMODE_ALERTS_READ
: string.Format(Messages.NOTIFICATIONS_SUBMODE_ALERTS_UNREAD, unreadEntries);
case NotificationsSubMode.Updates:
case NotificationsSubMode.UpdatesFromCdn:
return unreadEntries == 0
? Messages.NOTIFICATIONS_SUBMODE_UPDATES_READ
: string.Format(Messages.NOTIFICATIONS_SUBMODE_UPDATES_UNREAD, unreadEntries);
? Messages.NOTIFICATIONS_SUBMODE_UPDATES_READ
: string.Format(Messages.NOTIFICATIONS_SUBMODE_UPDATES_UNREAD, unreadEntries);
case NotificationsSubMode.Events:
if (unreadEntries == 0)
return Messages.NOTIFICATIONS_SUBMODE_EVENTS_READ;
@ -196,5 +212,18 @@ namespace XenAdmin.Controls.MainWindowControls
return string.Empty;
}
}
public static string GetSubText(NotificationsSubMode subMode)
{
switch (subMode)
{
case NotificationsSubMode.Updates:
return string.Format(Messages.CONFIG_LCM_UPDATES_TAB_TITLE, BrandManager.ProductVersion821);
case NotificationsSubMode.UpdatesFromCdn:
return string.Format(Messages.CONFIG_CDN_UPDATES_TAB_TITLE, BrandManager.ProductBrand, BrandManager.ProductVersionPost82);
default:
return string.Empty;
}
}
}
}

View File

@ -30,10 +30,11 @@ namespace XenAdmin.Controls
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PDSection));
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
this.label1 = new System.Windows.Forms.Label();
this.panel1 = new System.Windows.Forms.Panel();
this.groupBox1 = new System.Windows.Forms.GroupBox();
@ -43,6 +44,7 @@ namespace XenAdmin.Controls
this.dataGridViewEx1 = new XenAdmin.Controls.DataGridViewEx.DataGridViewEx();
this.KeyColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ValueColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColumnNotes = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.chevron)).BeginInit();
this.contextMenuStrip1.SuspendLayout();
@ -105,22 +107,23 @@ namespace XenAdmin.Controls
this.dataGridViewEx1.ColumnHeadersVisible = false;
this.dataGridViewEx1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.KeyColumn,
this.ValueColumn});
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window;
dataGridViewCellStyle3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.ControlText;
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Window;
dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.ControlText;
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dataGridViewEx1.DefaultCellStyle = dataGridViewCellStyle3;
this.ValueColumn,
this.ColumnNotes});
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Window;
dataGridViewCellStyle4.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.ControlText;
dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Window;
dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.ControlText;
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dataGridViewEx1.DefaultCellStyle = dataGridViewCellStyle4;
resources.ApplyResources(this.dataGridViewEx1, "dataGridViewEx1");
this.dataGridViewEx1.GridColor = System.Drawing.SystemColors.Control;
this.dataGridViewEx1.HideSelection = true;
this.dataGridViewEx1.Name = "dataGridViewEx1";
this.dataGridViewEx1.ReadOnly = true;
dataGridViewCellStyle4.Padding = new System.Windows.Forms.Padding(5);
this.dataGridViewEx1.RowsDefaultCellStyle = dataGridViewCellStyle4;
dataGridViewCellStyle5.Padding = new System.Windows.Forms.Padding(5);
this.dataGridViewEx1.RowsDefaultCellStyle = dataGridViewCellStyle5;
this.dataGridViewEx1.ShowCellToolTips = false;
this.dataGridViewEx1.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewEx1_CellContentClick);
this.dataGridViewEx1.SelectionChanged += new System.EventHandler(this.dataGridViewEx1_SelectionChanged);
@ -141,7 +144,6 @@ namespace XenAdmin.Controls
//
// ValueColumn
//
this.ValueColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.TopLeft;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.ValueColumn.DefaultCellStyle = dataGridViewCellStyle2;
@ -151,6 +153,17 @@ namespace XenAdmin.Controls
this.ValueColumn.Resizable = System.Windows.Forms.DataGridViewTriState.False;
this.ValueColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// ColumnNotes
//
this.ColumnNotes.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCellsExceptHeader;
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.TopLeft;
this.ColumnNotes.DefaultCellStyle = dataGridViewCellStyle3;
resources.ApplyResources(this.ColumnNotes, "ColumnNotes");
this.ColumnNotes.Name = "ColumnNotes";
this.ColumnNotes.ReadOnly = true;
this.ColumnNotes.Resizable = System.Windows.Forms.DataGridViewTriState.False;
this.ColumnNotes.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// PDSection
//
this.BackColor = System.Drawing.Color.Gainsboro;
@ -179,5 +192,6 @@ namespace XenAdmin.Controls
private System.Windows.Forms.ToolStripMenuItem copyToolStripMenuItem;
private System.Windows.Forms.DataGridViewTextBoxColumn KeyColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn ValueColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnNotes;
}
}

View File

@ -78,16 +78,19 @@ namespace XenAdmin.Controls
public PDSection()
{
InitializeComponent();
SetDefaultValues();
Contract();
SectionTitle = Messages.PDSECTION_TITLE;
IsExpanded = true;
Collapse();
MinimumSize = new Size(0, Height);
dataGridViewEx1.LostFocus += dataGridViewEx1_LostFocus;
dataGridViewEx1.GotFocus += dataGridViewEx1_GotFocus;
if (!Application.RenderWithVisualStyles)
{
panel1.BackColor = SystemColors.Control;
this.BackColor = SystemColors.ControlDark;
BackColor = SystemColors.ControlDark;
}
}
@ -145,7 +148,7 @@ namespace XenAdmin.Controls
}
#endregion
protected override void OnGotFocus(EventArgs e)
{
base.OnGotFocus(e);
@ -228,7 +231,7 @@ namespace XenAdmin.Controls
private void panel1_MouseDoubleClick(object sender, MouseEventArgs e)
{
if (IsExpanded)
Contract();
Collapse();
else
{
Expand();
@ -239,7 +242,7 @@ namespace XenAdmin.Controls
private void chevron_Click(object sender, EventArgs e)
{
if (IsExpanded)
Contract();
Collapse();
else
{
Expand();
@ -263,23 +266,14 @@ namespace XenAdmin.Controls
#region Private Methods
private void SetDefaultValues()
{
SectionTitle = Messages.PDSECTION_TITLE;
IsExpanded = true;
}
private void RunCellCommandOrAction(DataGridViewCell cell)
{
if (cell == null)
return;
var command = cell.Tag as Command;
if (command != null)
if (cell.Tag is Command command)
command.Run();
var action = cell.Tag as Action;
if (action != null)
else if (cell.Tag is Action action)
action.Invoke();
}
@ -289,15 +283,15 @@ namespace XenAdmin.Controls
{
int newHeight = dataGridViewEx1.Rows.GetRowsHeight(DataGridViewElementStates.Visible);
int valueColWidth = dataGridViewEx1.Width - dataGridViewEx1.Columns[KeyColumn.Index].Width;
int preferredValueColWidth =
dataGridViewEx1.Columns[ValueColumn.Index].GetPreferredWidth(
DataGridViewAutoSizeColumnMode.AllCells, true);
int actualWidth = dataGridViewEx1.Width - KeyColumn.Width;
int preferredWidth = ValueColumn.GetPreferredWidth(DataGridViewAutoSizeColumnMode.AllCells, true) +
ColumnNotes.GetPreferredWidth(DataGridViewAutoSizeColumnMode.AllCells, true);
int horizontalScrollBarHeight = preferredWidth - 2 >= actualWidth
? dataGridViewEx1.HorizontalScrollBarHeight
: 0;
int horizontalScrollBarHeight = preferredValueColWidth - 1 >= valueColWidth
? dataGridViewEx1.HorizontalScrollBarHeight
: 0;
// 3px added so we have a border (one at top of control, one between title and grid, one at bottom)
Height = panel1.Height + newHeight + horizontalScrollBarHeight + 3;
// this correction is needed because the anchor property of the grid drags it to fill the space we want to be a border
@ -321,15 +315,28 @@ namespace XenAdmin.Controls
}
}
private void AddRow(DataGridViewRow r)
private void AddRow(DataGridViewCell keyCell, DataGridViewCell valueCell, DataGridViewCell noteCell, params ToolStripMenuItem[] contextMenuItems)
{
var r = new DataGridViewExRow();
r.Cells.AddRange(keyCell, valueCell, noteCell ?? new DataGridViewTextBoxCell());
r.Tag = contextMenuItems;
dataGridViewEx1.Rows.Add(r);
if (inLayout)
return;
RefreshHeight();
}
private static DataGridViewTextBoxCell CreateKeyCell(string key)
{
if (!string.IsNullOrEmpty(key))
key += Messages.GENERAL_PAGE_KVP_SEPARATOR;
var cell = new DataGridViewTextBoxCell { Value = key };
return cell;
}
private void ToggleExpandedState(bool expand)
{
if (IsExpanded == expand)
@ -346,113 +353,63 @@ namespace XenAdmin.Controls
#endregion
public void Contract()
public void Collapse()
{
ToggleExpandedState(false);
}
public void Expand()
{
ValueColumn.MinimumWidth = 5;
HelpersGUI.ResizeGridViewColumnToAllCells(ValueColumn);
ToggleExpandedState(true);
}
private DataGridViewExRow CreateRow(string Key, string Value)
public void AddEntry(string key, string value, params ToolStripMenuItem[] contextMenuItems)
{
if (!String.IsNullOrEmpty(Key))
Key += Messages.GENERAL_PAGE_KVP_SEPARATOR;
DataGridViewExRow r = new DataGridViewExRow();
r.CreateCells(dataGridViewEx1);
r.Cells[0].Value = Key;
r.Cells[1].Value = Value;
return r;
var valueCell = new DataGridViewTextBoxCell { Value = value };
AddRow(CreateKeyCell(key), valueCell, null, contextMenuItems);
}
public void AddEntry(string Key, string Value, params ToolStripMenuItem[] contextMenuItems)
public void AddEntry(string key, string value, Color fontColor, params ToolStripMenuItem[] contextMenuItems)
{
var r = CreateRow(Key, Value);
r.Tag = contextMenuItems;
AddRow(r);
var valueCell = new DataGridViewTextBoxCell { Value = value };
AddRow(CreateKeyCell(key), valueCell, null, contextMenuItems);
valueCell.Style.ForeColor = fontColor;
}
public void AddEntry(string Key, string Value, string toolTipText, params ToolStripMenuItem[] contextMenuItems)
public void AddEntry(string key, FolderListItem value, params ToolStripMenuItem[] contextMenuItems)
{
AddEntry(Key, Value, contextMenuItems);
if (toolTipText != Key)
dataGridViewEx1.Rows[dataGridViewEx1.RowCount - 1].Cells[0].ToolTipText = toolTipText;
var valueCell = new FolderCell(value); // CA-33311
AddRow(CreateKeyCell(key), valueCell, null, contextMenuItems);
}
public void AddEntry(string Key, string Value, Color fontColor)
internal void AddEntryLink(string key, string value, Command command, params ToolStripMenuItem[] contextMenuItems)
{
var r = CreateRow(Key, Value);
r.Cells[1].Style.ForeColor = fontColor;
AddRow(r);
dataGridViewEx1.DefaultCellStyle = new DataGridViewCellStyle();
var valueCell = new DataGridViewLinkCell { Value = value, Tag = command };
AddRow(CreateKeyCell(key), valueCell, null, contextMenuItems);
}
public void AddEntry(string Key, string Value, Color fontColor, params ToolStripMenuItem[] contextMenuItems)
internal void AddEntryLink(string key, string value, Action action, params ToolStripMenuItem[] contextMenuItems)
{
var r = CreateRow(Key, Value);
r.Cells[1].Style.ForeColor = fontColor;
r.Tag = contextMenuItems;
AddRow(r);
dataGridViewEx1.DefaultCellStyle = new DataGridViewCellStyle();
var valueCell = new DataGridViewLinkCell { Value = value, Tag = action };
AddRow(CreateKeyCell(key), valueCell, null, contextMenuItems);
}
public void AddEntry(string Key, FolderListItem Value, params ToolStripMenuItem[] contextMenuItems)
internal void AddEntryWithNoteLink(string key, string value, string note, Action action, params ToolStripMenuItem[] contextMenuItems)
{
// Special case for folders: CA-33311
if (!String.IsNullOrEmpty(Key))
Key += Messages.GENERAL_PAGE_KVP_SEPARATOR;
DataGridViewExRow r = new DataGridViewExRow();
r.Cells.Add(new DataGridViewTextBoxCell());
r.Cells[0].Value = Key;
r.Cells.Add(new FolderCell(Value));
r.Tag = contextMenuItems;
AddRow(r);
var valueCell = new DataGridViewTextBoxCell { Value = value };
var noteCell = new DataGridViewLinkCell { Value = note, Tag = action };
AddRow(CreateKeyCell(key), valueCell, noteCell, contextMenuItems);
}
public void AddEntry(string Key, string Value, bool visible, params ToolStripMenuItem[] contextMenuItems)
internal void AddEntryWithNoteLink(string key, string value, string note, Action action, Color fontColor, params ToolStripMenuItem[] contextMenuItems)
{
var r = CreateRow(Key, Value);
r.Tag = contextMenuItems;
r.Visible = visible;
AddRow(r);
var valueCell = new DataGridViewTextBoxCell { Value = value };
var noteCell = new DataGridViewLinkCell { Value = note, Tag = action };
valueCell.Style.ForeColor = fontColor;
valueCell.Style.SelectionForeColor = fontColor;
AddRow(CreateKeyCell(key), valueCell, noteCell, contextMenuItems);
}
internal void AddEntryLink(string Key, string Value, Command command, params ToolStripMenuItem[] contextMenuItems)
{
if (!String.IsNullOrEmpty(Key))
Key += Messages.GENERAL_PAGE_KVP_SEPARATOR;
DataGridViewExRow r = new DataGridViewExRow();
r.CreateCells(dataGridViewEx1);
r.Cells[0].Value = Key;
r.Cells[1] = new DataGridViewLinkCell();
r.Cells[1].Value = Value;
r.Cells[1].Tag = command;
r.Tag = contextMenuItems;
AddRow(r);
}
internal void AddEntryLink(string Key, string Value, Action action, params ToolStripMenuItem[] contextMenuItems)
{
if (!String.IsNullOrEmpty(Key))
Key += Messages.GENERAL_PAGE_KVP_SEPARATOR;
DataGridViewExRow r = new DataGridViewExRow();
r.CreateCells(dataGridViewEx1);
r.Cells[0].Value = Key;
r.Cells[1] = new DataGridViewLinkCell();
r.Cells[1].Value = Value;
r.Cells[1].Tag = action;
r.Tag = contextMenuItems;
AddRow(r);
}
public void UpdateEntryValueWithKey(string Key, string newValue, bool visible)
{
List<DataGridViewExRow> matchingRows = (from DataGridViewExRow row in dataGridViewEx1.Rows
@ -471,7 +428,7 @@ namespace XenAdmin.Controls
}
}
internal void fixFirstColumnWidth(int width)
internal void FixFirstColumnWidth(int width)
{
dataGridViewEx1.Columns[0].Width = width;
}

View File

@ -273,6 +273,15 @@
<data name="ValueColumn.HeaderText" xml:space="preserve">
<value>Value</value>
</data>
<metadata name="ColumnNotes.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="ColumnNotes.HeaderText" xml:space="preserve">
<value>Notes</value>
</data>
<data name="ColumnNotes.Width" type="System.Int32, mscorlib">
<value>5</value>
</data>
<data name="dataGridViewEx1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
@ -292,7 +301,7 @@
<value>dataGridViewEx1</value>
</data>
<data name="&gt;&gt;dataGridViewEx1.Type" xml:space="preserve">
<value>XenAdmin.Controls.DataGridViewEx.DataGridViewEx, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
<value>XenAdmin.Controls.DataGridViewEx.DataGridViewEx, [XenCenter_No_Space], Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;dataGridViewEx1.Parent" xml:space="preserve">
<value>$this</value>
@ -330,6 +339,12 @@
<data name="&gt;&gt;ValueColumn.Type" xml:space="preserve">
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;ColumnNotes.Name" xml:space="preserve">
<value>ColumnNotes</value>
</data>
<data name="&gt;&gt;ColumnNotes.Type" xml:space="preserve">
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>PDSection</value>
</data>

View File

@ -71,7 +71,7 @@ namespace XenAdmin.Controls
comboBoxCacheSr.Items.Clear();
// add the "Not configured" item first
var notConfiguredItem = new SrComboBoxItem(null, Messages.PVS_CACHE_NOT_CONFIGURED);
var notConfiguredItem = new SrComboBoxItem(null, Messages.NOT_CONFIGURED);
comboBoxCacheSr.Items.Add(notConfiguredItem);
// add Memory SR; if no memory SR found, add a placeholder (we will create the memory SR in ConfigurePvsCacheAction)

View File

@ -36,15 +36,21 @@ namespace XenAdmin.Controls.SummaryPanel
public interface ISummaryPanelView
{
string DrawTitle { set; }
string DrawWarningMessage { set; }
Bitmap DrawWarningIcon { set; }
string DrawHelperUrl { set; }
bool WarningTextVisiblity { set; }
bool WarningIconVisiblity { set; }
string DrawLicenseWarningMessage { set; }
string DrawSupportWarningMessage { set; }
Bitmap DrawLicenseWarningIcon { set; }
Bitmap DrawSupportWarningIcon { set; }
string DrawLicenseHelperUrlText { set; }
string DrawSupportHelperUrlText { set; }
bool LicenseWarningTextVisibility { set; }
bool LicenseWarningIconVisibility { set; }
bool SupportWarningTextVisibility { set; }
bool SupportWarningIconVisibility { set; }
string DrawSummaryText { set; }
string DrawSummaryLink { set; }
LinkArea DrawSummaryLinkArea { set; }
bool DrawHelperUrlVisible { set; }
bool DrawLicenseUrlVisible { set; }
bool DrawSupportUrlVisible { set; }
bool DrawInformationVisible { set; }
string DrawInformationText { set; }
Bitmap DrawInformationIcon { set; }

View File

@ -32,18 +32,26 @@
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.titleLabel = new System.Windows.Forms.Label();
this.information = new System.Windows.Forms.LinkLabel();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.warningImage = new System.Windows.Forms.PictureBox();
this.warningLabel = new System.Windows.Forms.Label();
this.supportWarningTableLayoutPanel = new System.Windows.Forms.TableLayoutPanel();
this.supportWarningImage = new System.Windows.Forms.PictureBox();
this.supportWarningLabel = new System.Windows.Forms.Label();
this.licenseWarningTableLayoutPabel = new System.Windows.Forms.TableLayoutPanel();
this.licenseWarningImage = new System.Windows.Forms.PictureBox();
this.licenseWarningLabel = new System.Windows.Forms.Label();
this.informationLayoutPanel = new System.Windows.Forms.TableLayoutPanel();
this.informationImage = new System.Windows.Forms.PictureBox();
this.informationLabel = new System.Windows.Forms.Label();
this.helperLink = new System.Windows.Forms.LinkLabel();
this.helperLinksFlowLayoutPanel = new System.Windows.Forms.FlowLayoutPanel();
this.licenseHelperLinkLabel = new System.Windows.Forms.LinkLabel();
this.supportHelperLinkLabel = new System.Windows.Forms.LinkLabel();
this.tableLayoutPanel1.SuspendLayout();
this.tableLayoutPanel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.warningImage)).BeginInit();
this.supportWarningTableLayoutPanel.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.supportWarningImage)).BeginInit();
this.licenseWarningTableLayoutPabel.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.licenseWarningImage)).BeginInit();
this.informationLayoutPanel.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.informationImage)).BeginInit();
this.helperLinksFlowLayoutPanel.SuspendLayout();
this.SuspendLayout();
//
// tableLayoutPanel1
@ -51,9 +59,10 @@
resources.ApplyResources(this.tableLayoutPanel1, "tableLayoutPanel1");
this.tableLayoutPanel1.Controls.Add(this.titleLabel, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.information, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.tableLayoutPanel2, 0, 2);
this.tableLayoutPanel1.Controls.Add(this.informationLayoutPanel, 0, 3);
this.tableLayoutPanel1.Controls.Add(this.helperLink, 0, 4);
this.tableLayoutPanel1.Controls.Add(this.supportWarningTableLayoutPanel, 0, 3);
this.tableLayoutPanel1.Controls.Add(this.licenseWarningTableLayoutPabel, 0, 2);
this.tableLayoutPanel1.Controls.Add(this.informationLayoutPanel, 0, 4);
this.tableLayoutPanel1.Controls.Add(this.helperLinksFlowLayoutPanel, 0, 6);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
//
// titleLabel
@ -67,24 +76,43 @@
resources.ApplyResources(this.information, "information");
this.information.Name = "information";
//
// tableLayoutPanel2
// supportWarningTableLayoutPanel
//
resources.ApplyResources(this.tableLayoutPanel2, "tableLayoutPanel2");
this.tableLayoutPanel2.Controls.Add(this.warningImage, 0, 0);
this.tableLayoutPanel2.Controls.Add(this.warningLabel, 1, 0);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
resources.ApplyResources(this.supportWarningTableLayoutPanel, "supportWarningTableLayoutPanel");
this.supportWarningTableLayoutPanel.Controls.Add(this.supportWarningImage, 0, 0);
this.supportWarningTableLayoutPanel.Controls.Add(this.supportWarningLabel, 1, 0);
this.supportWarningTableLayoutPanel.Name = "supportWarningTableLayoutPanel";
//
// warningImage
// supportWarningImage
//
resources.ApplyResources(this.warningImage, "warningImage");
this.warningImage.Name = "warningImage";
this.warningImage.TabStop = false;
resources.ApplyResources(this.supportWarningImage, "supportWarningImage");
this.supportWarningImage.Name = "supportWarningImage";
this.supportWarningImage.TabStop = false;
//
// warningLabel
// supportWarningLabel
//
resources.ApplyResources(this.warningLabel, "warningLabel");
this.warningLabel.AutoEllipsis = true;
this.warningLabel.Name = "warningLabel";
resources.ApplyResources(this.supportWarningLabel, "supportWarningLabel");
this.supportWarningLabel.AutoEllipsis = true;
this.supportWarningLabel.Name = "supportWarningLabel";
//
// licenseWarningTableLayoutPabel
//
resources.ApplyResources(this.licenseWarningTableLayoutPabel, "licenseWarningTableLayoutPabel");
this.licenseWarningTableLayoutPabel.Controls.Add(this.licenseWarningImage, 0, 0);
this.licenseWarningTableLayoutPabel.Controls.Add(this.licenseWarningLabel, 1, 0);
this.licenseWarningTableLayoutPabel.Name = "licenseWarningTableLayoutPabel";
//
// licenseWarningImage
//
resources.ApplyResources(this.licenseWarningImage, "licenseWarningImage");
this.licenseWarningImage.Name = "licenseWarningImage";
this.licenseWarningImage.TabStop = false;
//
// licenseWarningLabel
//
resources.ApplyResources(this.licenseWarningLabel, "licenseWarningLabel");
this.licenseWarningLabel.AutoEllipsis = true;
this.licenseWarningLabel.Name = "licenseWarningLabel";
//
// informationLayoutPanel
//
@ -105,11 +133,24 @@
this.informationLabel.AutoEllipsis = true;
this.informationLabel.Name = "informationLabel";
//
// helperLink
// helperLinksFlowLayoutPanel
//
this.helperLink.AutoEllipsis = true;
resources.ApplyResources(this.helperLink, "helperLink");
this.helperLink.Name = "helperLink";
this.helperLinksFlowLayoutPanel.Controls.Add(this.licenseHelperLinkLabel);
this.helperLinksFlowLayoutPanel.Controls.Add(this.supportHelperLinkLabel);
resources.ApplyResources(this.helperLinksFlowLayoutPanel, "helperLinksFlowLayoutPanel");
this.helperLinksFlowLayoutPanel.Name = "helperLinksFlowLayoutPanel";
//
// licenseHelperLinkLabel
//
this.licenseHelperLinkLabel.AutoEllipsis = true;
resources.ApplyResources(this.licenseHelperLinkLabel, "licenseHelperLinkLabel");
this.licenseHelperLinkLabel.Name = "licenseHelperLinkLabel";
//
// supportHelperLinkLabel
//
this.supportHelperLinkLabel.AutoEllipsis = true;
resources.ApplyResources(this.supportHelperLinkLabel, "supportHelperLinkLabel");
this.supportHelperLinkLabel.Name = "supportHelperLinkLabel";
//
// SummaryPanel
//
@ -119,12 +160,17 @@
this.Name = "SummaryPanel";
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
this.tableLayoutPanel2.ResumeLayout(false);
this.tableLayoutPanel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.warningImage)).EndInit();
this.supportWarningTableLayoutPanel.ResumeLayout(false);
this.supportWarningTableLayoutPanel.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.supportWarningImage)).EndInit();
this.licenseWarningTableLayoutPabel.ResumeLayout(false);
this.licenseWarningTableLayoutPabel.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.licenseWarningImage)).EndInit();
this.informationLayoutPanel.ResumeLayout(false);
this.informationLayoutPanel.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.informationImage)).EndInit();
this.helperLinksFlowLayoutPanel.ResumeLayout(false);
this.helperLinksFlowLayoutPanel.PerformLayout();
this.ResumeLayout(false);
}
@ -132,14 +178,19 @@
#endregion
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.PictureBox warningImage;
private System.Windows.Forms.Label warningLabel;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
private System.Windows.Forms.LinkLabel helperLink;
private System.Windows.Forms.PictureBox licenseWarningImage;
private System.Windows.Forms.Label licenseWarningLabel;
private System.Windows.Forms.TableLayoutPanel licenseWarningTableLayoutPabel;
private System.Windows.Forms.LinkLabel licenseHelperLinkLabel;
private System.Windows.Forms.Label titleLabel;
private System.Windows.Forms.LinkLabel information;
private System.Windows.Forms.TableLayoutPanel informationLayoutPanel;
private System.Windows.Forms.PictureBox informationImage;
private System.Windows.Forms.Label informationLabel;
private System.Windows.Forms.TableLayoutPanel supportWarningTableLayoutPanel;
private System.Windows.Forms.PictureBox supportWarningImage;
private System.Windows.Forms.Label supportWarningLabel;
private System.Windows.Forms.FlowLayoutPanel helperLinksFlowLayoutPanel;
private System.Windows.Forms.LinkLabel supportHelperLinkLabel;
}
}

View File

@ -41,7 +41,8 @@ namespace XenAdmin.Controls.SummaryPanel
public SummaryPanel()
{
InitializeComponent();
helperLink.LinkClicked += helperLink_LinkClicked;
licenseHelperLinkLabel.LinkClicked += licenseHelperLink_LinkClicked;
supportHelperLinkLabel.LinkClicked += supportHelperLink_LinkClicked;
information.LinkClicked += information_LinkClicked;
}
@ -50,19 +51,34 @@ namespace XenAdmin.Controls.SummaryPanel
set{ Controller.Title = value; }
}
public string HelperUrl
public string LicenseHelperUrlText
{
set { Controller.HelperUrl = value; }
set { Controller.LicenseHelperUrlText = value; }
}
public bool HelperUrlVisible
public string SupportHelperUrlText
{
set { Controller.HelperUrlVisible = value; }
set { Controller.SupportHelperUrlText = value; }
}
public bool WarningVisible
public bool LicenseHelperUrlVisible
{
set { Controller.DisplayWarning = value; }
set { Controller.LicenseHelperUrlVisible = value; }
}
public bool SupportHelperUrlVisible
{
set { Controller.SupportHelperUrlVisible = value; }
}
public bool LicenseWarningVisible
{
set { Controller.DisplayLicenseWarning = value; }
}
public bool SupportWarningVisible
{
set { Controller.DisplaySupportWarning = value; }
}
public bool InformationVisible
@ -70,14 +86,24 @@ namespace XenAdmin.Controls.SummaryPanel
set { Controller.InformationVisible = value; }
}
public string WarningText
public string LicenseWarningText
{
set { Controller.WarningMessage = value; }
set { Controller.LicenseWarningMessage = value; }
}
public Action RunOnUrlClick
public string SupportWarningText
{
set { Controller.RunOnUrlClick = value; }
set { Controller.SupportWarningMessage = value; }
}
public Action RunOnLicenseUrlClick
{
set { Controller.RunOnLicenseUrlClick = value; }
}
public Action RunOnSupportUrlClick
{
set { Controller.RunOnSupportUrlClick = value; }
}
public SummaryTextComponent SummaryText
@ -90,14 +116,25 @@ namespace XenAdmin.Controls.SummaryPanel
set { Controller.InformationText = value; }
}
public Bitmap WarningIcon
public Bitmap LicenseWarningIcon
{
set { Controller.WarningIcon = value; }
set { Controller.LicenseWarningIcon = value; }
}
private void helperLink_LinkClicked(object sender, EventArgs e)
public Bitmap SupportWarningIcon
{
set { Controller.SupportWarningIcon = value; }
}
private void licenseHelperLink_LinkClicked(object sender, EventArgs e)
{
Controller.UrlClicked();
Controller.LicenseUrlClicked();
}
private void supportHelperLink_LinkClicked(object sender, EventArgs e)
{
Controller.SupportUrlClicked();
}
private string summaryLink;
@ -116,15 +153,27 @@ namespace XenAdmin.Controls.SummaryPanel
}
[EditorBrowsable(EditorBrowsableState.Never)]
public string DrawWarningMessage
public string DrawLicenseWarningMessage
{
set { warningLabel.Text = value; }
set { licenseWarningLabel.Text = value; }
}
[EditorBrowsable(EditorBrowsableState.Never)]
public Bitmap DrawWarningIcon
public string DrawSupportWarningMessage
{
set { warningImage.Image = value; }
set { supportWarningLabel.Text = value; }
}
[EditorBrowsable(EditorBrowsableState.Never)]
public Bitmap DrawLicenseWarningIcon
{
set { licenseWarningImage.Image = value; }
}
[EditorBrowsable(EditorBrowsableState.Never)]
public Bitmap DrawSupportWarningIcon
{
set { supportWarningImage.Image = value; }
}
[EditorBrowsable(EditorBrowsableState.Never)]
@ -134,21 +183,39 @@ namespace XenAdmin.Controls.SummaryPanel
}
[EditorBrowsable(EditorBrowsableState.Never)]
public string DrawHelperUrl
public string DrawLicenseHelperUrlText
{
set { helperLink.Text = value; }
set { licenseHelperLinkLabel.Text = value; }
}
[EditorBrowsable(EditorBrowsableState.Never)]
public bool WarningTextVisiblity
public string DrawSupportHelperUrlText
{
set { warningLabel.Visible = value; }
set { supportHelperLinkLabel.Text = value; }
}
[EditorBrowsable(EditorBrowsableState.Never)]
public bool WarningIconVisiblity
public bool LicenseWarningTextVisibility
{
set { warningImage.Visible = value; }
set { licenseWarningLabel.Visible = value; }
}
[EditorBrowsable(EditorBrowsableState.Never)]
public bool SupportWarningTextVisibility
{
set { supportWarningLabel.Visible = value; }
}
[EditorBrowsable(EditorBrowsableState.Never)]
public bool LicenseWarningIconVisibility
{
set { licenseWarningImage.Visible = value; }
}
[EditorBrowsable(EditorBrowsableState.Never)]
public bool SupportWarningIconVisibility
{
set { supportWarningImage.Visible = value; }
}
[EditorBrowsable(EditorBrowsableState.Never)]
@ -174,9 +241,15 @@ namespace XenAdmin.Controls.SummaryPanel
}
[EditorBrowsable(EditorBrowsableState.Never)]
public bool DrawHelperUrlVisible
public bool DrawLicenseUrlVisible
{
set { helperLink.Visible = value; }
set { licenseHelperLinkLabel.Visible = value; }
}
[EditorBrowsable(EditorBrowsableState.Never)]
public bool DrawSupportUrlVisible
{
set { supportHelperLinkLabel.Visible = value; }
}
[EditorBrowsable(EditorBrowsableState.Never)]

View File

@ -183,101 +183,206 @@
<data name="&gt;&gt;information.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="tableLayoutPanel2.ColumnCount" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="warningImage.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 0</value>
</data>
<data name="warningImage.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 0, 3, 0</value>
</data>
<data name="warningImage.Size" type="System.Drawing.Size, System.Drawing">
<value>16, 45</value>
</data>
<data name="warningImage.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
<value>CenterImage</value>
</data>
<data name="warningImage.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;warningImage.Name" xml:space="preserve">
<value>warningImage</value>
</data>
<data name="&gt;&gt;warningImage.Type" xml:space="preserve">
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;warningImage.Parent" xml:space="preserve">
<value>tableLayoutPanel2</value>
</data>
<data name="&gt;&gt;warningImage.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="warningLabel.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Left, Right</value>
</data>
<data name="warningLabel.AutoSize" type="System.Boolean, mscorlib">
<data name="supportWarningTableLayoutPanel.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="warningLabel.Font" type="System.Drawing.Font, System.Drawing">
<value>Microsoft Sans Serif, 8.25pt, style=Bold</value>
<data name="supportWarningTableLayoutPanel.ColumnCount" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="warningLabel.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<data name="supportWarningImage.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="warningLabel.Location" type="System.Drawing.Point, System.Drawing">
<value>25, 16</value>
<data name="supportWarningImage.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 0</value>
</data>
<data name="warningLabel.Size" type="System.Drawing.Size, System.Drawing">
<value>201, 13</value>
</data>
<data name="warningLabel.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="&gt;&gt;warningLabel.Name" xml:space="preserve">
<value>warningLabel</value>
</data>
<data name="&gt;&gt;warningLabel.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;warningLabel.Parent" xml:space="preserve">
<value>tableLayoutPanel2</value>
</data>
<data name="&gt;&gt;warningLabel.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="tableLayoutPanel2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="tableLayoutPanel2.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 55</value>
</data>
<data name="tableLayoutPanel2.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<data name="supportWarningImage.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 0, 3, 0</value>
</data>
<data name="tableLayoutPanel2.RowCount" type="System.Int32, mscorlib">
<data name="supportWarningImage.Size" type="System.Drawing.Size, System.Drawing">
<value>16, 45</value>
</data>
<data name="supportWarningImage.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
<value>CenterImage</value>
</data>
<data name="supportWarningImage.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;supportWarningImage.Name" xml:space="preserve">
<value>supportWarningImage</value>
</data>
<data name="&gt;&gt;supportWarningImage.Type" xml:space="preserve">
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;supportWarningImage.Parent" xml:space="preserve">
<value>supportWarningTableLayoutPanel</value>
</data>
<data name="&gt;&gt;supportWarningImage.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="supportWarningLabel.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Left, Right</value>
</data>
<data name="supportWarningLabel.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="supportWarningLabel.Font" type="System.Drawing.Font, System.Drawing">
<value>Microsoft Sans Serif, 8.25pt, style=Bold</value>
</data>
<data name="supportWarningLabel.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="supportWarningLabel.Location" type="System.Drawing.Point, System.Drawing">
<value>25, 16</value>
</data>
<data name="supportWarningLabel.Size" type="System.Drawing.Size, System.Drawing">
<value>201, 13</value>
</data>
<data name="supportWarningLabel.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="tableLayoutPanel2.Size" type="System.Drawing.Size, System.Drawing">
<data name="&gt;&gt;supportWarningLabel.Name" xml:space="preserve">
<value>supportWarningLabel</value>
</data>
<data name="&gt;&gt;supportWarningLabel.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;supportWarningLabel.Parent" xml:space="preserve">
<value>supportWarningTableLayoutPanel</value>
</data>
<data name="&gt;&gt;supportWarningLabel.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="supportWarningTableLayoutPanel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="supportWarningTableLayoutPanel.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 109</value>
</data>
<data name="supportWarningTableLayoutPanel.RowCount" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="supportWarningTableLayoutPanel.Size" type="System.Drawing.Size, System.Drawing">
<value>229, 45</value>
</data>
<data name="tableLayoutPanel2.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
<data name="supportWarningTableLayoutPanel.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
</data>
<data name="&gt;&gt;tableLayoutPanel2.Name" xml:space="preserve">
<value>tableLayoutPanel2</value>
<data name="&gt;&gt;supportWarningTableLayoutPanel.Name" xml:space="preserve">
<value>supportWarningTableLayoutPanel</value>
</data>
<data name="&gt;&gt;tableLayoutPanel2.Type" xml:space="preserve">
<data name="&gt;&gt;supportWarningTableLayoutPanel.Type" xml:space="preserve">
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tableLayoutPanel2.Parent" xml:space="preserve">
<data name="&gt;&gt;supportWarningTableLayoutPanel.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;tableLayoutPanel2.ZOrder" xml:space="preserve">
<data name="&gt;&gt;supportWarningTableLayoutPanel.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="tableLayoutPanel2.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="warningImage" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="warningLabel" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,Percent,100" /&gt;&lt;Rows Styles="Percent,100" /&gt;&lt;/TableLayoutSettings&gt;</value>
<data name="supportWarningTableLayoutPanel.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="supportWarningImage" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="supportWarningLabel" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,Percent,100" /&gt;&lt;Rows Styles="Percent,100,Absolute,45" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="licenseWarningTableLayoutPabel.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="licenseWarningTableLayoutPabel.ColumnCount" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="licenseWarningImage.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="licenseWarningImage.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 0</value>
</data>
<data name="licenseWarningImage.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 0, 3, 0</value>
</data>
<data name="licenseWarningImage.Size" type="System.Drawing.Size, System.Drawing">
<value>16, 45</value>
</data>
<data name="licenseWarningImage.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
<value>CenterImage</value>
</data>
<data name="licenseWarningImage.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;licenseWarningImage.Name" xml:space="preserve">
<value>licenseWarningImage</value>
</data>
<data name="&gt;&gt;licenseWarningImage.Type" xml:space="preserve">
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;licenseWarningImage.Parent" xml:space="preserve">
<value>licenseWarningTableLayoutPabel</value>
</data>
<data name="&gt;&gt;licenseWarningImage.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="licenseWarningLabel.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Left, Right</value>
</data>
<data name="licenseWarningLabel.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="licenseWarningLabel.Font" type="System.Drawing.Font, System.Drawing">
<value>Microsoft Sans Serif, 8.25pt, style=Bold</value>
</data>
<data name="licenseWarningLabel.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="licenseWarningLabel.Location" type="System.Drawing.Point, System.Drawing">
<value>25, 16</value>
</data>
<data name="licenseWarningLabel.Size" type="System.Drawing.Size, System.Drawing">
<value>201, 13</value>
</data>
<data name="licenseWarningLabel.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="&gt;&gt;licenseWarningLabel.Name" xml:space="preserve">
<value>licenseWarningLabel</value>
</data>
<data name="&gt;&gt;licenseWarningLabel.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;licenseWarningLabel.Parent" xml:space="preserve">
<value>licenseWarningTableLayoutPabel</value>
</data>
<data name="&gt;&gt;licenseWarningLabel.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="licenseWarningTableLayoutPabel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="licenseWarningTableLayoutPabel.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 58</value>
</data>
<data name="licenseWarningTableLayoutPabel.RowCount" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="licenseWarningTableLayoutPabel.Size" type="System.Drawing.Size, System.Drawing">
<value>229, 45</value>
</data>
<data name="licenseWarningTableLayoutPabel.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="&gt;&gt;licenseWarningTableLayoutPabel.Name" xml:space="preserve">
<value>licenseWarningTableLayoutPabel</value>
</data>
<data name="&gt;&gt;licenseWarningTableLayoutPabel.Type" xml:space="preserve">
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;licenseWarningTableLayoutPabel.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;licenseWarningTableLayoutPabel.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="licenseWarningTableLayoutPabel.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="licenseWarningImage" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="licenseWarningLabel" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,Percent,100" /&gt;&lt;Rows Styles="Percent,100,Absolute,45" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="informationLayoutPanel.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="informationLayoutPanel.ColumnCount" type="System.Int32, mscorlib">
<value>2</value>
@ -319,7 +424,7 @@
<value>NoControl</value>
</data>
<data name="informationLabel.Location" type="System.Drawing.Point, System.Drawing">
<value>25, 13</value>
<value>25, 44</value>
</data>
<data name="informationLabel.Size" type="System.Drawing.Size, System.Drawing">
<value>0, 13</value>
@ -339,14 +444,17 @@
<data name="&gt;&gt;informationLabel.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="informationLayoutPanel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="informationLayoutPanel.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 103</value>
<value>3, 160</value>
</data>
<data name="informationLayoutPanel.RowCount" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="informationLayoutPanel.Size" type="System.Drawing.Size, System.Drawing">
<value>229, 40</value>
<value>229, 102</value>
</data>
<data name="informationLayoutPanel.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
@ -361,37 +469,94 @@
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;informationLayoutPanel.ZOrder" xml:space="preserve">
<value>3</value>
<value>4</value>
</data>
<data name="informationLayoutPanel.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="informationImage" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="informationLabel" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,Percent,100" /&gt;&lt;Rows Styles="Percent,100" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="helperLink.AutoSize" type="System.Boolean, mscorlib">
<data name="licenseHelperLinkLabel.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="helperLink.Location" type="System.Drawing.Point, System.Drawing">
<value>8, 274</value>
<data name="licenseHelperLinkLabel.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="helperLink.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>8, 3, 3, 8</value>
<data name="licenseHelperLinkLabel.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 3</value>
</data>
<data name="helperLink.Size" type="System.Drawing.Size, System.Drawing">
<data name="licenseHelperLinkLabel.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="licenseHelperLinkLabel.Size" type="System.Drawing.Size, System.Drawing">
<value>0, 13</value>
</data>
<data name="helperLink.TabIndex" type="System.Int32, mscorlib">
<data name="licenseHelperLinkLabel.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="&gt;&gt;helperLink.Name" xml:space="preserve">
<value>helperLink</value>
<data name="&gt;&gt;licenseHelperLinkLabel.Name" xml:space="preserve">
<value>licenseHelperLinkLabel</value>
</data>
<data name="&gt;&gt;helperLink.Type" xml:space="preserve">
<data name="&gt;&gt;licenseHelperLinkLabel.Type" xml:space="preserve">
<value>System.Windows.Forms.LinkLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;helperLink.Parent" xml:space="preserve">
<data name="&gt;&gt;licenseHelperLinkLabel.Parent" xml:space="preserve">
<value>helperLinksFlowLayoutPanel</value>
</data>
<data name="&gt;&gt;licenseHelperLinkLabel.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="supportHelperLinkLabel.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="supportHelperLinkLabel.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="supportHelperLinkLabel.Location" type="System.Drawing.Point, System.Drawing">
<value>9, 3</value>
</data>
<data name="supportHelperLinkLabel.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="supportHelperLinkLabel.Size" type="System.Drawing.Size, System.Drawing">
<value>0, 13</value>
</data>
<data name="supportHelperLinkLabel.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="&gt;&gt;supportHelperLinkLabel.Name" xml:space="preserve">
<value>supportHelperLinkLabel</value>
</data>
<data name="&gt;&gt;supportHelperLinkLabel.Type" xml:space="preserve">
<value>System.Windows.Forms.LinkLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;supportHelperLinkLabel.Parent" xml:space="preserve">
<value>helperLinksFlowLayoutPanel</value>
</data>
<data name="&gt;&gt;supportHelperLinkLabel.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="helperLinksFlowLayoutPanel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="helperLinksFlowLayoutPanel.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 268</value>
</data>
<data name="helperLinksFlowLayoutPanel.Size" type="System.Drawing.Size, System.Drawing">
<value>229, 24</value>
</data>
<data name="helperLinksFlowLayoutPanel.TabIndex" type="System.Int32, mscorlib">
<value>8</value>
</data>
<data name="&gt;&gt;helperLinksFlowLayoutPanel.Name" xml:space="preserve">
<value>helperLinksFlowLayoutPanel</value>
</data>
<data name="&gt;&gt;helperLinksFlowLayoutPanel.Type" xml:space="preserve">
<value>System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;helperLinksFlowLayoutPanel.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;helperLink.ZOrder" xml:space="preserve">
<value>4</value>
<data name="&gt;&gt;helperLinksFlowLayoutPanel.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="tableLayoutPanel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
@ -400,7 +565,7 @@
<value>0, 0</value>
</data>
<data name="tableLayoutPanel1.RowCount" type="System.Int32, mscorlib">
<value>5</value>
<value>7</value>
</data>
<data name="tableLayoutPanel1.Size" type="System.Drawing.Size, System.Drawing">
<value>235, 295</value>
@ -421,7 +586,7 @@
<value>0</value>
</data>
<data name="tableLayoutPanel1.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="titleLabel" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="information" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="tableLayoutPanel2" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="informationLayoutPanel" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="helperLink" Row="4" 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,AutoSize,0,Absolute,20" /&gt;&lt;/TableLayoutSettings&gt;</value>
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="titleLabel" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="information" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="supportWarningTableLayoutPanel" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="licenseWarningTableLayoutPabel" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="informationLayoutPanel" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="helperLinksFlowLayoutPanel" Row="6" 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,AutoSize,0,Percent,100,AutoSize,0,Absolute,30" /&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

@ -51,19 +51,37 @@ namespace XenAdmin.Controls.SummaryPanel
set { View.DrawTitle = value; }
}
public string HelperUrl
public string LicenseHelperUrlText
{
set { View.DrawHelperUrl = value; }
set { View.DrawLicenseHelperUrlText = value; }
}
public bool HelperUrlVisible
public string SupportHelperUrlText
{
set { View.DrawHelperUrlVisible = value; }
set { View.DrawSupportHelperUrlText = value; }
}
public string WarningMessage
public bool LicenseHelperUrlVisible
{
set { View.DrawWarningMessage = value; }
set { View.DrawLicenseUrlVisible = value; }
}
public bool SupportHelperUrlVisible
{
set { View.DrawSupportUrlVisible = value; }
}
public string LicenseWarningMessage
{
set { View.DrawLicenseWarningMessage = value; }
}
public string SupportWarningMessage
{
set
{
View.DrawSupportWarningMessage = value;
}
}
public bool InformationVisible
@ -76,9 +94,14 @@ namespace XenAdmin.Controls.SummaryPanel
set { View.DrawInformationText = value; }
}
public Bitmap WarningIcon
public Bitmap LicenseWarningIcon
{
set { View.DrawWarningIcon = value; }
set { View.DrawLicenseWarningIcon = value; }
}
public Bitmap SupportWarningIcon
{
set { View.DrawSupportWarningIcon = value; }
}
public SummaryTextComponent TextSummary
@ -91,20 +114,35 @@ namespace XenAdmin.Controls.SummaryPanel
}
}
public Action RunOnUrlClick { private get; set; }
public Action RunOnLicenseUrlClick { private get; set; }
public void UrlClicked()
public Action RunOnSupportUrlClick { private get; set; }
public void LicenseUrlClicked()
{
if (RunOnUrlClick != null)
RunOnUrlClick.Invoke();
RunOnLicenseUrlClick?.Invoke();
}
public bool DisplayWarning
public void SupportUrlClicked()
{
RunOnSupportUrlClick?.Invoke();
}
public bool DisplayLicenseWarning
{
set
{
View.WarningIconVisiblity = value;
View.WarningTextVisiblity = value;
View.LicenseWarningIconVisibility = value;
View.LicenseWarningTextVisibility = value;
}
}
public bool DisplaySupportWarning
{
set
{
View.SupportWarningIconVisibility = value;
View.SupportWarningTextVisibility = value;
}
}
}

View File

@ -54,6 +54,6 @@ namespace XenAdmin.Diagnostics.Problems.HostProblem
public override string HelpMessage => LinkText;
public override Uri UriToLaunch => new Uri(InvisibleMessages.UPSELL_SA);
public override Uri UriToLaunch => new Uri(InvisibleMessages.LICENSE_BUY_URL);
}
}

View File

@ -47,10 +47,10 @@ namespace XenAdmin.Diagnostics.Problems.PoolProblem
public override string Message => string.Format(_upgradingToVersionWithDeprecation
? Messages.POOL_HAS_DEPRECATED_FCOE_WARNING
: Messages.POOL_MAY_HAVE_DEPRECATED_FCOE_WARNING,
BrandManager.ProductVersionPost82);
$"{BrandManager.ProductBrand} {BrandManager.ProductVersionPost82}");
public override string Description => string.Format(Messages.POOL_HAS_DEPRECATED_FCOE_SHORT,
_pool, BrandManager.ProductVersionPost82);
_pool, $"{BrandManager.ProductBrand} {BrandManager.ProductVersionPost82}");
public PoolHasFCoESrWarning(Check check, Pool pool, bool upgradingToVersionWithDeprecation)
: base(check)

View File

@ -41,7 +41,7 @@ namespace XenAdmin.Dialogs
LicenseManagerController Controller { set; }
void DrawRowsInGrid(List<CheckableDataGridViewRow> itemsToShow);
void DrawSelectedRowsAsChecked(List<CheckableDataGridViewRow> rows);
void DrawSummaryForHighlightedRow(CheckableDataGridViewRow row, SummaryTextComponent component, Action runOnUrlClick);
void DrawSummaryForHighlightedRow(CheckableDataGridViewRow row, SummaryTextComponent component, Action runOnLicenseUrlClick, Action runOnSupportUrlClick);
void DrawHighlightedRow(CheckableDataGridViewRow row);
void DrawRowStatusIcon(int rowIndex, LicenseDataGridViewRow.Status rowStatus);
void DrawAssignButtonAsDisabled(bool isDisabled);

View File

@ -29,7 +29,6 @@
*/
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Windows.Forms;
using XenAdmin.Dialogs;
@ -40,22 +39,9 @@ namespace XenAdmin.Controls
public class LicenseCheckableDataGridView : CheckableDataGridView.CheckableDataGridView, ILicenseCheckableDataGridViewView
{
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public DataGridViewImageColumn StatusImageColumn
{
get
{
Debug.Assert(_statusImageColumn != null);
return _statusImageColumn;
}
set { _statusImageColumn = value; }
}
public DataGridViewImageColumn StatusImageColumn { get; set; }
private DataGridViewImageColumn _statusImageColumn;
private LicenseCheckableDataGridViewController LicenseController
{
get { return Controller as LicenseCheckableDataGridViewController; }
}
private LicenseCheckableDataGridViewController LicenseController => Controller as LicenseCheckableDataGridViewController;
public LicenseCheckableDataGridView()
{
@ -106,12 +92,14 @@ namespace XenAdmin.Controls
Value = new Bitmap(1, 1)
};
if (status == LicenseDataGridViewRow.Status.Information)
cell.Value = Images.StaticImages._000_Alert2_h32bit_16;
if (status == LicenseDataGridViewRow.Status.Warning)
cell.Value = Images.StaticImages._000_Alert2_h32bit_16;
if (status == LicenseDataGridViewRow.Status.Error)
cell.Value = Images.StaticImages._000_error_h32bit_16;
if (status == LicenseDataGridViewRow.Status.Ok)
cell.Value = Images.StaticImages._000_Tick_h32bit_16;
if (status == LicenseDataGridViewRow.Status.Passable)
cell.Value = Images.StaticImages._000_Tick_yellow_h32bit_16;
if (r.Cells[StatusImageColumn.Index] is DataGridViewImageCell)
r.Cells[StatusImageColumn.Index] = cell;

View File

@ -31,6 +31,7 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using XenAdmin.Controls.CheckableDataGridView;
using XenAdmin.Core;
using XenAPI;
@ -41,10 +42,12 @@ namespace XenAdmin.Dialogs
{
public enum Status
{
Error,
Warning,
Information,
Ok,
Updating
Updating,
// CP-43000: to be used for post Nile hosts using trial edition
Passable
}
private readonly ILicenseStatus licenseStatus;
@ -80,10 +83,10 @@ namespace XenAdmin.Dialogs
Disabled = true;
Queue<object> cellDetails = new Queue<object>();
cellDetails.Enqueue(XenObject.Name());
cellDetails.Enqueue(XenObject?.Name());
cellDetails.Enqueue(LicenseName);
cellDetails.Enqueue(new Bitmap(1,1));
cellDetails.Enqueue(LicenseStatus);
cellDetails.Enqueue(OverallStatus);
return cellDetails;
}
}
@ -136,89 +139,167 @@ namespace XenAdmin.Dialogs
}
}
public override bool WarningRequired
public override bool LicenseWarningRequired => ShouldShowLicenseWarningText(out _, out _);
public override string LicenseWarningText
{
get
{
if (!licenseStatus.Updated)
return false;
if (CurrentLicenseState == Dialogs.LicenseStatus.HostState.Unknown)
return false;
return true;
var _ = ShouldShowLicenseWarningText(out var text, out var _);
return text;
}
}
public override string WarningText
public override bool SupportWarningRequired => ShouldShowSupportWarningText(out _, out _);
public override string SupportWarningText
{
get
{
switch (CurrentLicenseState)
var _ = ShouldShowSupportWarningText(out var text, out var _);
return text;
}
}
private bool ShouldShowSupportWarningText(out string text, out Status status)
{
text = null;
status = Status.Ok;
if (XenObjectHost == null || XenObjectHost.IsInPreviewRelease() || !Helpers.NileOrGreater(XenObjectHost))
{
return false;
}
if (XenObjectHost.CssLicenseHasExpired())
{
status = Status.Error;
text = $"{Messages.LICENSE_MANAGER_EXPIRED_CSS_LONG}{Environment.NewLine}{Messages.EXPIRED_CSS_UPSELLING_MESSAGE_POOL}";
}
else
{
status = Status.Ok;
text = Messages.LICENSE_MANAGER_ACTIVE_CSS_LONG;
}
return true;
}
private bool ShouldShowLicenseWarningText(out string text, out Status status)
{
text = null;
status = Status.Ok;
if (XenObjectHost == null)
{
return false;
}
switch (CurrentLicenseState)
{
case Dialogs.LicenseStatus.HostState.Free:
{
case Dialogs.LicenseStatus.HostState.Free:
{
Pool pool = Helpers.GetPool(XenObjectHost.Connection);
if (Dialogs.LicenseStatus.PoolIsMixedFreeAndExpiring(pool))
return Messages.POOL_IS_PARTIALLY_LICENSED;
return licenseStatus.LicenseEntitlements;
}
case Dialogs.LicenseStatus.HostState.PartiallyLicensed:
return Messages.POOL_IS_PARTIALLY_LICENSED;
case Dialogs.LicenseStatus.HostState.Licensed:
{
Pool pool = Helpers.GetPool(XenObjectHost.Connection);
if (Dialogs.LicenseStatus.PoolHasMixedLicenses(pool))
return Messages.POOL_HAS_MIXED_LICENSES;
if (Dialogs.LicenseStatus.PoolIsPartiallyLicensed(pool))
return Messages.POOL_IS_PARTIALLY_LICENSED;
return licenseStatus.LicenseEntitlements;
}
case Dialogs.LicenseStatus.HostState.Unavailable:
return Messages.LICENSE_EXPIRED_NO_LICENSES_AVAILABLE;
case Dialogs.LicenseStatus.HostState.Expired:
return Messages.LICENSE_YOUR_LICENCE_HAS_EXPIRED;
case Dialogs.LicenseStatus.HostState.RegularGrace:
case Dialogs.LicenseStatus.HostState.UpgradeGrace:
case Dialogs.LicenseStatus.HostState.ExpiresSoon:
return string.Format(Messages.LICENSE_YOUR_LICENCE_EXPIRES_IN, licenseStatus.LicenseExpiresIn.FuzzyTime());
default:
return Messages.UNKNOWN;
var pool = Helpers.GetPool(XenObjectHost.Connection);
text = Dialogs.LicenseStatus.PoolIsMixedFreeAndExpiring(pool) ? Messages.POOL_IS_PARTIALLY_LICENSED : licenseStatus.LicenseEntitlements;
status = Helpers.CloudOrGreater(XenObjectHost) ? Status.Passable :Status.Error;
}
break;
case Dialogs.LicenseStatus.HostState.PartiallyLicensed:
text = Messages.POOL_IS_PARTIALLY_LICENSED;
status = Status.Warning;
break;
case Dialogs.LicenseStatus.HostState.Licensed:
{
var pool = Helpers.GetPool(XenObjectHost.Connection);
if (Dialogs.LicenseStatus.PoolHasMixedLicenses(pool))
{
text = Messages.POOL_HAS_MIXED_LICENSES;
}
else if (Dialogs.LicenseStatus.PoolIsPartiallyLicensed(pool))
{
text = Messages.POOL_IS_PARTIALLY_LICENSED;
}
else
{
text = licenseStatus.LicenseEntitlements;
}
status = Status.Ok;
}
break;
case Dialogs.LicenseStatus.HostState.Unavailable:
text = Messages.LICENSE_EXPIRED_NO_LICENSES_AVAILABLE;
status = Status.Error;
break;
case Dialogs.LicenseStatus.HostState.Expired:
text = Messages.LICENSE_YOUR_LICENCE_HAS_EXPIRED;
status = Status.Error;
break;
case Dialogs.LicenseStatus.HostState.RegularGrace:
case Dialogs.LicenseStatus.HostState.UpgradeGrace:
case Dialogs.LicenseStatus.HostState.ExpiresSoon:
text = string.Format(Messages.LICENSE_YOUR_LICENCE_EXPIRES_IN, licenseStatus.LicenseExpiresIn.FuzzyTime());
status = Status.Warning;
break;
case Dialogs.LicenseStatus.HostState.Unknown:
default:
status = licenseStatus.Updated ? Status.Warning : Status.Updating;
text = Messages.UNKNOWN;
return !licenseStatus.Updated;
}
return true;
}
public bool HelperUrlRequired
{
get { return XenObject != null; }
}
public bool LicenseHelperUrlRequired => ShouldShowLicenseWarningText(out _, out var status) &&
(status == Status.Error || status == Status.Warning || status == Status.Passable);
public bool SupportHelperUrlRequired => ShouldShowSupportWarningText(out _, out var status) &&
(status == Status.Error || status == Status.Warning) &&
!LicenseHelperUrlRequired;
public Status RowStatus
{
get
{
switch (CurrentLicenseState)
ShouldShowLicenseWarningText(out _, out var licenseWarningStatus);
ShouldShowSupportWarningText(out _, out var supportWarningStatus);
if (!XenObjectHost.IsInPreviewRelease() &&
(licenseWarningStatus != supportWarningStatus || licenseWarningStatus == Status.Passable && supportWarningStatus == Status.Error)
)
{
case Dialogs.LicenseStatus.HostState.Unavailable:
case Dialogs.LicenseStatus.HostState.Expired:
case Dialogs.LicenseStatus.HostState.Free:
return Status.Warning;
case Dialogs.LicenseStatus.HostState.Licensed:
return Status.Ok;
case Dialogs.LicenseStatus.HostState.PartiallyLicensed:
case Dialogs.LicenseStatus.HostState.RegularGrace:
case Dialogs.LicenseStatus.HostState.UpgradeGrace:
case Dialogs.LicenseStatus.HostState.ExpiresSoon:
return Status.Information;
case Dialogs.LicenseStatus.HostState.Unknown:
if (!licenseStatus.Updated)
return Status.Updating;
return Status.Information;
default:
return Status.Information;
// will show a warning icon
return Status.Warning;
}
if (licenseWarningStatus != Status.Ok)
{
return licenseWarningStatus;
}
if (supportWarningStatus != Status.Ok)
{
return supportWarningStatus;
}
return Status.Ok;
}
}
public Status RowLicenseStatus
{
get
{
var _ = ShouldShowLicenseWarningText(out var _, out var status);
return status;
}
}
public Status RowSupportStatus
{
get
{
var _ = ShouldShowSupportWarningText(out var _, out var status);
return status;
}
}
@ -327,6 +408,20 @@ namespace XenAdmin.Dialogs
get { return licenseStatus.LicenseEdition; }
}
private string OverallStatus
{
get
{
var statuses = new[]
{
LicenseStatus,
SupportStatus
};
return string.Join("; ", statuses.Where((s) => !string.IsNullOrEmpty(s)));
}
}
private string LicenseStatus
{
get
@ -339,7 +434,7 @@ namespace XenAdmin.Dialogs
case Dialogs.LicenseStatus.HostState.Expired:
return Messages.LICENSE_UNLICENSED;
case Dialogs.LicenseStatus.HostState.Free:
return Messages.LICENSE_UNLICENSED;
return XenObjectHost.IsInPreviewRelease() ? Messages.LICENSE_TRIAL : Messages.LICENSE_UNLICENSED;
case Dialogs.LicenseStatus.HostState.Licensed:
return Messages.LICENSE_LICENSED;
case Dialogs.LicenseStatus.HostState.RegularGrace:
@ -356,6 +451,19 @@ namespace XenAdmin.Dialogs
}
}
private string SupportStatus
{
get
{
if (!ShouldShowSupportWarningText(out _, out var supportWarningStatus))
{
return null;
}
return supportWarningStatus == Status.Ok ? Messages.LICENSE_MANAGER_ACTIVE_CSS : Messages.LICENSE_MANAGER_EXPIRED_CSS;
}
}
public List<Host> RepresentedHosts
{
get

View File

@ -70,14 +70,12 @@
//
// poolColumn
//
this.poolColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
resources.ApplyResources(this.poolColumn, "poolColumn");
this.poolColumn.Name = "poolColumn";
this.poolColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Programmatic;
//
// productVersionColumn
//
this.productVersionColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
resources.ApplyResources(this.productVersionColumn, "productVersionColumn");
this.productVersionColumn.Name = "productVersionColumn";
this.productVersionColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Programmatic;
@ -90,7 +88,7 @@
//
// statusColumn
//
this.statusColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.statusColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
resources.ApplyResources(this.statusColumn, "statusColumn");
this.statusColumn.Name = "statusColumn";
this.statusColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;

View File

@ -173,7 +173,7 @@ namespace XenAdmin.Dialogs
}
[EditorBrowsable(EditorBrowsableState.Never)]
public void DrawSummaryForHighlightedRow(CheckableDataGridViewRow row, SummaryTextComponent summaryComponent, Action runOnUrlClick)
public void DrawSummaryForHighlightedRow(CheckableDataGridViewRow row, SummaryTextComponent summaryComponent, Action runOnLicenseUrlClick, Action runOnSupportUrlClick)
{
Program.Invoke(this, delegate
{
@ -182,25 +182,48 @@ namespace XenAdmin.Dialogs
return;
summaryPanel.Title = lRow.XenObject.Name();
summaryPanel.HelperUrl = Messages.LICENSE_MANAGER_BUY_LICENSE_LINK_TEXT;
summaryPanel.HelperUrlVisible = lRow.HelperUrlRequired && !Controller.ReadOnlyView;
summaryPanel.WarningVisible = lRow.WarningRequired;
summaryPanel.WarningText = lRow.WarningText;
summaryPanel.LicenseHelperUrlText = Messages.LICENSE_MANAGER_BUY_LICENSE_LINK_TEXT;
summaryPanel.SupportHelperUrlText = Messages.LICENSE_MANAGER_PURCHASE_SUPPORT_LINK_TEXT;
summaryPanel.LicenseHelperUrlVisible = lRow.LicenseHelperUrlRequired && !Controller.ReadOnlyView;
summaryPanel.SupportHelperUrlVisible = lRow.SupportHelperUrlRequired &&
!Controller.ReadOnlyView;
summaryPanel.LicenseWarningVisible = lRow.LicenseWarningRequired;
summaryPanel.SupportWarningVisible = lRow.SupportWarningRequired;
summaryPanel.LicenseWarningText = lRow.LicenseWarningText;
summaryPanel.SupportWarningText = lRow.SupportWarningText;
summaryPanel.SummaryText = summaryComponent;
switch (lRow.RowStatus)
switch (lRow.RowLicenseStatus)
{
case LicenseDataGridViewRow.Status.Information:
summaryPanel.WarningIcon = Images.StaticImages._000_Alert2_h32bit_16;
break;
case LicenseDataGridViewRow.Status.Warning:
summaryPanel.WarningIcon = Images.StaticImages._000_error_h32bit_16;
summaryPanel.LicenseWarningIcon = Images.StaticImages._000_Alert2_h32bit_16;
break;
case LicenseDataGridViewRow.Status.Error:
summaryPanel.LicenseWarningIcon = Images.StaticImages._000_error_h32bit_16;
break;
case LicenseDataGridViewRow.Status.Passable:
summaryPanel.LicenseWarningIcon =
Images.StaticImages._000_Tick_yellow_h32bit_16;
break;
default:
summaryPanel.WarningIcon = Images.StaticImages._000_Tick_h32bit_16;
summaryPanel.LicenseWarningIcon = Images.StaticImages._000_Tick_h32bit_16;
break;
}
switch (lRow.RowSupportStatus)
{
case LicenseDataGridViewRow.Status.Ok:
summaryPanel.SupportWarningIcon = Images.StaticImages._000_Tick_h32bit_16;
break;
case LicenseDataGridViewRow.Status.Error:
summaryPanel.SupportWarningIcon = Images.StaticImages._000_error_h32bit_16;
break;
default:
summaryPanel.SupportWarningIcon = Images.StaticImages._000_Tick_h32bit_16;
break;
}
summaryPanel.InformationVisible = false;
summaryPanel.RunOnUrlClick = runOnUrlClick;
summaryPanel.RunOnLicenseUrlClick = runOnLicenseUrlClick;
summaryPanel.RunOnSupportUrlClick = runOnSupportUrlClick;
});
}

View File

@ -120,54 +120,10 @@
<metadata name="checkBoxColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="poolColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="productVersionColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="statusImageColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="statusColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="checkableDataGridView.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="checkableDataGridView.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 9pt</value>
</data>
<data name="checkableDataGridView.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 3</value>
</data>
<data name="checkableDataGridView.Size" type="System.Drawing.Size, System.Drawing">
<value>670, 352</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="checkableDataGridView.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;checkableDataGridView.Name" xml:space="preserve">
<value>checkableDataGridView</value>
</data>
<data name="&gt;&gt;checkableDataGridView.Type" xml:space="preserve">
<value>XenAdmin.Controls.LicenseCheckableDataGridView, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;checkableDataGridView.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;checkableDataGridView.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<metadata name="checkBoxColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="checkBoxColumn.HeaderText" xml:space="preserve">
<value />
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="checkBoxColumn.MinimumWidth" type="System.Int32, mscorlib">
<value>24</value>
</data>
@ -183,9 +139,6 @@
<data name="poolColumn.MinimumWidth" type="System.Int32, mscorlib">
<value>30</value>
</data>
<data name="poolColumn.Width" type="System.Int32, mscorlib">
<value>250</value>
</data>
<metadata name="productVersionColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
@ -195,9 +148,6 @@
<data name="productVersionColumn.MinimumWidth" type="System.Int32, mscorlib">
<value>30</value>
</data>
<data name="productVersionColumn.Width" type="System.Int32, mscorlib">
<value>250</value>
</data>
<metadata name="statusImageColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
@ -219,92 +169,40 @@
<data name="statusColumn.MinimumWidth" type="System.Int32, mscorlib">
<value>30</value>
</data>
<data name="tableLayoutPanel1.ColumnCount" type="System.Int32, mscorlib">
<value>2</value>
<data name="statusColumn.Width" type="System.Int32, mscorlib">
<value>64</value>
</data>
<data name="&gt;&gt;downloadLicenseServerLink.Name" xml:space="preserve">
<value>downloadLicenseServerLink</value>
</data>
<data name="&gt;&gt;downloadLicenseServerLink.Type" xml:space="preserve">
<value>System.Windows.Forms.LinkLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;downloadLicenseServerLink.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;downloadLicenseServerLink.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;tableLayoutPanel2.Name" xml:space="preserve">
<value>tableLayoutPanel2</value>
</data>
<data name="&gt;&gt;tableLayoutPanel2.Type" xml:space="preserve">
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tableLayoutPanel2.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;tableLayoutPanel2.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="tableLayoutPanel2.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="assignLicenceButton" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="releaseLicenseButton" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,AutoSize,0,AutoSize,0" /&gt;&lt;Rows Styles="AutoSize,0" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="&gt;&gt;summaryPanel.Name" xml:space="preserve">
<value>summaryPanel</value>
</data>
<data name="&gt;&gt;summaryPanel.Type" xml:space="preserve">
<value>XenAdmin.Controls.SummaryPanel.SummaryPanel, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;summaryPanel.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;summaryPanel.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="&gt;&gt;cancelButton.Name" xml:space="preserve">
<value>cancelButton</value>
</data>
<data name="&gt;&gt;cancelButton.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;cancelButton.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;cancelButton.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="tableLayoutPanel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="checkableDataGridView.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="tableLayoutPanel1.Font" type="System.Drawing.Font, System.Drawing">
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="checkableDataGridView.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 9pt</value>
</data>
<data name="tableLayoutPanel1.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 12</value>
<data name="checkableDataGridView.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 3</value>
</data>
<data name="tableLayoutPanel1.RowCount" type="System.Int32, mscorlib">
<value>3</value>
<data name="checkableDataGridView.Size" type="System.Drawing.Size, System.Drawing">
<value>631, 444</value>
</data>
<data name="tableLayoutPanel1.Size" type="System.Drawing.Size, System.Drawing">
<value>916, 426</value>
</data>
<data name="tableLayoutPanel1.TabIndex" type="System.Int32, mscorlib">
<data name="checkableDataGridView.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Name" xml:space="preserve">
<data name="&gt;&gt;checkableDataGridView.Name" xml:space="preserve">
<value>checkableDataGridView</value>
</data>
<data name="&gt;&gt;checkableDataGridView.Type" xml:space="preserve">
<value>XenAdmin.Controls.LicenseCheckableDataGridView, [XenCenter_No_Space], Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;checkableDataGridView.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Type" xml:space="preserve">
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<data name="&gt;&gt;checkableDataGridView.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="tableLayoutPanel1.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="downloadLicenseServerLink" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="checkableDataGridView" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="tableLayoutPanel2" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="summaryPanel" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="cancelButton" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Percent,73.85621,Percent,26.14379" /&gt;&lt;Rows Styles="Percent,100,AutoSize,0,AutoSize,0" /&gt;&lt;/TableLayoutSettings&gt;</value>
<data name="tableLayoutPanel1.ColumnCount" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="downloadLicenseServerLink.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Left</value>
@ -319,7 +217,7 @@
<value>NoControl</value>
</data>
<data name="downloadLicenseServerLink.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 403</value>
<value>3, 489</value>
</data>
<data name="downloadLicenseServerLink.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
@ -357,63 +255,6 @@
<data name="tableLayoutPanel2.ColumnCount" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="&gt;&gt;assignLicenceButton.Name" xml:space="preserve">
<value>assignLicenceButton</value>
</data>
<data name="&gt;&gt;assignLicenceButton.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;assignLicenceButton.Parent" xml:space="preserve">
<value>tableLayoutPanel2</value>
</data>
<data name="&gt;&gt;assignLicenceButton.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;releaseLicenseButton.Name" xml:space="preserve">
<value>releaseLicenseButton</value>
</data>
<data name="&gt;&gt;releaseLicenseButton.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;releaseLicenseButton.Parent" xml:space="preserve">
<value>tableLayoutPanel2</value>
</data>
<data name="&gt;&gt;releaseLicenseButton.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="tableLayoutPanel2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="tableLayoutPanel2.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 9pt</value>
</data>
<data name="tableLayoutPanel2.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 361</value>
</data>
<data name="tableLayoutPanel2.RowCount" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="tableLayoutPanel2.Size" type="System.Drawing.Size, System.Drawing">
<value>670, 31</value>
</data>
<data name="tableLayoutPanel2.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="&gt;&gt;tableLayoutPanel2.Name" xml:space="preserve">
<value>tableLayoutPanel2</value>
</data>
<data name="&gt;&gt;tableLayoutPanel2.Type" xml:space="preserve">
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tableLayoutPanel2.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;tableLayoutPanel2.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="tableLayoutPanel2.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="assignLicenceButton" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="releaseLicenseButton" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,AutoSize,0,AutoSize,0" /&gt;&lt;Rows Styles="AutoSize,0" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="assignLicenceButton.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Bottom, Left</value>
</data>
@ -424,7 +265,7 @@
<value>3, 3</value>
</data>
<data name="assignLicenceButton.Size" type="System.Drawing.Size, System.Drawing">
<value>162, 25</value>
<value>150, 25</value>
</data>
<data name="assignLicenceButton.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
@ -451,10 +292,10 @@
<value>Segoe UI, 9pt</value>
</data>
<data name="releaseLicenseButton.Location" type="System.Drawing.Point, System.Drawing">
<value>171, 3</value>
<value>159, 3</value>
</data>
<data name="releaseLicenseButton.Size" type="System.Drawing.Size, System.Drawing">
<value>162, 25</value>
<value>150, 25</value>
</data>
<data name="releaseLicenseButton.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
@ -474,6 +315,42 @@
<data name="&gt;&gt;releaseLicenseButton.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="tableLayoutPanel2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="tableLayoutPanel2.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 9pt</value>
</data>
<data name="tableLayoutPanel2.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 450</value>
</data>
<data name="tableLayoutPanel2.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 0</value>
</data>
<data name="tableLayoutPanel2.RowCount" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="tableLayoutPanel2.Size" type="System.Drawing.Size, System.Drawing">
<value>637, 31</value>
</data>
<data name="tableLayoutPanel2.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="&gt;&gt;tableLayoutPanel2.Name" xml:space="preserve">
<value>tableLayoutPanel2</value>
</data>
<data name="&gt;&gt;tableLayoutPanel2.Type" xml:space="preserve">
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tableLayoutPanel2.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;tableLayoutPanel2.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="tableLayoutPanel2.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="assignLicenceButton" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="releaseLicenseButton" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,AutoSize,0,AutoSize,0" /&gt;&lt;Rows Styles="AutoSize,0" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="summaryPanel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
@ -481,10 +358,10 @@
<value>Segoe UI, 9pt</value>
</data>
<data name="summaryPanel.Location" type="System.Drawing.Point, System.Drawing">
<value>679, 3</value>
<value>640, 3</value>
</data>
<data name="summaryPanel.Size" type="System.Drawing.Size, System.Drawing">
<value>234, 352</value>
<value>267, 444</value>
</data>
<data name="summaryPanel.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
@ -493,7 +370,7 @@
<value>summaryPanel</value>
</data>
<data name="&gt;&gt;summaryPanel.Type" xml:space="preserve">
<value>XenAdmin.Controls.SummaryPanel.SummaryPanel, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
<value>XenAdmin.Controls.SummaryPanel.SummaryPanel, [XenCenter_No_Space], Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;summaryPanel.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
@ -508,10 +385,10 @@
<value>Segoe UI, 9pt</value>
</data>
<data name="cancelButton.Location" type="System.Drawing.Point, System.Drawing">
<value>822, 398</value>
<value>832, 484</value>
</data>
<data name="cancelButton.Size" type="System.Drawing.Size, System.Drawing">
<value>91, 25</value>
<value>75, 25</value>
</data>
<data name="cancelButton.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
@ -531,6 +408,39 @@
<data name="&gt;&gt;cancelButton.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="tableLayoutPanel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="tableLayoutPanel1.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 9pt</value>
</data>
<data name="tableLayoutPanel1.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 12</value>
</data>
<data name="tableLayoutPanel1.RowCount" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="tableLayoutPanel1.Size" type="System.Drawing.Size, System.Drawing">
<value>910, 512</value>
</data>
<data name="tableLayoutPanel1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Name" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Type" xml:space="preserve">
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="tableLayoutPanel1.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="downloadLicenseServerLink" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="checkableDataGridView" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="tableLayoutPanel2" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="summaryPanel" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="cancelButton" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Percent,70,Percent,30" /&gt;&lt;Rows Styles="Percent,100,AutoSize,0,AutoSize,0" /&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>
</metadata>
@ -538,7 +448,7 @@
<value>96, 96</value>
</data>
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>940, 450</value>
<value>934, 536</value>
</data>
<data name="$this.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 9pt</value>
@ -583,6 +493,6 @@
<value>LicenseManager</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>XenAdmin.Dialogs.XenDialogBase, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
<value>XenAdmin.Dialogs.XenDialogBase, [XenCenter_No_Space], Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
</root>

View File

@ -116,13 +116,13 @@ namespace XenAdmin.Dialogs
{
if(!dataToSummarise.XenObject.Connection.IsConnected)
{
View.DrawSummaryForHighlightedRow(dataToSummarise, new LicenseManagerSummaryComponent(), LaunchUrl(InvisibleMessages.UPSELL_SA));
View.DrawSummaryForHighlightedRow(dataToSummarise, new LicenseManagerSummaryComponent(), LaunchUrl(InvisibleMessages.LICENSE_BUY_URL), LaunchUrl(InvisibleMessages.CSS_URL));
SetSummaryInformation(Messages.POOL_OR_HOST_IS_NOT_CONNECTED);
return;
}
SummaryTextComponent component = BuildSummaryComponent(dataToSummarise);
View.DrawSummaryForHighlightedRow(dataToSummarise, component, LaunchUrl(InvisibleMessages.UPSELL_SA));
View.DrawSummaryForHighlightedRow(dataToSummarise, component, LaunchUrl(InvisibleMessages.LICENSE_BUY_URL), LaunchUrl(InvisibleMessages.CSS_URL));
if(dataToSummarise.Disabled)
SetSummaryInformation(dataToSummarise.DisabledReason);
}

View File

@ -29,6 +29,7 @@
*/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Threading;
@ -331,31 +332,50 @@ namespace XenAdmin.Dialogs
{
get
{
var hosts = XenObject.Connection.Cache.Hosts;
var entitlements = new List<string>();
string supportLevel = null;
if (CurrentState == HostState.Licensed)
{
if (XenObject.Connection.Cache.Hosts.All(h => h.EnterpriseFeaturesEnabled()))
return Messages.LICENSE_SUPPORT_AND_ENTERPRISE_FEATURES_ENABLED;
if (XenObject.Connection.Cache.Hosts.All(h => h.DesktopPlusFeaturesEnabled()))
return string.Format(Messages.LICENSE_SUPPORT_AND_DESKTOP_PLUS_FEATURES_ENABLED, BrandManager.CompanyNameLegacy);
if (XenObject.Connection.Cache.Hosts.All(h => h.DesktopFeaturesEnabled()))
return string.Format(Messages.LICENSE_SUPPORT_AND_DESKTOP_FEATURES_ENABLED, BrandManager.CompanyNameLegacy);
if (XenObject.Connection.Cache.Hosts.All(h => h.DesktopCloudFeaturesEnabled()))
return string.Format(Messages.LICENSE_SUPPORT_AND_DESKTOP_CLOUD_FEATURES_ENABLED, BrandManager.CompanyNameLegacy);
if (XenObject.Connection.Cache.Hosts.All(h => h.PremiumFeaturesEnabled()))
return Messages.LICENSE_SUPPORT_AND_PREMIUM_FEATURES_ENABLED;
if (XenObject.Connection.Cache.Hosts.All(h => h.StandardFeaturesEnabled()))
return Messages.LICENSE_SUPPORT_AND_STANDARD_FEATURES_ENABLED;
if (XenObject.Connection.Cache.Hosts.All(h => h.EligibleForSupport()))
return Messages.LICENSE_SUPPORT_AND_STANDARD_FEATURES_ENABLED;
return Messages.LICENSE_NOT_ELIGIBLE_FOR_SUPPORT;
}
if (hosts.All(h => h.EnterpriseFeaturesEnabled()))
supportLevel = Messages.LICENSE_ENTERPRISE_FEATURES_ENABLED;
else if (hosts.All(h => h.DesktopPlusFeaturesEnabled()))
supportLevel = string.Format(Messages.LICENSE_DESKTOP_PLUS_FEATURES_ENABLED, BrandManager.CompanyNameLegacy);
else if (hosts.All(h => h.DesktopFeaturesEnabled()))
supportLevel = string.Format(Messages.LICENSE_DESKTOP_FEATURES_ENABLED, BrandManager.CompanyNameLegacy);
else if (hosts.All(h => h.DesktopCloudFeaturesEnabled()))
supportLevel = string.Format(Messages.LICENSE_DESKTOP_CLOUD_FEATURES_ENABLED, BrandManager.CompanyNameLegacy);
else if (hosts.All(h => h.PremiumFeaturesEnabled()))
supportLevel = Messages.LICENSE_PREMIUM_FEATURES_ENABLED;
else if (hosts.All(h => h.StandardFeaturesEnabled()))
supportLevel = Messages.LICENSE_STANDARD_FEATURES_ENABLED;
else if (hosts.All(h => h.EligibleForSupport()))
supportLevel = Messages.LICENSE_STANDARD_FEATURES_ENABLED;
if (CurrentState == HostState.Free)
if (supportLevel != null)
{
entitlements.Add(hosts.Any(Helpers.NileOrGreater) ? Messages.LICENSE_MANAGER_LICENSED : Messages.LICENSE_ELIGIBLE_FOR_SUPPORT);
entitlements.Add(supportLevel);
}
}
if (CurrentState == HostState.Free || string.IsNullOrEmpty(supportLevel))
{
return Messages.LICENSE_NOT_ELIGIBLE_FOR_SUPPORT;
if (hosts.Any(Helpers.NileOrGreater))
{
// CP-43000: for hosts in preview we show "Licensed" even though they're not
entitlements.Add(hosts.Any(a => a.IsInPreviewRelease()) ? $"{Messages.LICENSE_MANAGER_LICENSED}{Environment.NewLine}{Messages.LICENSE_MANAGER_TRIAL_EDITION}" : Messages.LICENSE_MANAGER_TRIAL_LICENSE);
}
else
{
entitlements.Add(Messages.LICENSE_NOT_ELIGIBLE_FOR_SUPPORT);
}
}
return Messages.UNKNOWN;
if (hosts.Any(h => h.CanShowTrialEditionUpsell()))
entitlements.Add(Messages.TRIAL_EDITION_UPSELLING_MESSAGE);
return entitlements.Count == 0 ? Messages.UNKNOWN : string.Join(Environment.NewLine, entitlements);
}
}

View File

@ -125,7 +125,7 @@ namespace XenAdmin.Dialogs
break;
case InvalidReasons.MAX_POOL_SIZE_EXCEEDED:
buttonCreate.Enabled = false;
toolTipContainerCreate.SetToolTip(Messages.NEWPOOL_WILL_EXCEED_POOL_MAX_SIZE);
toolTipContainerCreate.SetToolTip(string.Format(Messages.NEWPOOL_WILL_EXCEED_POOL_MAX_SIZE, InvisibleMessages.LICENSE_BUY_URL));
break;
}
}

View File

@ -109,7 +109,7 @@ namespace XenAdmin.Dialogs
var configuredRows = rows.Where(r => r.CacheSr != null).ToList();
if (configuredRows.Count == 0)
return Messages.PVS_CACHE_NOT_CONFIGURED;
return Messages.NOT_CONFIGURED;
return configuredRows.Any(row => row.CacheSr.GetSRType(false) != SR.SRTypes.tmpfs)
? Messages.PVS_CACHE_MEMORY_AND_DISK

View File

@ -53,7 +53,7 @@ namespace XenAdmin.Dialogs.ServerUpdates
public ConfigCdnUpdatesPage()
{
InitializeComponent();
labelNoConnections.Text = string.Format(labelNoConnections.Text, BrandManager.ProductVersionPost82);
labelNoConnections.Text = string.Format(labelNoConnections.Text, $"{BrandManager.ProductBrand} {BrandManager.ProductVersionPost82}");
toolTip1.ToolTipTitle = Messages.INVALID_PARAMETER;
buttonApply.Enabled = buttonDiscard.Enabled = false;

View File

@ -733,6 +733,7 @@ namespace XenAdmin
public static Bitmap _000_TemplateDisabled_h32bit_16 = Properties.Resources._000_TemplateDisabled_h32bit_16;
public static Bitmap _000_TestFailover_h32bit_32 = Properties.Resources._000_TestFailover_h32bit_32;
public static Bitmap _000_Tick_h32bit_16 = Properties.Resources._000_Tick_h32bit_16;
public static Bitmap _000_Tick_yellow_h32bit_16 = Properties.Resources._000_Tick_yellow_h32bit_16;
public static Bitmap _000_ToolBar_Pref_Icon_dis = Properties.Resources._000_ToolBar_Pref_Icon_dis;
public static Bitmap _000_ToolBar_Pref_Icon_ovr = Properties.Resources._000_ToolBar_Pref_Icon_ovr;
public static Bitmap _000_ToolBar_Pref_Icon_up = Properties.Resources._000_ToolBar_Pref_Icon_up;
@ -956,6 +957,7 @@ namespace XenAdmin
public static Bitmap turbo_16x = Properties.Resources.turbo_16x;
public static Bitmap usb_16 = Properties.Resources.usb_16;
public static Bitmap yinhekylin_16x = Properties.Resources.yinhekylin_16x;
public static Bitmap rightArrowLong_Blue_16 = Properties.Resources.rightArrowLong_Blue_16;
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 541 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 328 B

After

Width:  |  Height:  |  Size: 753 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

@ -18,9 +18,8 @@ namespace XenAdmin
PluginManager.PluginsChanged -= pluginManager_PluginsChanged;
UnRegisterEvents();
alertPage.FiltersChanged -= NotificationsPage_FiltersChanged;
updatesPage.FiltersChanged -= NotificationsPage_FiltersChanged;
eventsPage.FiltersChanged -= NotificationsPage_FiltersChanged;
foreach (var page in _notificationPages)
page.FiltersChanged -= NotificationsPage_FiltersChanged;
if (disposing)
{
@ -79,6 +78,7 @@ namespace XenAdmin
this.TabPageUSB = new System.Windows.Forms.TabPage();
this.alertPage = new XenAdmin.TabPages.AlertSummaryPage();
this.updatesPage = new XenAdmin.TabPages.ManageUpdatesPage();
this.cdnUpdatesPage = new XenAdmin.TabPages.ManageCdnUpdatesPage();
this.eventsPage = new XenAdmin.TabPages.HistoryPage();
this.TitleBackPanel = new XenAdmin.Controls.GradientPanel.VerticalGradientPanel();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
@ -261,6 +261,7 @@ namespace XenAdmin
this.toolStripSeparator14 = new System.Windows.Forms.ToolStripSeparator();
this.LicenseManagerMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator13 = new System.Windows.Forms.ToolStripSeparator();
this.configureUpdatesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.installNewUpdateToolStripMenuItem = new XenAdmin.Commands.CommandToolStripMenuItem();
this.rollingUpgradeToolStripMenuItem = new XenAdmin.Commands.CommandToolStripMenuItem();
this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator();
@ -289,10 +290,11 @@ namespace XenAdmin
this.StatusStrip = new System.Windows.Forms.StatusStrip();
this.statusProgressBar = new System.Windows.Forms.ToolStripProgressBar();
this.statusLabel = new System.Windows.Forms.ToolStripStatusLabel();
this.statusLabelErrors = new System.Windows.Forms.ToolStripStatusLabel();
this.statusLabelUpdates = new System.Windows.Forms.ToolStripStatusLabel();
this.statusLabelAlerts = new System.Windows.Forms.ToolStripStatusLabel();
this.configureUpdatesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.statusButtonProgress = new System.Windows.Forms.ToolStripSplitButton();
this.statusButtonErrors = new System.Windows.Forms.ToolStripSplitButton();
this.statusButtonCdnUpdates = new System.Windows.Forms.ToolStripSplitButton();
this.statusButtonUpdates = new System.Windows.Forms.ToolStripSplitButton();
this.statusButtonAlerts = new System.Windows.Forms.ToolStripSplitButton();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
@ -327,6 +329,7 @@ namespace XenAdmin
this.splitContainer1.Panel2.Controls.Add(this.TheTabControl);
this.splitContainer1.Panel2.Controls.Add(this.alertPage);
this.splitContainer1.Panel2.Controls.Add(this.updatesPage);
this.splitContainer1.Panel2.Controls.Add(this.cdnUpdatesPage);
this.splitContainer1.Panel2.Controls.Add(this.eventsPage);
this.splitContainer1.Panel2.Controls.Add(this.TitleBackPanel);
resources.ApplyResources(this.splitContainer1.Panel2, "splitContainer1.Panel2");
@ -540,6 +543,12 @@ namespace XenAdmin
this.updatesPage.BackColor = System.Drawing.SystemColors.Window;
this.updatesPage.Name = "updatesPage";
//
// cdnUpdatesPage
//
resources.ApplyResources(this.cdnUpdatesPage, "cdnUpdatesPage");
this.cdnUpdatesPage.BackColor = System.Drawing.SystemColors.Window;
this.cdnUpdatesPage.Name = "cdnUpdatesPage";
//
// eventsPage
//
resources.ApplyResources(this.eventsPage, "eventsPage");
@ -1809,6 +1818,12 @@ namespace XenAdmin
this.toolStripSeparator13.Name = "toolStripSeparator13";
resources.ApplyResources(this.toolStripSeparator13, "toolStripSeparator13");
//
// configureUpdatesToolStripMenuItem
//
this.configureUpdatesToolStripMenuItem.Name = "configureUpdatesToolStripMenuItem";
resources.ApplyResources(this.configureUpdatesToolStripMenuItem, "configureUpdatesToolStripMenuItem");
this.configureUpdatesToolStripMenuItem.Click += new System.EventHandler(this.configureUpdatesToolStripMenuItem_Click);
//
// installNewUpdateToolStripMenuItem
//
this.installNewUpdateToolStripMenuItem.Command = new XenAdmin.Commands.InstallNewUpdateCommand();
@ -1990,9 +2005,11 @@ namespace XenAdmin
this.StatusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.statusProgressBar,
this.statusLabel,
this.statusLabelErrors,
this.statusLabelUpdates,
this.statusLabelAlerts});
this.statusButtonProgress,
this.statusButtonErrors,
this.statusButtonUpdates,
this.statusButtonCdnUpdates,
this.statusButtonAlerts});
this.StatusStrip.Name = "StatusStrip";
this.StatusStrip.ShowItemToolTips = true;
//
@ -2011,47 +2028,51 @@ namespace XenAdmin
this.statusLabel.Overflow = System.Windows.Forms.ToolStripItemOverflow.Never;
this.statusLabel.Spring = true;
//
// statusLabelErrors
// statusButtonProgress
//
this.statusLabelErrors.ActiveLinkColor = System.Drawing.SystemColors.ControlDarkDark;
this.statusLabelErrors.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
this.statusLabelErrors.IsLink = true;
this.statusLabelErrors.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline;
this.statusLabelErrors.LinkColor = System.Drawing.SystemColors.ControlDarkDark;
this.statusLabelErrors.Name = "statusLabelErrors";
resources.ApplyResources(this.statusLabelErrors, "statusLabelErrors");
this.statusLabelErrors.VisitedLinkColor = System.Drawing.SystemColors.ControlDarkDark;
this.statusLabelErrors.Click += new System.EventHandler(this.statusLabelErrors_Click);
this.statusButtonProgress.DropDownButtonWidth = 0;
this.statusButtonProgress.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
this.statusButtonProgress.Image = global::XenAdmin.Properties.Resources.ajax_loader;
resources.ApplyResources(this.statusButtonProgress, "statusButtonProgress");
this.statusButtonProgress.Name = "statusButtonProgress";
this.statusButtonProgress.ButtonClick += new System.EventHandler(this.statusButtonProgress_ButtonClick);
//
// statusLabelUpdates
// statusButtonErrors
//
this.statusLabelUpdates.ActiveLinkColor = System.Drawing.SystemColors.ControlDarkDark;
this.statusLabelUpdates.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
this.statusLabelUpdates.IsLink = true;
this.statusLabelUpdates.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline;
this.statusLabelUpdates.LinkColor = System.Drawing.SystemColors.ControlDarkDark;
this.statusLabelUpdates.Name = "statusLabelUpdates";
resources.ApplyResources(this.statusLabelUpdates, "statusLabelUpdates");
this.statusLabelUpdates.VisitedLinkColor = System.Drawing.SystemColors.ControlDarkDark;
this.statusLabelUpdates.Click += new System.EventHandler(this.statusLabelUpdates_Click);
this.statusButtonErrors.DropDownButtonWidth = 0;
this.statusButtonErrors.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
this.statusButtonErrors.Image = global::XenAdmin.Properties.Resources.notif_events_errors_16;
resources.ApplyResources(this.statusButtonErrors, "statusButtonErrors");
this.statusButtonErrors.Name = "statusButtonErrors";
this.statusButtonErrors.Click += new System.EventHandler(this.statusButtonErrors_Click);
//
// statusLabelAlerts
// statusButtonCdnUpdates
//
this.statusLabelAlerts.ActiveLinkColor = System.Drawing.SystemColors.ControlDarkDark;
this.statusLabelAlerts.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
this.statusLabelAlerts.IsLink = true;
this.statusLabelAlerts.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline;
this.statusLabelAlerts.LinkColor = System.Drawing.SystemColors.ControlDarkDark;
this.statusLabelAlerts.Name = "statusLabelAlerts";
resources.ApplyResources(this.statusLabelAlerts, "statusLabelAlerts");
this.statusLabelAlerts.VisitedLinkColor = System.Drawing.SystemColors.ControlDarkDark;
this.statusLabelAlerts.Click += new System.EventHandler(this.statusLabelAlerts_Click);
this.statusButtonCdnUpdates.DropDownButtonWidth = 0;
this.statusButtonCdnUpdates.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
this.statusButtonCdnUpdates.Image = global::XenAdmin.Properties.Resources.notif_updates_16;
resources.ApplyResources(this.statusButtonCdnUpdates, "statusButtonCdnUpdates");
this.statusButtonCdnUpdates.Name = "statusButtonCdnUpdates";
this.statusButtonCdnUpdates.Click += new System.EventHandler(this.statusButtonCdnUpdates_Click);
//
// configureUpdatesToolStripMenuItem
// statusButtonUpdates
//
this.configureUpdatesToolStripMenuItem.Name = "configureUpdatesToolStripMenuItem";
resources.ApplyResources(this.configureUpdatesToolStripMenuItem, "configureUpdatesToolStripMenuItem");
this.configureUpdatesToolStripMenuItem.Click += new System.EventHandler(this.configureUpdatesToolStripMenuItem_Click);
this.statusButtonUpdates.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
this.statusButtonUpdates.DropDownButtonWidth = 0;
this.statusButtonUpdates.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
this.statusButtonUpdates.Image = global::XenAdmin.Properties.Resources._015_Download_h32bit_16;
resources.ApplyResources(this.statusButtonUpdates, "statusButtonUpdates");
this.statusButtonUpdates.Name = "statusButtonUpdates";
this.statusButtonUpdates.Click += new System.EventHandler(this.statusButtonUpdates_Click);
//
// statusButtonAlerts
//
this.statusButtonAlerts.DropDownButtonWidth = 0;
this.statusButtonAlerts.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
this.statusButtonAlerts.Image = global::XenAdmin.Properties.Resources._000_Alert2_h32bit_16;
resources.ApplyResources(this.statusButtonAlerts, "statusButtonAlerts");
this.statusButtonAlerts.Name = "statusButtonAlerts";
this.statusButtonAlerts.Click += new System.EventHandler(this.statusButtonAlerts_Click);
//
// MainWindow
//
@ -2321,9 +2342,6 @@ namespace XenAdmin
private XenAdmin.Commands.CommandToolStripMenuItem menuItemRemoveFromPool;
private XenAdmin.Commands.CommandToolStripMenuItem conversionToolStripMenuItem;
private XenAdmin.Commands.CommandToolStripMenuItem toolStripMenuItemInstallCertificate;
private System.Windows.Forms.ToolStripStatusLabel statusLabelAlerts;
private System.Windows.Forms.ToolStripStatusLabel statusLabelUpdates;
private System.Windows.Forms.ToolStripStatusLabel statusLabelErrors;
private XenAdmin.Commands.CommandToolStripMenuItem toolStripMenuItemRotateSecret;
private XenAdmin.Commands.CommandToolStripMenuItem toolStripMenuItemHaConfigure;
private XenAdmin.Commands.CommandToolStripMenuItem toolStripMenuItemHaDisable;
@ -2339,6 +2357,12 @@ namespace XenAdmin
private XenAdmin.Commands.CommandToolStripMenuItem toolStripMenuItemVtpm;
private System.Windows.Forms.Label labelFiltersOnOff;
private System.Windows.Forms.ToolStripMenuItem configureUpdatesToolStripMenuItem;
private TabPages.ManageCdnUpdatesPage cdnUpdatesPage;
private System.Windows.Forms.ToolStripSplitButton statusButtonErrors;
private System.Windows.Forms.ToolStripSplitButton statusButtonCdnUpdates;
private System.Windows.Forms.ToolStripSplitButton statusButtonUpdates;
private System.Windows.Forms.ToolStripSplitButton statusButtonAlerts;
private System.Windows.Forms.ToolStripSplitButton statusButtonProgress;
}
}

View File

@ -105,6 +105,8 @@ namespace XenAdmin
internal readonly DockerDetailsPage DockerDetailsPage = new DockerDetailsPage();
internal readonly UsbPage UsbPage = new UsbPage();
private readonly NotificationsBasePage[] _notificationPages;
private ActionBase statusBarAction;
private bool IgnoreTabChanges;
@ -204,6 +206,8 @@ namespace XenAdmin
#endregion
_notificationPages = new NotificationsBasePage[] { alertPage, updatesPage, cdnUpdatesPage, eventsPage };
PoolCollectionChangedWithInvoke = Program.ProgramInvokeHandler(CollectionChanged<Pool>);
MessageCollectionChangedWithInvoke = Program.ProgramInvokeHandler(MessageCollectionChanged);
HostCollectionChangedWithInvoke = Program.ProgramInvokeHandler(CollectionChanged<Host>);
@ -250,7 +254,9 @@ namespace XenAdmin
toolStripSeparator7.Visible = xenSourceOnTheWebToolStripMenuItem.Visible = xenCenterPluginsOnlineToolStripMenuItem.Visible = !HiddenFeatures.ToolStripMenuItemHidden;
statusLabelAlerts.Visible = statusLabelUpdates.Visible = statusLabelErrors.Visible = false;
statusButtonAlerts.Visible = statusButtonUpdates.Visible = statusButtonCdnUpdates.Visible = statusButtonProgress.Visible = statusButtonErrors.Visible = false;
statusButtonUpdates.ToolTipText = string.Format(statusButtonUpdates.ToolTipText, BrandManager.ProductVersion821);
statusButtonCdnUpdates.ToolTipText = string.Format(statusButtonCdnUpdates.ToolTipText, BrandManager.ProductBrand, BrandManager.ProductVersionPost82);
}
private void RegisterEvents()
@ -379,11 +385,14 @@ namespace XenAdmin
{
base.OnShown(e);
TheTabControl.Visible = true;
alertPage.Visible = updatesPage.Visible = eventsPage.Visible = false;
foreach (var page in _notificationPages)
{
page.Visible = false;
page.FiltersChanged += NotificationsPage_FiltersChanged;
}
SetFiltersLabel();
alertPage.FiltersChanged += NotificationsPage_FiltersChanged;
updatesPage.FiltersChanged += NotificationsPage_FiltersChanged;
eventsPage.FiltersChanged += NotificationsPage_FiltersChanged;
navigationPane.FocusTreeView();
}
@ -467,7 +476,7 @@ namespace XenAdmin
else
return;
UpdateErrorStatusLabel();
UpdateErrorStatusButton();
break;
}
}
@ -491,7 +500,7 @@ namespace XenAdmin
Program.Invoke(this, () =>
{
UpdateStatusProgressBar(action);
UpdateErrorStatusLabel();
UpdateErrorStatusButton();
});
}
@ -529,29 +538,18 @@ namespace XenAdmin
}
}
private void UpdateErrorStatusLabel()
private void UpdateErrorStatusButton()
{
int progressCount = ConnectionsManager.History.Count(a => !a.IsCompleted);
statusButtonProgress.Text = progressCount.ToString();
statusButtonProgress.Visible = progressCount > 0;
int errorCount = ConnectionsManager.History.Count(a =>
a.IsCompleted && !a.Succeeded && !(a is CancellingAction ca && ca.Cancelled));
navigationPane.UpdateNotificationsButton(NotificationsSubMode.Events, errorCount);
var errorText = errorCount == 1
? Messages.NOTIFICATIONS_SUBMODE_EVENTS_STATUS_ERROR
: string.Format(Messages.NOTIFICATIONS_SUBMODE_EVENTS_STATUS_ERRORS, errorCount);
int progressCount = ConnectionsManager.History.Count(a => !a.IsCompleted);
var progressText = string.Format(Messages.NOTIFICATIONS_SUBMODE_EVENTS_STATUS_IN_PROGRESS, progressCount);
if (errorCount > 0 && progressCount > 0)
statusLabelErrors.Text = string.Format(Messages.NOTIFICATIONS_SUBMODE_EVENTS_STATUS,
string.Format(Messages.STRING_COMMA_SPACE_STRING, errorText, progressText));
else if (errorCount > 0)
statusLabelErrors.Text = string.Format(Messages.NOTIFICATIONS_SUBMODE_EVENTS_STATUS, errorText);
else if (progressCount > 0)
statusLabelErrors.Text = string.Format(Messages.NOTIFICATIONS_SUBMODE_EVENTS_STATUS, progressText);
statusLabelErrors.Visible = errorCount > 0 || progressCount > 0;
statusButtonErrors.Text = errorCount.ToString();
statusButtonErrors.Visible = errorCount > 0;
if (eventsPage.Visible)
{
@ -1083,6 +1081,9 @@ namespace XenAdmin
if (Helpers.CloudOrGreater(connection))
{
if (YumRepoNotConfiguredAlert.TryCreate(connection, out var alert) || OutOfSyncWithCdnAlert.TryCreate(connection, out alert))
Alert.AddAlert(alert);
Updates.CheckForCdnUpdates(coordinator.Connection);
}
else
@ -2550,14 +2551,11 @@ namespace XenAdmin
private string TabHelpID()
{
if (alertPage.Visible)
return alertPage.HelpID;
if (updatesPage.Visible)
return updatesPage.HelpID;
if (eventsPage.Visible)
return eventsPage.HelpID;
foreach (var page in _notificationPages)
{
if (page.Visible)
return alertPage.HelpID;
}
if (TheTabControl.SelectedTab.Controls.Count > 0 && TheTabControl.SelectedTab.Controls[0] is IControlWithHelp ctrl)
return ctrl.HelpID + getSelectedXenModelObjectType();
@ -2639,11 +2637,11 @@ namespace XenAdmin
private void SetFiltersLabel()
{
labelFiltersOnOff.Visible = alertPage.Visible || updatesPage.Visible || eventsPage.Visible;
bool filterIsOn = alertPage.Visible && alertPage.FilterIsOn ||
updatesPage.Visible && updatesPage.FilterIsOn ||
eventsPage.Visible && eventsPage.FilterIsOn;
labelFiltersOnOff.Text = filterIsOn ? Messages.FILTERS_ON : Messages.FILTERS_OFF;
labelFiltersOnOff.Visible = _notificationPages.Any(p => p.Visible);
labelFiltersOnOff.Text = _notificationPages.Any(p => p.Visible && p.FilterIsOn)
? Messages.FILTERS_ON
: Messages.FILTERS_OFF;
}
private void eventsPage_GoToXenObjectRequested(IXenObject obj)
@ -2654,6 +2652,22 @@ namespace XenAdmin
private void Cdn_UpdateInfoChanged(IXenConnection obj)
{
Program.Invoke(this, () =>
{
int cdnUpdatesCount = Updates.CdnUpdateInfoPerConnection.Values.SelectMany(info => info.Updates).Distinct().Count();
navigationPane.UpdateNotificationsButton(NotificationsSubMode.UpdatesFromCdn, cdnUpdatesCount);
statusButtonCdnUpdates.Text = cdnUpdatesCount.ToString();
statusButtonCdnUpdates.Visible = cdnUpdatesCount > 0;
if (cdnUpdatesPage.Visible)
{
TitleLabel.Text = NotificationsSubModeItem.GetText(NotificationsSubMode.UpdatesFromCdn, cdnUpdatesCount);
TitleIcon.Image = NotificationsSubModeItem.GetImage(NotificationsSubMode.UpdatesFromCdn, cdnUpdatesCount);
}
});
RequestRefreshTreeView();
}
@ -2664,8 +2678,8 @@ namespace XenAdmin
int updatesCount = Updates.UpdateAlerts.Count;
navigationPane.UpdateNotificationsButton(NotificationsSubMode.Updates, updatesCount);
statusLabelUpdates.Text = string.Format(Messages.NOTIFICATIONS_SUBMODE_UPDATES_STATUS, updatesCount);
statusLabelUpdates.Visible = updatesCount > 0;
statusButtonUpdates.Text = updatesCount.ToString();
statusButtonUpdates.Visible = updatesCount > 0;
SetClientUpdateAlert();
@ -2965,29 +2979,12 @@ namespace XenAdmin
private void navigationPane_NotificationsSubModeChanged(NotificationsSubModeItem submodeItem)
{
switch (submodeItem.SubMode)
foreach (var page in _notificationPages)
{
case NotificationsSubMode.Alerts:
if (updatesPage.Visible)
updatesPage.HidePage();
if (eventsPage.Visible)
eventsPage.HidePage();
alertPage.ShowPage();
break;
case NotificationsSubMode.Updates:
if (alertPage.Visible)
alertPage.HidePage();
if (eventsPage.Visible)
eventsPage.HidePage();
updatesPage.ShowPage();
break;
case NotificationsSubMode.Events:
if (alertPage.Visible)
alertPage.HidePage();
if (updatesPage.Visible)
updatesPage.HidePage();
eventsPage.ShowPage();
break;
if (page.NotificationsSubMode == submodeItem.SubMode)
page.ShowPage();
else if (page.Visible)
page.HidePage();
}
SetFiltersLabel();
@ -3010,12 +3007,12 @@ namespace XenAdmin
{
bool tabControlWasVisible = TheTabControl.Visible;
TheTabControl.Visible = true;
if (alertPage.Visible)
alertPage.HidePage();
if (updatesPage.Visible)
updatesPage.HidePage();
if (eventsPage.Visible)
eventsPage.HidePage();
foreach (var page in _notificationPages)
{
if (page.Visible)
page.HidePage();
}
// force an update of the selected tab when switching back from Notification view,
// as some tabs ignore the update events when not visible (e.g. Snapshots, HA)
@ -3068,8 +3065,8 @@ namespace XenAdmin
var count = Alert.NonDismissingAlertCount;
navigationPane.UpdateNotificationsButton(NotificationsSubMode.Alerts, count);
statusLabelAlerts.Text = string.Format(Messages.NOTIFICATIONS_SUBMODE_ALERTS_STATUS, count);
statusLabelAlerts.Visible = count > 0;
statusButtonAlerts.Text = count.ToString();
statusButtonAlerts.Visible = count > 0;
if (alertPage.Visible)
{
@ -3342,17 +3339,27 @@ namespace XenAdmin
SetTitleLabelMaxWidth();
}
private void statusLabelAlerts_Click(object sender, EventArgs e)
private void statusButtonAlerts_Click(object sender, EventArgs e)
{
navigationPane.SwitchToNotificationsView(NotificationsSubMode.Alerts);
}
private void statusLabelUpdates_Click(object sender, EventArgs e)
private void statusButtonUpdates_Click(object sender, EventArgs e)
{
navigationPane.SwitchToNotificationsView(NotificationsSubMode.Updates);
}
private void statusLabelErrors_Click(object sender, EventArgs e)
private void statusButtonCdnUpdates_Click(object sender, EventArgs e)
{
navigationPane.SwitchToNotificationsView(NotificationsSubMode.UpdatesFromCdn);
}
private void statusButtonErrors_Click(object sender, EventArgs e)
{
navigationPane.SwitchToNotificationsView(NotificationsSubMode.Events);
}
private void statusButtonProgress_ButtonClick(object sender, EventArgs e)
{
navigationPane.SwitchToNotificationsView(NotificationsSubMode.Events);
}

File diff suppressed because it is too large Load Diff

View File

@ -1220,6 +1220,16 @@ namespace XenAdmin.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap _000_Tick_yellow_h32bit_16 {
get {
object obj = ResourceManager.GetObject("_000_Tick_yellow_h32bit_16", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
@ -2866,6 +2876,16 @@ namespace XenAdmin.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap rightArrowLong_Blue_16 {
get {
object obj = ResourceManager.GetObject("rightArrowLong_Blue_16", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>

View File

@ -1126,6 +1126,9 @@
<data name="tpm" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\tpm.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="rightArrowLong_Blue_16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\rightArrowLong_Blue_16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="splash" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\..\Branding\Images\splash.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
@ -1147,4 +1150,7 @@
<data name="pool_unpatched" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\pool_unpatched.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>
<data name="_000_Tick_yellow_h32bit_16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\000_Tick_yellow_h32bit_16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View File

@ -44,6 +44,7 @@ using XenAdmin.Help;
using System.Threading;
using XenAdmin.Actions;
using System.IO;
using XenAdmin.Controls.MainWindowControls;
namespace XenAdmin.TabPages
@ -78,7 +79,6 @@ namespace XenAdmin.TabPages
protected override void RefreshPage()
{
toolStripDropDownButtonServerFilter.InitializeHostList();
toolStripDropDownButtonServerFilter.BuildFilterList();
Rebuild();
}
@ -94,6 +94,8 @@ namespace XenAdmin.TabPages
public override string HelpID => "AlertSummaryDialog";
public override NotificationsSubMode NotificationsSubMode => NotificationsSubMode.Alerts;
#endregion
public override bool FilterIsOn =>
@ -648,11 +650,11 @@ namespace XenAdmin.TabPages
private void DismissAlerts(params Alert[] alerts)
{
var groups = from Alert alert in alerts
where alert != null && alert.AllowedToDismiss()
group alert by alert.Connection
into g
select new { Connection = g.Key, Alerts = g };
var groups = (from Alert alert in alerts
where alert != null && alert.AllowedToDismiss()
group alert by alert.Connection
into g
select new { Connection = g.Key, Alerts = g }).ToList();
foreach (var g in groups)
{

View File

@ -307,7 +307,7 @@
<value>1, 1, 1, 1</value>
</data>
<data name="toolStrip1.Size" type="System.Drawing.Size, System.Drawing">
<value>731, 25</value>
<value>739, 25</value>
</data>
<data name="toolStrip1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
@ -334,7 +334,7 @@
<value>Segoe UI, 9pt</value>
</data>
<data name="tableLayoutPanel1.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 12</value>
<value>8, 8</value>
</data>
<data name="tableLayoutPanel1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 0</value>
@ -343,7 +343,7 @@
<value>1</value>
</data>
<data name="tableLayoutPanel1.Size" type="System.Drawing.Size, System.Drawing">
<value>733, 27</value>
<value>741, 27</value>
</data>
<data name="tableLayoutPanel1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
@ -379,7 +379,7 @@
<value>Segoe UI, 9pt</value>
</data>
<data name="tableLayoutPanel3.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 483</value>
<value>8, 487</value>
</data>
<data name="tableLayoutPanel3.RowCount" type="System.Int32, mscorlib">
<value>1</value>
@ -475,13 +475,13 @@
<value>Segoe UI, 9pt</value>
</data>
<data name="GridViewAlerts.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 51</value>
<value>8, 47</value>
</data>
<data name="GridViewAlerts.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 12, 0, 12</value>
</data>
<data name="GridViewAlerts.Size" type="System.Drawing.Size, System.Drawing">
<value>733, 417</value>
<value>741, 425</value>
</data>
<data name="GridViewAlerts.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
@ -508,7 +508,7 @@
<value>Tahoma, 8pt</value>
</data>
<data name="$this.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>12, 12, 12, 12</value>
<value>8, 8, 8, 8</value>
</data>
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
<value>757, 520</value>

View File

@ -0,0 +1,266 @@
/* Copyright (c) Cloud Software Group, Inc.
*
* Redistribution and use in source and binary forms,
* with or without modification, are permitted provided
* that the following conditions are met:
*
* * Redistributions of source code must retain the above
* copyright notice, this list of conditions and the
* following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the
* following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Windows.Forms;
using XenAdmin.Core;
using XenAdmin.Network;
using XenAPI;
namespace XenAdmin.TabPages.CdnUpdates
{
internal abstract class CdnExpandableRow : DataGridViewRow
{
private readonly CdnExpandableTextAndImageCell _nameCell = new CdnExpandableTextAndImageCell();
private readonly DataGridViewTextBoxCell _lastSyncCell = new DataGridViewTextBoxCell();
private readonly DataGridViewTextBoxCell _lastUpdateCell = new DataGridViewTextBoxCell();
protected CdnExpandableRow()
{
Cells.AddRange(_nameCell, _lastSyncCell, _lastUpdateCell);
MinimumHeight = 22;
}
protected void SetValues(string name, Image image, string lastSync = null, string lastUpdate = null)
{
_nameCell.Value = name;
_nameCell.Image = image;
if (lastSync != null)
_lastSyncCell.Value = lastSync;
if (lastUpdate != null)
_lastUpdateCell.Value = lastUpdate;
}
public virtual List<CdnExpandableRow> ChildRows => new List<CdnExpandableRow>();
public CdnExpandableRow ParentRow { get; set; }
public int Level;
public bool IsExpanded { get; set; }
public List<string> Export()
{
var details = new List<string>
{
_nameCell.Value as string,
string.Empty
};
details.AddRange(ChildRows.SelectMany(r => r.Export()));
return details;
}
}
internal class PoolUpdateInfoRow : CdnExpandableRow
{
public PoolUpdateInfoRow(IXenConnection connection, CdnPoolUpdateInfo poolUpdateInfo)
{
Pool = Helpers.GetPoolOfOne(connection);
var lastSyncTime = Messages.INDETERMINABLE;
if (Helpers.XapiEqualOrGreater_23_18_0(connection))
{
lastSyncTime = Messages.NEVER;
if (Pool.last_update_sync > Util.GetUnixMinDateTime())
{
lastSyncTime = HelpersGUI.DateTimeToString(Pool.last_update_sync.ToLocalTime(), Messages.DATEFORMAT_DMY_HMS, true);
}
}
SetValues(Helpers.GetName(connection), Images.GetImage16For(Images.GetIconFor(connection)), lastSyncTime);
if (poolUpdateInfo == null)
{
ChildRows = connection.Cache.Hosts
.Select(h => new HostUpdateInfoRow(connection, h, null, null))
.Cast<CdnExpandableRow>().ToList();
}
else
{
ChildRows = poolUpdateInfo.HostsWithUpdates
.Select(h => new HostUpdateInfoRow(connection, connection.Resolve(new XenRef<Host>(h.HostOpaqueRef)), poolUpdateInfo, h))
.Cast<CdnExpandableRow>().ToList();
}
}
public Pool Pool { get; }
public override List<CdnExpandableRow> ChildRows { get; } = new List<CdnExpandableRow>();
}
internal class HostUpdateInfoRow : CdnExpandableRow
{
private readonly List<CdnExpandableRow> _childRows = new List<CdnExpandableRow>();
public HostUpdateInfoRow(IXenConnection connection, Host host, CdnPoolUpdateInfo poolUpdateInfo, CdnHostUpdateInfo hostUpdateInfo)
{
Connection = connection;
Host = host;
string lastSyncTime = null;
string lastUpdateTime = Messages.NEVER;
if (Helpers.GetPool(Connection) == null) //standalone host
{
lastSyncTime = Messages.INDETERMINABLE;
if (Helpers.XapiEqualOrGreater_23_18_0(Connection))
{
lastSyncTime = Messages.NEVER;
var pool = Helpers.GetPoolOfOne(Connection);
if (pool != null && pool.last_update_sync > Util.GetUnixMinDateTime())
{
lastSyncTime = HelpersGUI.DateTimeToString(pool.last_update_sync.ToLocalTime(), Messages.DATEFORMAT_DMY_HMS, true);
}
}
}
if (Helpers.XapiEqualOrGreater_22_20_0(Host))
{
var unixMinDateTime = Util.GetUnixMinDateTime();
var softwareVersionDate = unixMinDateTime;
if (Host.software_version.ContainsKey("date"))
{
if (!Util.TryParseIso8601DateTime(Host.software_version["date"], out softwareVersionDate))
Util.TryParseNonIso8601DateTime(Host.software_version["date"], out softwareVersionDate);
}
if (Host.last_software_update > softwareVersionDate && Host.last_software_update > unixMinDateTime)
{
lastUpdateTime = HelpersGUI.DateTimeToString(Host.last_software_update.ToLocalTime(), Messages.DATEFORMAT_DMY_HMS, true);
}
}
SetValues(Host.Name(), Images.GetImage16For(Images.GetIconFor(Host)), lastSyncTime, lastUpdateTime);
if (poolUpdateInfo != null && hostUpdateInfo != null)
{
if (hostUpdateInfo.RecommendedGuidance.Length > 0)
_childRows.Add(new PostUpdateActionRow(hostUpdateInfo.RecommendedGuidance));
var categories = hostUpdateInfo.GetUpdateCategories(poolUpdateInfo);
_childRows.AddRange(categories.Select(c => new UpdateCategoryRow(c.Item1, c.Item2) as CdnExpandableRow));
if (hostUpdateInfo.Rpms.Length > 0)
_childRows.Add(new RpmCategoryRow(hostUpdateInfo.Rpms));
}
}
public IXenConnection Connection { get; }
public Host Host { get; }
public override List<CdnExpandableRow> ChildRows => _childRows;
}
internal class UpdateCategoryRow : CdnExpandableRow
{
public UpdateCategoryRow(CdnUpdateType updateType, List<CdnUpdate> updates)
{
SetValues(updateType.GetCategoryTitle(updates.Count), updateType.GetImageOf());
ChildRows = updates.Select(u => new UpdateRow(u)).Cast<CdnExpandableRow>().ToList();
}
public override List<CdnExpandableRow> ChildRows { get; } = new List<CdnExpandableRow>();
}
internal class RpmCategoryRow : CdnExpandableRow
{
public RpmCategoryRow(params string[] rpms)
{
SetValues(string.Format(Messages.HOTFIX_RPMS_TO_INSTALL, rpms.Length),
Images.StaticImages._000_Patch_h32bit_16);
ChildRows = new List<CdnExpandableRow> { new RpmsRow(rpms) };
}
public override List<CdnExpandableRow> ChildRows { get; } = new List<CdnExpandableRow>();
}
internal class UpdateRow : CdnExpandableRow
{
public UpdateRow(CdnUpdate update)
{
SetValues(update.Summary, null);
var details = update.CollateDetails();
if (!string.IsNullOrEmpty(details))
ChildRows = new List<CdnExpandableRow> { new UpdateDetailRow(details) };
}
public override List<CdnExpandableRow> ChildRows { get; } = new List<CdnExpandableRow>();
}
internal class UpdateDetailRow : CdnExpandableRow
{
public UpdateDetailRow(string detail)
{
SetValues(detail, null);
}
}
internal class PostUpdateActionRow : CdnExpandableRow
{
public PostUpdateActionRow(CdnGuidance[] guidance)
{
var text = string.Format(Messages.HOTFIX_POST_UPDATE_ACTIONS,
string.Join("\n", guidance.Select(g => g.StringOf())));
SetValues(text, Images.StaticImages.rightArrowLong_Blue_16);
}
}
internal class RpmsRow : CdnExpandableRow
{
public RpmsRow(string[] rpms)
{
SetValues(string.Join("\n", rpms), null);
}
}
}

View File

@ -0,0 +1,97 @@
/* Copyright (c) Cloud Software Group, Inc.
*
* Redistribution and use in source and binary forms,
* with or without modification, are permitted provided
* that the following conditions are met:
*
* * Redistributions of source code must retain the above
* copyright notice, this list of conditions and the
* following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the
* following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
using System;
using System.Drawing;
using System.Windows.Forms;
namespace XenAdmin.TabPages.CdnUpdates
{
internal class CdnExpandableTextAndImageCell : DataGridViewTextBoxCell
{
private const int IMAGE_WIDTH = 22;
public Image Image { get; set; }
public bool IsPointInExpander(Point p)
{
if (OwningRow is CdnExpandableRow row && row.ChildRows.Count > 0)
{
var indent = row.Level * IMAGE_WIDTH;
var rect = new Rectangle(ContentBounds.X + indent, ContentBounds.Y, IMAGE_WIDTH, ContentBounds.Height);
return rect.Contains(p);
}
return false;
}
protected override void Paint(Graphics graphics, Rectangle clipBounds, Rectangle cellBounds, int rowIndex, DataGridViewElementStates cellState, object value, object formattedValue, string errorText, DataGridViewCellStyle cellStyle, DataGridViewAdvancedBorderStyle advancedBorderStyle, DataGridViewPaintParts paintParts)
{
var indent = 0;
var color = (cellState & DataGridViewElementStates.Selected) != 0
? DataGridView.DefaultCellStyle.SelectionBackColor
: DataGridView.DefaultCellStyle.BackColor;
if (OwningRow is CdnExpandableRow row)
{
indent = row.Level * IMAGE_WIDTH;
using (var brush = new SolidBrush(color))
graphics.FillRectangle(brush, cellBounds.X, cellBounds.Y, indent + IMAGE_WIDTH, cellBounds.Height);
if (row.ChildRows.Count > 0)
{
//the dimensions of the expander are 9x9, but we want it in the middle of a 18x16 square
var expander = row.IsExpanded ? Images.StaticImages.tree_minus : Images.StaticImages.tree_plus;
graphics.DrawImage(expander, cellBounds.X + indent + 5, cellBounds.Y + 5, 9, 9);
}
indent += IMAGE_WIDTH;
}
if (Image != null)
{
using (var brush = new SolidBrush(color))
graphics.FillRectangle(brush, cellBounds.X + indent, cellBounds.Y, IMAGE_WIDTH, cellBounds.Height);
graphics.DrawImage(Image, cellBounds.X + indent, cellBounds.Y + 2,
Math.Min(Image.Width, IMAGE_WIDTH), Math.Min(Image.Height, cellBounds.Height));
indent += Image.Width;
}
var textBounds = new Rectangle(cellBounds.X + indent, cellBounds.Y, cellBounds.Width - indent, cellBounds.Height);
base.Paint(graphics, clipBounds, textBounds, rowIndex, cellState, value, formattedValue, errorText, cellStyle, advancedBorderStyle, paintParts);
}
}
}

View File

@ -0,0 +1,229 @@
/* Copyright (c) Cloud Software Group, Inc.
*
* Redistribution and use in source and binary forms,
* with or without modification, are permitted provided
* that the following conditions are met:
*
* * Redistributions of source code must retain the above
* copyright notice, this list of conditions and the
* following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the
* following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using XenAdmin.Core;
namespace XenAdmin.TabPages.CdnUpdates
{
internal static class CdnExtensions
{
internal static string StringOf(this CdnGuidance guidance)
{
switch (guidance)
{
case CdnGuidance.RebootHost:
return Messages.CDN_GUIDANCE_REBOOT_HOST;
case CdnGuidance.RestartDeviceModel:
return Messages.CDN_GUIDANCE_RESTART_DEVICE_MODEL;
case CdnGuidance.EvacuateHost:
return Messages.CDN_GUIDANCE_EVACUATE_HOST;
case CdnGuidance.RestartToolstack:
return Messages.CDN_GUIDANCE_RESTART_TOOLSTACK;
default:
case CdnGuidance.None:
return Messages.NONE;
}
}
internal static string InitialOf(this CdnUpdateType updateType)
{
switch (updateType)
{
case CdnUpdateType.SecurityFix:
return "S";
case CdnUpdateType.Bugfix:
return "B";
case CdnUpdateType.Improvement:
return "I";
case CdnUpdateType.NewFeature:
return "N";
case CdnUpdateType.PreviewFeature:
return "P";
case CdnUpdateType.Foundational:
return "F";
default:
return "?";
}
}
internal static Color ColorOf(this CdnUpdateType updateType)
{
switch (updateType)
{
case CdnUpdateType.SecurityFix:
return Color.Red;
case CdnUpdateType.Bugfix:
return Color.DarkOrange;
case CdnUpdateType.Improvement:
return Color.Gold;
case CdnUpdateType.NewFeature:
return Color.Green;
case CdnUpdateType.PreviewFeature:
return Color.DodgerBlue;
case CdnUpdateType.Foundational:
return Color.Tan;
default:
return Color.DarkGray;
}
}
internal static string CollateDetails(this CdnUpdate update)
{
var sb = new StringBuilder();
if (!string.IsNullOrWhiteSpace(update.Description) && update.Description.ToLower() != "none")
sb.AppendLine(update.Description).AppendLine();
if (!string.IsNullOrWhiteSpace(update.SpecialInfo) && update.SpecialInfo.ToLower() != "none")
sb.AppendLine(update.SpecialInfo).AppendLine();
if (!string.IsNullOrWhiteSpace(update.Url) && update.Url.ToLower() != "none")
sb.AppendLine(update.Url).AppendLine();
return sb.ToString().Trim();
}
internal static List<(CdnUpdateType, List<CdnUpdate>)> GetUpdateCategories(this CdnHostUpdateInfo hostUpdateInfo, CdnPoolUpdateInfo poolUpdateInfo)
{
return (from string id in hostUpdateInfo.UpdateIDs
let update = poolUpdateInfo.Updates.FirstOrDefault(u => u.Id == id)
group update by update.Type
into category
orderby category.Key
where category.Any()
select (category.Key, category.ToList())).ToList();
}
internal static string GetCategoryTitle(this CdnUpdateType updateType, int numberOfUpdates)
{
switch (updateType)
{
case CdnUpdateType.Bugfix:
return numberOfUpdates == 1
? Messages.HOTFIX_TYPE_BUG_FIX_ONE
: string.Format(Messages.HOTFIX_TYPE_BUG_FIX_MANY, numberOfUpdates);
case CdnUpdateType.SecurityFix:
return numberOfUpdates == 1
? Messages.HOTFIX_TYPE_SECURITY_FIX_ONE
: string.Format(Messages.HOTFIX_TYPE_SECURITY_FIX_MANY, numberOfUpdates);
case CdnUpdateType.NewFeature:
return numberOfUpdates == 1
? Messages.HOTFIX_TYPE_NEW_FEATURE_ONE
: string.Format(Messages.HOTFIX_TYPE_NEW_FEATURE_MANY, numberOfUpdates);
case CdnUpdateType.PreviewFeature:
return numberOfUpdates == 1
? Messages.HOTFIX_TYPE_PREVIEW_FEATURE_ONE
: string.Format(Messages.HOTFIX_TYPE_PREVIEW_FEATURE_MANY, numberOfUpdates);
case CdnUpdateType.Improvement:
return numberOfUpdates == 1
? Messages.HOTFIX_TYPE_IMPROVEMENT_ONE
: string.Format(Messages.HOTFIX_TYPE_IMPROVEMENT_MANY, numberOfUpdates);
case CdnUpdateType.Foundational:
return numberOfUpdates == 1
? Messages.HOTFIX_TYPE_IMPROVEMENT_ONE
: string.Format(Messages.HOTFIX_TYPE_IMPROVEMENT_MANY, numberOfUpdates);
default:
return Messages.UNKNOWN;
}
}
internal static Image GetImageOf(this CdnUpdateType updateType)
{
switch (updateType)
{
case CdnUpdateType.Bugfix:
return CdnStaticImages.BugFix;
case CdnUpdateType.SecurityFix:
return CdnStaticImages.SecurityFix;
case CdnUpdateType.NewFeature:
return CdnStaticImages.NewFeature;
case CdnUpdateType.PreviewFeature:
return CdnStaticImages.PreviewFeature;
case CdnUpdateType.Improvement:
return CdnStaticImages.Improvement;
case CdnUpdateType.Foundational:
return CdnStaticImages.Foundational;
default:
return CdnStaticImages.Unknown;
}
}
}
internal static class CdnStaticImages
{
public static readonly Image SecurityFix = GetBitmap(CdnUpdateType.SecurityFix);
public static readonly Image BugFix = GetBitmap(CdnUpdateType.Bugfix);
public static readonly Image Improvement = GetBitmap(CdnUpdateType.Improvement);
public static readonly Image NewFeature = GetBitmap(CdnUpdateType.NewFeature);
public static readonly Image PreviewFeature = GetBitmap(CdnUpdateType.PreviewFeature);
public static readonly Image Foundational = GetBitmap(CdnUpdateType.Foundational);
public static readonly Image Unknown = Images.StaticImages.alert6_16;
private static Bitmap GetBitmap(CdnUpdateType updateType)
{
string letter = updateType.InitialOf();
Color color = updateType.ColorOf();
var bmp = new Bitmap(16, 16);
var rect = new Rectangle(0, 0, 15, 15);
using (var g = Graphics.FromImage(bmp))
{
g.SmoothingMode = SmoothingMode.AntiAlias;
using (var brush = new SolidBrush(color))
g.FillEllipse(brush, rect);
using (var pen = new Pen(ControlPaint.Dark(color), 1))
g.DrawEllipse(pen, rect);
using (var brush = new SolidBrush(Color.WhiteSmoke))
using (var font = new Font(FontFamily.GenericSansSerif, 7.5F, FontStyle.Bold))
using (var format = new StringFormat())
{
format.LineAlignment = StringAlignment.Center;
format.Alignment = StringAlignment.Center;
rect.Inflate(1, 1);
g.DrawString(letter, font, brush, rect, format);
}
}
return bmp;
}
}
}

View File

@ -35,11 +35,13 @@ using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using XenAdmin.Actions;
using XenAdmin.Commands;
using XenAdmin.Controls;
using XenAdmin.Core;
using XenAdmin.CustomFields;
using XenAdmin.Dialogs;
using XenAdmin.Dialogs.ServerUpdates;
using XenAdmin.Model;
using XenAdmin.Network;
using XenAdmin.SettingsPanels;
@ -372,9 +374,8 @@ namespace XenAdmin.TabPages
base.Text = Messages.CONNECTION_GENERAL_TAB_TITLE;
else if (xenObject is Host)
base.Text = Messages.HOST_GENERAL_TAB_TITLE;
else if (xenObject is VM)
else if (xenObject is VM vm)
{
VM vm = (VM)xenObject;
if (vm.is_a_snapshot)
base.Text = Messages.SNAPSHOT_GENERAL_TAB_TITLE;
else if (vm.is_a_template)
@ -417,12 +418,12 @@ namespace XenAdmin.TabPages
GenerateVersionBox();
GenerateLicenseBox();
GenerateCPUBox();
GenerateHostPatchesBox();
GenerateHostUpdatesBox();
GenerateBootBox();
GenerateHABox();
GenerateStatusBox();
GenerateMultipathBox();
GeneratePoolPatchesBox();
GeneratePoolUpdatesBox();
GenerateMultipathBootBox();
GenerateVCPUsBox();
GenerateDockerInfoBox();
@ -538,30 +539,23 @@ namespace XenAdmin.TabPages
}
};
CustomFieldWrapper cfWrapper = new CustomFieldWrapper(xenObject, customField.Definition);
s.AddEntry(customField.Definition.Name.Ellipsise(30), cfWrapper.ToString(), customField.Definition.Name, editValue);
var cfWrapper = new CustomFieldWrapper(xenObject, customField.Definition);
s.AddEntry(customField.Definition.Name, cfWrapper.ToString(), editValue);
}
}
private void GeneratePoolPatchesBox()
private void GeneratePoolUpdatesBox()
{
if (!(xenObject is Pool pool))
return;
PDSection s = pdSectionUpdates;
var messages = CheckPoolUpdate(pool);
if (messages.Count > 0)
{
foreach (var kvp in messages)
s.AddEntry(kvp.Key, kvp.Value);
pdSectionUpdates.AddEntry(kvp.Key, kvp.Value);
}
Host coordinator = Helpers.GetCoordinator(xenObject.Connection);
if (coordinator == null)
return;
var fullyApplied = new List<string>();
var partAppliedError = new List<string>();
var partApplied = new List<string>();
@ -569,7 +563,11 @@ namespace XenAdmin.TabPages
var cache = xenObject.Connection.Cache;
var allHostCount = xenObject.Connection.Cache.HostCount;
if (Helpers.ElyOrGreater(xenObject.Connection))
if (Helpers.CloudOrGreater(pool.Connection))
{
GenerateCdnUpdatesBox(pool);
}
else if (Helpers.ElyOrGreater(xenObject.Connection))
{
foreach (var u in cache.Pool_updates)
{
@ -606,76 +604,127 @@ namespace XenAdmin.TabPages
if (fullyApplied.Count > 0)
{
fullyApplied.Sort(StringUtility.NaturalCompare);
s.AddEntry(FriendlyName("Pool_patch.fully_applied"), string.Join(Environment.NewLine, fullyApplied));
pdSectionUpdates.AddEntry(FriendlyName("Pool_patch.fully_applied"), string.Join(Environment.NewLine, fullyApplied));
}
if (partApplied.Count > 0)
{
var menuItems = new ToolStripMenuItem[] {new CommandToolStripMenuItem(new InstallNewUpdateCommand(Program.MainWindow), true)};
partApplied.Sort(StringUtility.NaturalCompare);
s.AddEntry(FriendlyName("Pool_patch.partially_applied"), string.Join(Environment.NewLine, partApplied), menuItems);
pdSectionUpdates.AddEntry(FriendlyName("Pool_patch.partially_applied"), string.Join(Environment.NewLine, partApplied), menuItems);
}
if (partAppliedError.Count > 0)
{
var menuItems = new ToolStripMenuItem[] {new CommandToolStripMenuItem(new InstallNewUpdateCommand(Program.MainWindow), true)};
partAppliedError.Sort(StringUtility.NaturalCompare);
s.AddEntry(string.Format(Messages.STRING_SPACE_STRING,
pdSectionUpdates.AddEntry(string.Format(Messages.STRING_SPACE_STRING,
FriendlyName("Pool_patch.partially_applied"), Messages.UPDATES_GENERAL_TAB_ENFORCE_HOMOGENEITY),
string.Join(Environment.NewLine, partAppliedError), Color.Red, menuItems);
}
}
private void GenerateHostPatchesBox()
private void GenerateCdnUpdatesBox(Pool pool)
{
Host host = xenObject as Host;
if (host == null)
return;
var repoNames = (from repoRef in pool.repositories
let repo = pool.Connection.Resolve(repoRef)
where repo != null
let found = RepoDescriptor.AllRepos.FirstOrDefault(rd => rd.MatchesRepository(repo))
where found != null
select found.FriendlyName).ToList();
PDSection s = pdSectionUpdates;
List<KeyValuePair<String, String>> messages;
bool elyOrGreater = Helpers.ElyOrGreater(host);
if (elyOrGreater)
{
// As of Ely we use host.updates_requiring_reboot to generate the list of reboot required messages
messages = CheckHostUpdatesRequiringReboot(host);
}
else
{
// For older versions no change to how messages are generated
messages = CheckServerUpdates(host);
}
if (messages.Count > 0)
{
foreach (KeyValuePair<String, String> kvp in messages)
pdSectionUpdates.AddEntryWithNoteLink(Messages.UPDATES_GENERAL_TAB_REPO,
repoNames.Count == 0 ? Messages.NOT_CONFIGURED : string.Join("\n", repoNames),
Messages.UPDATES_GENERAL_TAB_CONFIG,
() =>
{
s.AddEntry(kvp.Key, kvp.Value);
using (var dialog = new ConfigUpdatesDialog())
dialog.ShowDialog(this);
});
string lastSyncTime = Messages.INDETERMINABLE;
if (Helpers.XapiEqualOrGreater_23_18_0(pool.Connection))
{
lastSyncTime = Messages.NEVER;
if (pool.last_update_sync > Util.GetUnixMinDateTime())
{
lastSyncTime = HelpersGUI.DateTimeToString(pool.last_update_sync.ToLocalTime(), Messages.DATEFORMAT_DMY_HMS, true);
}
}
var appliedPatchesList = Helpers.HostAppliedPatchesList(host);
var appliedPatches = string.Join(Environment.NewLine, appliedPatchesList.ToArray());
pdSectionUpdates.AddEntryWithNoteLink(Messages.UPDATES_GENERAL_TAB_LAST_SYNCED,
lastSyncTime, Messages.UPDATES_GENERAL_TAB_SYNC_NOW,
() =>
{
var syncAction = new SyncWithCdnAction(pool);
syncAction.Completed += a => Updates.CheckForCdnUpdates(a.Connection);
syncAction.RunAsync();
});
}
private void GenerateHostUpdatesBox()
{
if (!(xenObject is Host host))
return;
bool elyOrGreater = Helpers.ElyOrGreater(host);
// As of Ely we use host.updates_requiring_reboot to generate the list of reboot required messages
// For older versions no change to how messages are generated
var messages = elyOrGreater ? CheckHostUpdatesRequiringReboot(host) : CheckServerUpdates(host);
foreach (var kvp in messages)
pdSectionUpdates.AddEntry(kvp.Key, kvp.Value);
var appliedPatches = string.Join(Environment.NewLine, Helpers.HostAppliedPatchesList(host));
if (!string.IsNullOrEmpty(appliedPatches))
{
s.AddEntry(FriendlyName("Pool_patch.applied"), appliedPatches);
}
pdSectionUpdates.AddEntry(FriendlyName("Pool_patch.applied"), appliedPatches);
var recommendedPatches = RecommendedPatchesForHost(host);
if (!string.IsNullOrEmpty(recommendedPatches))
{
s.AddEntry(FriendlyName("Pool_patch.required-updates"), recommendedPatches);
}
pdSectionUpdates.AddEntry(FriendlyName("Pool_patch.required-updates"), recommendedPatches);
if (!elyOrGreater)
{
// add supplemental packs
var suppPacks = hostInstalledSuppPacks(host);
if (!string.IsNullOrEmpty(suppPacks))
pdSectionUpdates.AddEntry(FriendlyName("Supplemental_packs.installed"), suppPacks);
}
if (Helpers.CloudOrGreater(host))
{
var pool = Helpers.GetPool(host.Connection);
if (pool == null) //standalone host
{
s.AddEntry(FriendlyName("Supplemental_packs.installed"), suppPacks);
pool = Helpers.GetPoolOfOne(host.Connection);
GenerateCdnUpdatesBox(pool);
}
if (Helpers.XapiEqualOrGreater_22_20_0(host))
{
var unixMinDateTime = Util.GetUnixMinDateTime();
var softwareVersionDate = unixMinDateTime;
if (host.software_version.ContainsKey("date"))
{
if (!Util.TryParseIso8601DateTime(host.software_version["date"], out softwareVersionDate))
Util.TryParseNonIso8601DateTime(host.software_version["date"], out softwareVersionDate);
}
string lastUpdateTime = Messages.NEVER;
if (host.last_software_update > softwareVersionDate && host.last_software_update > unixMinDateTime)
{
lastUpdateTime = HelpersGUI.DateTimeToString(host.last_software_update.ToLocalTime(), Messages.DATEFORMAT_DMY_HMS, true);
}
pdSectionUpdates.AddEntry(Messages.SOFTWARE_VERSION_LAST_UPDATED, lastUpdateTime);
}
}
}
@ -754,10 +803,10 @@ namespace XenAdmin.TabPages
continue;
if (repairable)
s.AddEntry(" " + Helpers.GetName(host).Ellipsise(30),
s.AddEntry(Helpers.GetName(host).Ellipsise(30),
Messages.REPAIR_SR_DIALOG_CONNECTION_MISSING, Color.Red, repairItem);
else
s.AddEntry(" " + Helpers.GetName(host).Ellipsise(30),
s.AddEntry(Helpers.GetName(host).Ellipsise(30),
Messages.REPAIR_SR_DIALOG_CONNECTION_MISSING, Color.Red);
continue;
@ -972,12 +1021,23 @@ namespace XenAdmin.TabPages
private void GenerateLicenseBox()
{
Host host = xenObject as Host;
if (host == null)
if (!(xenObject is Host host))
return;
PDSection s = pdSectionLicense;
if (host.CanShowTrialEditionUpsell())
{
pdSectionLicense.AddEntryWithNoteLink(Messages.WARNING, Messages.TRIAL_EDITION_UPSELLING_MESSAGE,
Messages.LICENSE_MANAGER_BUY_LICENSE_LINK_TEXT, () => Program.OpenURL(InvisibleMessages.LICENSE_BUY_URL), Color.Red);
}
if (host.CssLicenseHasExpired() && !host.IsInPreviewRelease())
{
pdSectionLicense.AddEntryWithNoteLink(Messages.WARNING, Messages.EXPIRED_CSS_UPSELLING_MESSAGE_HOST,
Messages.LICENSE_MANAGER_PURCHASE_SUPPORT_LINK_TEXT, () => Program.OpenURL(InvisibleMessages.CSS_URL), Color.Red);
}
if (host.license_params == null)
return;
@ -1008,10 +1068,11 @@ namespace XenAdmin.TabPages
var ss = new GeneralTabLicenseStatusStringifier(licenseStatus);
s.AddEntry(Messages.LICENSE_STATUS,
licenseStatus.Updated ? ss.ExpiryStatus : Messages.GENERAL_LICENSE_QUERYING, editItem);
s.AddEntry(FriendlyName("host.license_params-expiry"),
licenseStatus.Updated ? ss.ExpiryDate : Messages.GENERAL_LICENSE_QUERYING,
ss.ShowExpiryDate,
editItem);
if (ss.ShowExpiryDate)
s.AddEntry(FriendlyName("host.license_params-expiry"),
licenseStatus.Updated ? ss.ExpiryDate : Messages.GENERAL_LICENSE_QUERYING,
editItem);
}
info.Remove("expiry");
@ -1069,19 +1130,16 @@ namespace XenAdmin.TabPages
private void GenerateVersionBox()
{
Host host = xenObject as Host;
if (host == null || host.software_version == null)
if (!(xenObject is Host host) || host.software_version == null)
return;
var softwareVersionDate = DateTime.MinValue;
var unixMinDateTime = Util.GetUnixMinDateTime();
if (host.software_version.ContainsKey("date"))
{
string buildDate = host.software_version["date"];
if (Util.TryParseIso8601DateTime(host.software_version["date"], out softwareVersionDate) && softwareVersionDate > unixMinDateTime)
if (Util.TryParseIso8601DateTime(host.software_version["date"], out var softwareVersionDate) && softwareVersionDate > unixMinDateTime)
buildDate = HelpersGUI.DateTimeToString(softwareVersionDate.ToLocalTime(), Messages.DATEFORMAT_DMY_HMS, true);
else if (Util.TryParseNonIso8601DateTime(host.software_version["date"], out softwareVersionDate) && softwareVersionDate > unixMinDateTime)
buildDate = HelpersGUI.DateTimeToString(softwareVersionDate.ToLocalTime(), Messages.DATEFORMAT_DMY, true);
@ -1105,11 +1163,6 @@ namespace XenAdmin.TabPages
if (host.software_version.ContainsKey("dbv"))
pdSectionVersion.AddEntry("DBV", host.software_version["dbv"]);
if (Helpers.CloudOrGreater(host) && Helpers.XapiEqualOrGreater_22_20_0(host) &&
host.last_software_update > softwareVersionDate && host.last_software_update > unixMinDateTime)
pdSectionVersion.AddEntry(Messages.SOFTWARE_VERSION_LAST_UPDATED,
HelpersGUI.DateTimeToString(host.last_software_update.ToLocalTime(), Messages.DATEFORMAT_DMY_HMS, true));
}
private void GenerateCPUBox()
@ -2101,7 +2154,7 @@ namespace XenAdmin.TabPages
if (expand(s))
s.Expand();
else
s.Contract();
s.Collapse();
}
finally
{

View File

@ -37,6 +37,7 @@ using System.Windows.Forms;
using XenAdmin.Actions;
using XenAdmin.Controls;
using XenAdmin.Controls.MainWindowControls;
using XenAdmin.Core;
using XenAdmin.Dialogs;
using XenAPI;
@ -69,7 +70,6 @@ namespace XenAdmin.TabPages
protected override void RefreshPage()
{
toolStripDdbFilterLocation.InitializeHostList();
toolStripDdbFilterLocation.BuildFilterList();
BuildRowList();
}
@ -87,6 +87,8 @@ namespace XenAdmin.TabPages
public override string HelpID => "EventsPane";
public override NotificationsSubMode NotificationsSubMode => NotificationsSubMode.Events;
#endregion
private void Action_NewAction(ActionBase action)

View File

@ -187,7 +187,7 @@
<value>1, 1, 1, 0</value>
</data>
<data name="toolStripTop.Size" type="System.Drawing.Size, System.Drawing">
<value>760, 26</value>
<value>768, 26</value>
</data>
<data name="toolStripTop.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
@ -320,7 +320,7 @@
<value>Vertical</value>
</data>
<data name="dataGridView.Size" type="System.Drawing.Size, System.Drawing">
<value>759, 422</value>
<value>767, 430</value>
</data>
<data name="dataGridView.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
@ -338,7 +338,7 @@
<value>0</value>
</data>
<data name="tableLayoutPanel1.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 51</value>
<value>8, 47</value>
</data>
<data name="tableLayoutPanel1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 12, 0, 0</value>
@ -347,7 +347,7 @@
<value>1</value>
</data>
<data name="tableLayoutPanel1.Size" type="System.Drawing.Size, System.Drawing">
<value>761, 424</value>
<value>769, 432</value>
</data>
<data name="tableLayoutPanel1.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
@ -380,7 +380,7 @@
<value>Top</value>
</data>
<data name="tableLayoutPanel2.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 12</value>
<value>8, 8</value>
</data>
<data name="tableLayoutPanel2.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 0</value>
@ -389,7 +389,7 @@
<value>1</value>
</data>
<data name="tableLayoutPanel2.Size" type="System.Drawing.Size, System.Drawing">
<value>762, 27</value>
<value>770, 27</value>
</data>
<data name="tableLayoutPanel2.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
@ -419,7 +419,7 @@
<value>Segoe UI, 8.25pt</value>
</data>
<data name="$this.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>12, 12, 12, 12</value>
<value>8, 8, 8, 8</value>
</data>
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
<value>786, 487</value>

View File

@ -0,0 +1,225 @@
namespace XenAdmin.TabPages
{
partial class ManageCdnUpdatesPage
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing)
{
DeregisterEventHandlers();
if (components != null)
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ManageCdnUpdatesPage));
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.toolStrip1 = new XenAdmin.Controls.ToolStripEx();
this.toolStripDropDownButtonServerFilter = new XenAdmin.Controls.FilterLocationToolStripDropDownButton();
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripButtonUpdate = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripButtonExportAll = new System.Windows.Forms.ToolStripButton();
this.button2 = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button();
this.dataGridViewEx1 = new XenAdmin.Controls.DataGridViewEx.DataGridViewEx();
this._columnName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this._columnLastSync = new System.Windows.Forms.DataGridViewTextBoxColumn();
this._columnLastUpdate = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.tsSplitButtonSynchronize = new System.Windows.Forms.ToolStripSplitButton();
this.tsmiSynchronizeSelected = new System.Windows.Forms.ToolStripMenuItem();
this.tsmiSynchronizeAll = new System.Windows.Forms.ToolStripMenuItem();
this.tableLayoutPanel2.SuspendLayout();
this.toolStrip1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridViewEx1)).BeginInit();
this.SuspendLayout();
//
// tableLayoutPanel2
//
resources.ApplyResources(this.tableLayoutPanel2, "tableLayoutPanel2");
this.tableLayoutPanel2.BackColor = System.Drawing.Color.Gainsboro;
this.tableLayoutPanel2.Controls.Add(this.toolStrip1, 0, 0);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
//
// toolStrip1
//
resources.ApplyResources(this.toolStrip1, "toolStrip1");
this.toolStrip1.BackColor = System.Drawing.Color.WhiteSmoke;
this.toolStrip1.ClickThrough = true;
this.toolStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
this.toolStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripDropDownButtonServerFilter,
this.toolStripSeparator3,
this.tsSplitButtonSynchronize,
this.toolStripButtonUpdate,
this.toolStripSeparator1,
this.toolStripButtonExportAll});
this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.TabStop = true;
//
// toolStripDropDownButtonServerFilter
//
this.toolStripDropDownButtonServerFilter.AutoToolTip = false;
resources.ApplyResources(this.toolStripDropDownButtonServerFilter, "toolStripDropDownButtonServerFilter");
this.toolStripDropDownButtonServerFilter.Margin = new System.Windows.Forms.Padding(2, 1, 0, 2);
this.toolStripDropDownButtonServerFilter.Name = "toolStripDropDownButtonServerFilter";
this.toolStripDropDownButtonServerFilter.FilterChanged += new System.Action(this.toolStripDropDownButtonServerFilter_FilterChanged);
//
// toolStripSeparator3
//
this.toolStripSeparator3.Name = "toolStripSeparator3";
resources.ApplyResources(this.toolStripSeparator3, "toolStripSeparator3");
//
// toolStripButtonUpdate
//
this.toolStripButtonUpdate.AutoToolTip = false;
this.toolStripButtonUpdate.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
resources.ApplyResources(this.toolStripButtonUpdate, "toolStripButtonUpdate");
this.toolStripButtonUpdate.Name = "toolStripButtonUpdate";
this.toolStripButtonUpdate.Click += new System.EventHandler(this.toolStripButtonUpdate_Click);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
resources.ApplyResources(this.toolStripSeparator1, "toolStripSeparator1");
//
// toolStripButtonExportAll
//
this.toolStripButtonExportAll.AutoToolTip = false;
resources.ApplyResources(this.toolStripButtonExportAll, "toolStripButtonExportAll");
this.toolStripButtonExportAll.Name = "toolStripButtonExportAll";
this.toolStripButtonExportAll.Click += new System.EventHandler(this.toolStripButtonExportAll_Click);
//
// button2
//
resources.ApplyResources(this.button2, "button2");
this.button2.Name = "button2";
this.button2.UseVisualStyleBackColor = true;
//
// button1
//
resources.ApplyResources(this.button1, "button1");
this.button1.Name = "button1";
this.button1.UseVisualStyleBackColor = true;
//
// dataGridViewEx1
//
resources.ApplyResources(this.dataGridViewEx1, "dataGridViewEx1");
this.dataGridViewEx1.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCells;
this.dataGridViewEx1.BackgroundColor = System.Drawing.SystemColors.Window;
this.dataGridViewEx1.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
this.dataGridViewEx1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
this.dataGridViewEx1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this._columnName,
this._columnLastSync,
this._columnLastUpdate});
this.dataGridViewEx1.Name = "dataGridViewEx1";
this.dataGridViewEx1.ReadOnly = true;
this.dataGridViewEx1.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewEx1_CellDoubleClick);
this.dataGridViewEx1.CellMouseClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dataGridViewEx1_CellMouseClick);
this.dataGridViewEx1.SelectionChanged += new System.EventHandler(this.dataGridViewEx1_SelectionChanged);
this.dataGridViewEx1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dataGridViewEx1_KeyDown);
//
// _columnName
//
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this._columnName.DefaultCellStyle = dataGridViewCellStyle1;
this._columnName.FillWeight = 60F;
resources.ApplyResources(this._columnName, "_columnName");
this._columnName.Name = "_columnName";
this._columnName.ReadOnly = true;
//
// _columnLastSync
//
this._columnLastSync.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
resources.ApplyResources(this._columnLastSync, "_columnLastSync");
this._columnLastSync.Name = "_columnLastSync";
this._columnLastSync.ReadOnly = true;
//
// _columnLastUpdate
//
this._columnLastUpdate.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
resources.ApplyResources(this._columnLastUpdate, "_columnLastUpdate");
this._columnLastUpdate.Name = "_columnLastUpdate";
this._columnLastUpdate.ReadOnly = true;
//
// tsSplitButtonSynchronize
//
this.tsSplitButtonSynchronize.AutoToolTip = false;
this.tsSplitButtonSynchronize.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
this.tsSplitButtonSynchronize.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tsmiSynchronizeSelected,
this.tsmiSynchronizeAll});
resources.ApplyResources(this.tsSplitButtonSynchronize, "tsSplitButtonSynchronize");
this.tsSplitButtonSynchronize.Name = "tsSplitButtonSynchronize";
this.tsSplitButtonSynchronize.DropDownItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.tsSplitButtonSynchronize_DropDownItemClicked);
//
// tsmiSynchronizeSelected
//
this.tsmiSynchronizeSelected.Name = "tsmiSynchronizeSelected";
resources.ApplyResources(this.tsmiSynchronizeSelected, "tsmiSynchronizeSelected");
this.tsmiSynchronizeSelected.Click += new System.EventHandler(this.tsmiSynchronizeSelected_Click);
//
// tsmiSynchronizeAll
//
this.tsmiSynchronizeAll.Name = "tsmiSynchronizeAll";
resources.ApplyResources(this.tsmiSynchronizeAll, "tsmiSynchronizeAll");
this.tsmiSynchronizeAll.Click += new System.EventHandler(this.tsmiSynchronizeAll_Click);
//
// ManageCdnUpdatesPage
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.BackColor = System.Drawing.SystemColors.Window;
this.Controls.Add(this.dataGridViewEx1);
this.Controls.Add(this.tableLayoutPanel2);
this.Name = "ManageCdnUpdatesPage";
this.tableLayoutPanel2.ResumeLayout(false);
this.toolStrip1.ResumeLayout(false);
this.toolStrip1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridViewEx1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
private Controls.ToolStripEx toolStrip1;
private Controls.FilterLocationToolStripDropDownButton toolStripDropDownButtonServerFilter;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator3;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
private System.Windows.Forms.ToolStripButton toolStripButtonExportAll;
private System.Windows.Forms.ToolStripButton toolStripButtonUpdate;
private Controls.DataGridViewEx.DataGridViewEx dataGridViewEx1;
private System.Windows.Forms.DataGridViewTextBoxColumn _columnName;
private System.Windows.Forms.DataGridViewTextBoxColumn _columnLastSync;
private System.Windows.Forms.DataGridViewTextBoxColumn _columnLastUpdate;
private System.Windows.Forms.ToolStripSplitButton tsSplitButtonSynchronize;
private System.Windows.Forms.ToolStripMenuItem tsmiSynchronizeSelected;
private System.Windows.Forms.ToolStripMenuItem tsmiSynchronizeAll;
}
}

View File

@ -0,0 +1,560 @@
/* Copyright (c) Cloud Software Group, Inc.
*
* Redistribution and use in source and binary forms,
* with or without modification, are permitted provided
* that the following conditions are met:
*
* * Redistributions of source code must retain the above
* copyright notice, this list of conditions and the
* following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the
* following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
using System;
using System.IO;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using XenAdmin.Actions;
using XenAdmin.Controls.MainWindowControls;
using XenAdmin.Core;
using XenAdmin.Dialogs;
using XenAdmin.Network;
using XenAdmin.TabPages.CdnUpdates;
using XenAdmin.Wizards.PatchingWizard;
using XenAPI;
namespace XenAdmin.TabPages
{
public partial class ManageCdnUpdatesPage : NotificationsBasePage
{
private int checksQueue;
private int _rowInsertionIndex;
private volatile bool _buildInProgress;
private volatile bool _buildRequired;
public ManageCdnUpdatesPage()
{
InitializeComponent();
tsSplitButtonSynchronize.DefaultItem = tsmiSynchronizeSelected;
tsSplitButtonSynchronize.Text = tsmiSynchronizeSelected.Text;
}
protected override void OnHandleCreated(EventArgs e)
{
base.OnHandleCreated(e);
try
{
//ensure we won't try to rebuild the list while setting the initial view
checksQueue++;
Rebuild();
}
finally
{
checksQueue--;
}
UpdateButtonEnablement();
}
#region NotificationPage overrides
protected override void RefreshPage()
{
toolStripDropDownButtonServerFilter.InitializeHostList(Helpers.CloudOrGreater);
Rebuild();
}
protected override void RegisterEventHandlers()
{
Updates.CdnUpdateInfoChanged += Cdn_UpdateInfoChanged;
}
protected override void DeregisterEventHandlers()
{
Updates.CdnUpdateInfoChanged -= Cdn_UpdateInfoChanged;
}
public override string HelpID => "ManageUpdatesDialog";
public override NotificationsSubMode NotificationsSubMode => NotificationsSubMode.UpdatesFromCdn;
#endregion
private void Cdn_UpdateInfoChanged(IXenConnection obj)
{
Rebuild();
}
public override bool FilterIsOn => toolStripDropDownButtonServerFilter.FilterIsOn;
private void Rebuild()
{
if (_buildInProgress)
{
_buildRequired = true;
return;
}
Program.Invoke(Program.MainWindow, () =>
{
if (!Visible || checksQueue > 0)
return;
try
{
_buildInProgress = true;
OnFiltersChanged();
BuildList();
}
finally
{
_buildInProgress = false;
if (_buildRequired)
{
_buildRequired = false;
Rebuild();
}
}
});
}
private void BuildList()
{
dataGridViewEx1.SuspendLayout();
try
{
dataGridViewEx1.Rows.Clear();
var connections = ConnectionsManager.XenConnectionsCopy
.Where(c => c.IsConnected && Helpers.CloudOrGreater(c)).ToList();
connections.Sort();
foreach (var connection in connections)
{
Updates.CdnUpdateInfoPerConnection.TryGetValue(connection, out var poolUpdateInfo);
CdnExpandableRow row = null;
if (Helpers.GetPool(connection) == null)
{
if (poolUpdateInfo == null)
{
var host = connection.Cache.Hosts.FirstOrDefault();
if (host != null && !toolStripDropDownButtonServerFilter.HideByLocation(host.uuid))
row = new HostUpdateInfoRow(connection, host, null, null);
}
else
{
var hostUpdateInfo = poolUpdateInfo.HostsWithUpdates.FirstOrDefault();
var host = connection.Resolve(new XenRef<Host>(hostUpdateInfo?.HostOpaqueRef));
if (host != null && !toolStripDropDownButtonServerFilter.HideByLocation(host.uuid))
row = new HostUpdateInfoRow(connection, host, poolUpdateInfo, hostUpdateInfo);
}
}
else
{
var hostUuidList = connection.Cache.Hosts.Select(h => h.uuid).ToList();
if (!toolStripDropDownButtonServerFilter.HideByLocation(hostUuidList))
row = new PoolUpdateInfoRow(connection, poolUpdateInfo);
}
if (row != null)
dataGridViewEx1.Rows.Add(row);
}
}
finally
{
dataGridViewEx1.ResumeLayout();
}
}
private void UpdateButtonEnablement()
{
toolStripButtonExportAll.Enabled = dataGridViewEx1.RowCount > 0;
Pool selectedPool = null;
if (dataGridViewEx1.SelectedRows.Count > 0)
{
switch (dataGridViewEx1.SelectedRows[0])
{
case PoolUpdateInfoRow poolRow:
selectedPool = poolRow.Pool;
break;
case HostUpdateInfoRow hostRow when Helpers.GetPool(hostRow.Connection) == null:
selectedPool = Helpers.GetPoolOfOne(hostRow.Connection);
break;
}
}
tsmiSynchronizeSelected.Enabled = selectedPool != null && selectedPool.allowed_operations.Contains(pool_allowed_operations.sync_updates);
var allAllowed = true;
foreach (DataGridViewRow row in dataGridViewEx1.Rows)
{
if (row is PoolUpdateInfoRow puiRow &&
!puiRow.Pool.allowed_operations.Contains(pool_allowed_operations.sync_updates))
{
allAllowed = false;
break;
}
if (row is HostUpdateInfoRow huiRow && Helpers.GetPool(huiRow.Connection) == null)
{
var pool = Helpers.GetPoolOfOne(huiRow.Connection);
if (pool != null && !pool.allowed_operations.Contains(pool_allowed_operations.sync_updates))
{
allAllowed = false;
break;
}
}
}
tsmiSynchronizeAll.Enabled = allAllowed;
tsSplitButtonSynchronize.Enabled = tsmiSynchronizeSelected.Enabled || tsmiSynchronizeAll.Enabled;
if (tsSplitButtonSynchronize.DefaultItem != null && !tsSplitButtonSynchronize.DefaultItem.Enabled)
{
foreach (ToolStripItem item in tsSplitButtonSynchronize.DropDownItems)
{
if (item.Enabled)
{
tsSplitButtonSynchronize.DefaultItem = item;
tsSplitButtonSynchronize.Text = item.Text;
break;
}
}
}
}
private void ToggleRow(CdnExpandableRow row)
{
row.IsExpanded = !row.IsExpanded;
dataGridViewEx1.SuspendLayout();
try
{
if (row.IsExpanded)
ExpandRow(row);
else
CollapseRow(row);
}
finally
{
dataGridViewEx1.ResumeLayout();
}
}
private void ExpandRow(CdnExpandableRow row)
{
_rowInsertionIndex = row.Index;
foreach (var childRow in row.ChildRows)
{
if (row is HostUpdateInfoRow huiRow && toolStripDropDownButtonServerFilter.HideByLocation(huiRow.Host.uuid))
continue;
dataGridViewEx1.Rows.Insert(++_rowInsertionIndex, childRow);
childRow.ParentRow = row;
childRow.Level = row.Level + 1;
if (childRow.IsExpanded)
ExpandRow(childRow);
}
}
private void CollapseRow(CdnExpandableRow row)
{
foreach (var childRow in row.ChildRows)
{
dataGridViewEx1.Rows.Remove(childRow);
childRow.ParentRow = null;
childRow.Level = 0;
if (childRow.IsExpanded)
CollapseRow(childRow);
}
}
#region Toolstrip handlers
private void toolStripDropDownButtonServerFilter_FilterChanged()
{
Rebuild();
}
private void tsSplitButtonSynchronize_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e)
{
tsSplitButtonSynchronize.DefaultItem = e.ClickedItem;
tsSplitButtonSynchronize.Text = tsSplitButtonSynchronize.DefaultItem.Text;
}
private void tsmiSynchronizeSelected_Click(object sender, EventArgs e)
{
if (dataGridViewEx1.SelectedRows.Count > 0 &&
dataGridViewEx1.SelectedRows[0] is PoolUpdateInfoRow row)
{
var syncAction = new SyncWithCdnAction(row.Pool);
syncAction.Completed += a => Updates.CheckForCdnUpdates(a.Connection);
syncAction.RunAsync();
}
}
private void tsmiSynchronizeAll_Click(object sender, EventArgs e)
{
DialogResult result;
if (FilterIsOn)
{
using (var dlog = new NoIconDialog(Messages.YUM_REPO_SYNC_FILTER_CONFIRMATION,
new ThreeButtonDialog.TBDButton(Messages.YUM_REPO_SYNC_YES_ALL_BUTTON, DialogResult.Yes),
new ThreeButtonDialog.TBDButton(Messages.YUM_REPO_SYNC_YES_VISIBLE_BUTTON, DialogResult.No, ThreeButtonDialog.ButtonType.NONE),
ThreeButtonDialog.ButtonCancel))
{
result = dlog.ShowDialog(this);
}
}
else
{
using (var dlog = new NoIconDialog(Messages.YUM_REPO_SYNC_ALL_CONFIRMATION,
new ThreeButtonDialog.TBDButton(Messages.YUM_REPO_SYNC_YES_ALL_BUTTON, DialogResult.Yes),
ThreeButtonDialog.ButtonCancel))
{
result = dlog.ShowDialog(this);
Settings.TrySaveSettings();
}
}
switch (result)
{
case DialogResult.Cancel:
return;
case DialogResult.Yes:
var connections = ConnectionsManager.XenConnectionsCopy
.Where(c => c.IsConnected && Helpers.CloudOrGreater(c)).ToList();
foreach (var connection in connections)
{
var pool = Helpers.GetPoolOfOne(connection);
if (pool == null)
continue;
var syncAction = new SyncWithCdnAction(pool);
syncAction.Completed += a => Updates.CheckForCdnUpdates(a.Connection);
syncAction.RunAsync();
}
return;
case DialogResult.No:
foreach (DataGridViewRow row in dataGridViewEx1.Rows)
{
if (row is PoolUpdateInfoRow puiRow)
{
var syncAction = new SyncWithCdnAction(puiRow.Pool);
syncAction.Completed += a => Updates.CheckForCdnUpdates(a.Connection);
syncAction.RunAsync();
}
else if (row is HostUpdateInfoRow huiRow)
{
if (Helpers.GetPool(huiRow.Connection) != null)
continue;
var pool = Helpers.GetPoolOfOne(huiRow.Connection);
if (pool == null)
continue;
var syncAction = new SyncWithCdnAction(pool);
syncAction.Completed += a => Updates.CheckForCdnUpdates(a.Connection);
syncAction.RunAsync();
}
}
return;
}
}
private void toolStripButtonUpdate_Click(object sender, EventArgs e)
{
Program.MainWindow.ShowForm(typeof(PatchingWizard));
}
private void toolStripButtonExportAll_Click(object sender, EventArgs e)
{
bool exportAll = true;
if (FilterIsOn)
{
using (var dlog = new NoIconDialog(Messages.UPDATE_EXPORT_ALL_OR_FILTERED,
new ThreeButtonDialog.TBDButton(Messages.EXPORT_ALL_BUTTON, DialogResult.Yes),
new ThreeButtonDialog.TBDButton(Messages.EXPORT_FILTERED_BUTTON, DialogResult.No, ThreeButtonDialog.ButtonType.NONE),
ThreeButtonDialog.ButtonCancel))
{
var result = dlog.ShowDialog(this);
if (result == DialogResult.No)
exportAll = false;
else if (result == DialogResult.Cancel)
return;
}
}
string fileName;
using (SaveFileDialog dialog = new SaveFileDialog
{
AddExtension = true,
Filter = string.Format("{0} (*.txt)|*.txt|{1} (*.*)|*.*", Messages.TXT_DESCRIPTION, Messages.ALL_FILES),
FilterIndex = 0,
Title = Messages.EXPORT_ALL,
RestoreDirectory = true,
DefaultExt = "csv",
CheckPathExists = false,
OverwritePrompt = true
})
{
if (dialog.ShowDialog(this) != DialogResult.OK)
return;
fileName = dialog.FileName;
}
new DelegatedAsyncAction(null,
string.Format(Messages.EXPORT_UPDATES, fileName),
string.Format(Messages.EXPORTING_UPDATES, fileName),
string.Format(Messages.EXPORTED_UPDATES, fileName),
delegate
{
using (StreamWriter stream = new StreamWriter(fileName, false, Encoding.UTF8))
{
if (exportAll)
{
foreach (var kvp in Updates.CdnUpdateInfoPerConnection)
{
var connection = kvp.Key;
var poolUpdateInfo = kvp.Value;
foreach (var hostUpdateInfo in poolUpdateInfo.HostsWithUpdates)
{
stream.WriteLine(connection.Resolve(new XenRef<Host>(hostUpdateInfo.HostOpaqueRef))?.Name());
stream.WriteLine(string.Join("\n", hostUpdateInfo.RecommendedGuidance.Select(g => g.StringOf())));
var categories = hostUpdateInfo.GetUpdateCategories(poolUpdateInfo);
foreach (var category in categories)
{
stream.WriteLine($"{category.Item1.GetCategoryTitle(category.Item2.Count)}");
foreach (var update in category.Item2)
{
stream.WriteLine(update.Summary);
stream.WriteLine(update.CollateDetails());
}
}
stream.WriteLine(string.Join(", ", hostUpdateInfo.Rpms));
}
}
}
else
{
foreach (var row in dataGridViewEx1.Rows)
{
if (!(row is PoolUpdateInfoRow puiRow))
continue;
foreach (var childRow in puiRow.ChildRows)
{
if (!(childRow is HostUpdateInfoRow huiRow) ||
toolStripDropDownButtonServerFilter.HideByLocation(huiRow.Host.uuid))
continue;
foreach (var export in huiRow.Export())
stream.WriteLine(export);
}
}
}
}
}).RunAsync();
}
#endregion
#region DataGridView event handlers
private void dataGridViewEx1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
{
if (e.ColumnIndex == _columnName.Index &&
e.RowIndex >= 0 &&
e.RowIndex < dataGridViewEx1.RowCount &&
dataGridViewEx1.Rows[e.RowIndex] is CdnExpandableRow row)
{
ToggleRow(row);
}
}
private void dataGridViewEx1_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e)
{
if (e.Clicks == 1 &&
e.ColumnIndex == _columnName.Index &&
e.RowIndex >= 0 &&
e.RowIndex < dataGridViewEx1.RowCount &&
dataGridViewEx1.Rows[e.RowIndex] is CdnExpandableRow row &&
row.Cells[e.ColumnIndex] is CdnExpandableTextAndImageCell cell &&
cell.IsPointInExpander(e.Location))
{
ToggleRow(row);
}
}
private void dataGridViewEx1_KeyDown(object sender, KeyEventArgs e)
{
if (dataGridViewEx1.SelectedRows.Count > 0 &&
dataGridViewEx1.SelectedRows[0] is CdnExpandableRow row)
{
switch (e.KeyCode)
{
case Keys.Right when !row.IsExpanded:
case Keys.Left when row.IsExpanded:
break;
default:
return;
}
ToggleRow(row);
}
}
private void dataGridViewEx1_SelectionChanged(object sender, EventArgs e)
{
UpdateButtonEnablement();
}
#endregion
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,486 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="tableLayoutPanel2.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="tableLayoutPanel2.AutoSizeMode" type="System.Windows.Forms.AutoSizeMode, System.Windows.Forms">
<value>GrowAndShrink</value>
</data>
<data name="tableLayoutPanel2.ColumnCount" type="System.Int32, mscorlib">
<value>1</value>
</data>
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>144, 19</value>
</metadata>
<data name="toolStrip1.AutoSize" type="System.Boolean, mscorlib">
<value>False</value>
</data>
<data name="toolStrip1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="toolStrip1.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 9pt</value>
</data>
<data name="toolStripDropDownButtonServerFilter.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 9pt</value>
</data>
<data name="toolStripDropDownButtonServerFilter.ImageTransparentColor" type="System.Drawing.Color, System.Drawing">
<value>Magenta</value>
</data>
<data name="toolStripDropDownButtonServerFilter.Size" type="System.Drawing.Size, System.Drawing">
<value>97, 22</value>
</data>
<data name="toolStripDropDownButtonServerFilter.Text" xml:space="preserve">
<value>Filter by S&amp;erver</value>
</data>
<data name="toolStripSeparator3.Size" type="System.Drawing.Size, System.Drawing">
<value>6, 25</value>
</data>
<data name="tsmiSynchronizeSelected.Size" type="System.Drawing.Size, System.Drawing">
<value>185, 22</value>
</data>
<data name="tsmiSynchronizeSelected.Text" xml:space="preserve">
<value>Synchronize Sele&amp;cted</value>
</data>
<data name="tsmiSynchronizeAll.Size" type="System.Drawing.Size, System.Drawing">
<value>185, 22</value>
</data>
<data name="tsmiSynchronizeAll.Text" xml:space="preserve">
<value>Synchronize &amp;All</value>
</data>
<data name="tsSplitButtonSynchronize.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
</value>
</data>
<data name="tsSplitButtonSynchronize.ImageTransparentColor" type="System.Drawing.Color, System.Drawing">
<value>Magenta</value>
</data>
<data name="tsSplitButtonSynchronize.Size" type="System.Drawing.Size, System.Drawing">
<value>87, 22</value>
</data>
<data name="tsSplitButtonSynchronize.Text" xml:space="preserve">
<value>&amp;Synchronize</value>
</data>
<data name="toolStripButtonUpdate.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
</value>
</data>
<data name="toolStripButtonUpdate.ImageTransparentColor" type="System.Drawing.Color, System.Drawing">
<value>Magenta</value>
</data>
<data name="toolStripButtonUpdate.Size" type="System.Drawing.Size, System.Drawing">
<value>97, 22</value>
</data>
<data name="toolStripButtonUpdate.Text" xml:space="preserve">
<value>I&amp;nstall Updates...</value>
</data>
<data name="toolStripSeparator1.Size" type="System.Drawing.Size, System.Drawing">
<value>6, 25</value>
</data>
<data name="toolStripButtonExportAll.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 9pt</value>
</data>
<data name="toolStripButtonExportAll.ImageTransparentColor" type="System.Drawing.Color, System.Drawing">
<value>Magenta</value>
</data>
<data name="toolStripButtonExportAll.Size" type="System.Drawing.Size, System.Drawing">
<value>62, 22</value>
</data>
<data name="toolStripButtonExportAll.Text" xml:space="preserve">
<value>E&amp;xport All</value>
</data>
<data name="toolStrip1.Location" type="System.Drawing.Point, System.Drawing">
<value>1, 1</value>
</data>
<data name="toolStrip1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>1, 1, 1, 1</value>
</data>
<data name="toolStrip1.Size" type="System.Drawing.Size, System.Drawing">
<value>822, 25</value>
</data>
<data name="toolStrip1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="toolStrip1.Text" xml:space="preserve">
<value>toolStrip1</value>
</data>
<data name="&gt;&gt;toolStrip1.Name" xml:space="preserve">
<value>toolStrip1</value>
</data>
<data name="&gt;&gt;toolStrip1.Type" xml:space="preserve">
<value>XenAdmin.Controls.ToolStripEx, [XenCenter_No_Space], Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;toolStrip1.Parent" xml:space="preserve">
<value>tableLayoutPanel2</value>
</data>
<data name="&gt;&gt;toolStrip1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="tableLayoutPanel2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
</data>
<data name="tableLayoutPanel2.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 9pt</value>
</data>
<data name="tableLayoutPanel2.Location" type="System.Drawing.Point, System.Drawing">
<value>8, 8</value>
</data>
<data name="tableLayoutPanel2.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 0</value>
</data>
<data name="tableLayoutPanel2.RowCount" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="tableLayoutPanel2.Size" type="System.Drawing.Size, System.Drawing">
<value>824, 27</value>
</data>
<data name="tableLayoutPanel2.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;tableLayoutPanel2.Name" xml:space="preserve">
<value>tableLayoutPanel2</value>
</data>
<data name="&gt;&gt;tableLayoutPanel2.Type" xml:space="preserve">
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tableLayoutPanel2.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;tableLayoutPanel2.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="tableLayoutPanel2.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="toolStrip1" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Percent,100" /&gt;&lt;Rows Styles="Absolute,27,Absolute,27" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="button2.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="button2.Location" type="System.Drawing.Point, System.Drawing">
<value>397, 3</value>
</data>
<data name="button2.Size" type="System.Drawing.Size, System.Drawing">
<value>188, 23</value>
</data>
<data name="button2.TabIndex" type="System.Int32, mscorlib">
<value>12</value>
</data>
<data name="button2.Text" xml:space="preserve">
<value>Check for Updates Now</value>
</data>
<data name="&gt;&gt;button2.Name" xml:space="preserve">
<value>button2</value>
</data>
<data name="&gt;&gt;button2.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="button1.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="button1.Location" type="System.Drawing.Point, System.Drawing">
<value>383, 3</value>
</data>
<data name="button1.Size" type="System.Drawing.Size, System.Drawing">
<value>165, 8</value>
</data>
<data name="button1.TabIndex" type="System.Int32, mscorlib">
<value>12</value>
</data>
<data name="button1.Text" xml:space="preserve">
<value>Check for Updates Now</value>
</data>
<data name="&gt;&gt;button1.Name" xml:space="preserve">
<value>button1</value>
</data>
<data name="&gt;&gt;button1.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="dataGridViewEx1.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Bottom, Left, Right</value>
</data>
<metadata name="_columnName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="_columnName.HeaderText" xml:space="preserve">
<value>Updates available at last synchronization</value>
</data>
<data name="_columnName.MinimumWidth" type="System.Int32, mscorlib">
<value>10</value>
</data>
<metadata name="_columnLastSync.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="_columnLastSync.HeaderText" xml:space="preserve">
<value>Last synchronized</value>
</data>
<data name="_columnLastSync.MinimumWidth" type="System.Int32, mscorlib">
<value>10</value>
</data>
<data name="_columnLastSync.Width" type="System.Int32, mscorlib">
<value>126</value>
</data>
<metadata name="_columnLastUpdate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="_columnLastUpdate.HeaderText" xml:space="preserve">
<value>Last updated</value>
</data>
<data name="_columnLastUpdate.MinimumWidth" type="System.Int32, mscorlib">
<value>10</value>
</data>
<data name="dataGridViewEx1.Location" type="System.Drawing.Point, System.Drawing">
<value>8, 47</value>
</data>
<data name="dataGridViewEx1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 12, 0, 0</value>
</data>
<data name="dataGridViewEx1.Size" type="System.Drawing.Size, System.Drawing">
<value>824, 370</value>
</data>
<data name="dataGridViewEx1.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="&gt;&gt;dataGridViewEx1.Name" xml:space="preserve">
<value>dataGridViewEx1</value>
</data>
<data name="&gt;&gt;dataGridViewEx1.Type" xml:space="preserve">
<value>XenAdmin.Controls.DataGridViewEx.DataGridViewEx, [XenCenter_No_Space], Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;dataGridViewEx1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;dataGridViewEx1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>83</value>
</metadata>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>96, 96</value>
</data>
<data name="$this.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 9pt</value>
</data>
<data name="$this.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>8, 8, 8, 8</value>
</data>
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
<value>840, 425</value>
</data>
<data name="&gt;&gt;toolStripDropDownButtonServerFilter.Name" xml:space="preserve">
<value>toolStripDropDownButtonServerFilter</value>
</data>
<data name="&gt;&gt;toolStripDropDownButtonServerFilter.Type" xml:space="preserve">
<value>XenAdmin.Controls.FilterLocationToolStripDropDownButton, [XenCenter_No_Space], Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;toolStripSeparator3.Name" xml:space="preserve">
<value>toolStripSeparator3</value>
</data>
<data name="&gt;&gt;toolStripSeparator3.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;toolStripButtonUpdate.Name" xml:space="preserve">
<value>toolStripButtonUpdate</value>
</data>
<data name="&gt;&gt;toolStripButtonUpdate.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;toolStripSeparator1.Name" xml:space="preserve">
<value>toolStripSeparator1</value>
</data>
<data name="&gt;&gt;toolStripSeparator1.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;toolStripButtonExportAll.Name" xml:space="preserve">
<value>toolStripButtonExportAll</value>
</data>
<data name="&gt;&gt;toolStripButtonExportAll.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;_columnName.Name" xml:space="preserve">
<value>_columnName</value>
</data>
<data name="&gt;&gt;_columnName.Type" xml:space="preserve">
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;_columnLastSync.Name" xml:space="preserve">
<value>_columnLastSync</value>
</data>
<data name="&gt;&gt;_columnLastSync.Type" xml:space="preserve">
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;_columnLastUpdate.Name" xml:space="preserve">
<value>_columnLastUpdate</value>
</data>
<data name="&gt;&gt;_columnLastUpdate.Type" xml:space="preserve">
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tsSplitButtonSynchronize.Name" xml:space="preserve">
<value>tsSplitButtonSynchronize</value>
</data>
<data name="&gt;&gt;tsSplitButtonSynchronize.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripSplitButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tsmiSynchronizeSelected.Name" xml:space="preserve">
<value>tsmiSynchronizeSelected</value>
</data>
<data name="&gt;&gt;tsmiSynchronizeSelected.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tsmiSynchronizeAll.Name" xml:space="preserve">
<value>tsmiSynchronizeAll</value>
</data>
<data name="&gt;&gt;tsmiSynchronizeAll.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>ManageCdnUpdatesPage</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>XenAdmin.TabPages.NotificationsBasePage, [XenCenter_No_Space], Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
</root>

File diff suppressed because it is too large Load Diff

View File

@ -52,22 +52,21 @@
this.toolStripDropDownButtonDateFilter = new XenAdmin.Controls.FilterDatesToolStripDropDownButton();
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripButtonRefresh = new System.Windows.Forms.ToolStripButton();
this.toolStripButtonUpdate = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripButtonExportAll = new System.Windows.Forms.ToolStripButton();
this.toolStripSplitButtonDismiss = new System.Windows.Forms.ToolStripSplitButton();
this.dismissAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.dismissSelectedToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripButtonRestoreDismissed = new System.Windows.Forms.ToolStripButton();
this.toolStripButtonUpdate = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripButtonExportAll = new System.Windows.Forms.ToolStripButton();
this.AutoCheckForUpdatesDisabledLabel = new System.Windows.Forms.Label();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.checkForUpdatesNowLink = new System.Windows.Forms.LinkLabel();
this.button2 = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button();
this.tableLayoutPanel4 = new System.Windows.Forms.TableLayoutPanel();
this.labelProgress = new System.Windows.Forms.Label();
this.spinner = new XenAdmin.Controls.SpinnerIcon();
this.tableLayouPanel5 = new System.Windows.Forms.TableLayoutPanel();
this.tableLayoutPanel5 = new System.Windows.Forms.TableLayoutPanel();
this.panel1 = new System.Windows.Forms.Panel();
this.dataGridViewHosts = new XenAdmin.TabPages.ManageUpdatesPage.UpdatePageByHostDataGridView();
this.ColumnExpansion = new System.Windows.Forms.DataGridViewImageColumn();
@ -79,6 +78,7 @@
this.ColumnRequiredUpdate = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColumnInstalledUpdate = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewUpdates = new XenAdmin.Controls.DataGridViewEx.DataGridViewEx();
this.tableLayoutPanel6 = new System.Windows.Forms.TableLayoutPanel();
this.ColumnExpand = new System.Windows.Forms.DataGridViewImageColumn();
this.ColumnMessage = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColumnLocation = new System.Windows.Forms.DataGridViewTextBoxColumn();
@ -91,10 +91,11 @@
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.tableLayoutPanel4.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.spinner)).BeginInit();
this.tableLayouPanel5.SuspendLayout();
this.tableLayoutPanel5.SuspendLayout();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridViewHosts)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dataGridViewUpdates)).BeginInit();
this.tableLayoutPanel6.SuspendLayout();
this.SuspendLayout();
//
// tableLayoutPanel1
@ -140,11 +141,11 @@
this.toolStripDropDownButtonDateFilter,
this.toolStripSeparator3,
this.toolStripButtonRefresh,
this.toolStripSplitButtonDismiss,
this.toolStripButtonRestoreDismissed,
this.toolStripButtonUpdate,
this.toolStripSeparator1,
this.toolStripButtonExportAll,
this.toolStripSplitButtonDismiss,
this.toolStripButtonRestoreDismissed});
this.toolStripButtonExportAll});
this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.TabStop = true;
//
@ -160,7 +161,7 @@
//
// byUpdateToolStripMenuItem
//
this.byUpdateToolStripMenuItem.Image = global::XenAdmin.Properties.Resources.notif_updates_16;
this.byUpdateToolStripMenuItem.Image = global::XenAdmin.Properties.Resources._015_Download_h32bit_16;
resources.ApplyResources(this.byUpdateToolStripMenuItem, "byUpdateToolStripMenuItem");
this.byUpdateToolStripMenuItem.Name = "byUpdateToolStripMenuItem";
this.byUpdateToolStripMenuItem.Click += new System.EventHandler(this.byUpdateToolStripMenuItem_Click);
@ -205,26 +206,6 @@
this.toolStripButtonRefresh.Name = "toolStripButtonRefresh";
this.toolStripButtonRefresh.Click += new System.EventHandler(this.toolStripButtonRefresh_Click);
//
// toolStripButtonUpdate
//
this.toolStripButtonUpdate.AutoToolTip = false;
this.toolStripButtonUpdate.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
resources.ApplyResources(this.toolStripButtonUpdate, "toolStripButtonUpdate");
this.toolStripButtonUpdate.Name = "toolStripButtonUpdate";
this.toolStripButtonUpdate.Click += new System.EventHandler(this.toolStripButtonUpdate_Click);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
resources.ApplyResources(this.toolStripSeparator1, "toolStripSeparator1");
//
// toolStripButtonExportAll
//
this.toolStripButtonExportAll.AutoToolTip = false;
resources.ApplyResources(this.toolStripButtonExportAll, "toolStripButtonExportAll");
this.toolStripButtonExportAll.Name = "toolStripButtonExportAll";
this.toolStripButtonExportAll.Click += new System.EventHandler(this.toolStripButtonExportAll_Click);
//
// toolStripSplitButtonDismiss
//
this.toolStripSplitButtonDismiss.AutoToolTip = false;
@ -256,6 +237,26 @@
this.toolStripButtonRestoreDismissed.Name = "toolStripButtonRestoreDismissed";
this.toolStripButtonRestoreDismissed.Click += new System.EventHandler(this.toolStripButtonRestoreDismissed_Click);
//
// toolStripButtonUpdate
//
this.toolStripButtonUpdate.AutoToolTip = false;
this.toolStripButtonUpdate.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
resources.ApplyResources(this.toolStripButtonUpdate, "toolStripButtonUpdate");
this.toolStripButtonUpdate.Name = "toolStripButtonUpdate";
this.toolStripButtonUpdate.Click += new System.EventHandler(this.toolStripButtonUpdate_Click);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
resources.ApplyResources(this.toolStripSeparator1, "toolStripSeparator1");
//
// toolStripButtonExportAll
//
this.toolStripButtonExportAll.AutoToolTip = false;
resources.ApplyResources(this.toolStripButtonExportAll, "toolStripButtonExportAll");
this.toolStripButtonExportAll.Name = "toolStripButtonExportAll";
this.toolStripButtonExportAll.Click += new System.EventHandler(this.toolStripButtonExportAll_Click);
//
// AutoCheckForUpdatesDisabledLabel
//
resources.ApplyResources(this.AutoCheckForUpdatesDisabledLabel, "AutoCheckForUpdatesDisabledLabel");
@ -268,13 +269,6 @@
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.TabStop = false;
//
// checkForUpdatesNowLink
//
resources.ApplyResources(this.checkForUpdatesNowLink, "checkForUpdatesNowLink");
this.checkForUpdatesNowLink.Name = "checkForUpdatesNowLink";
this.checkForUpdatesNowLink.TabStop = true;
this.checkForUpdatesNowLink.Click += new System.EventHandler(this.checkForUpdatesNowLink_Click);
//
// button2
//
resources.ApplyResources(this.button2, "button2");
@ -307,18 +301,16 @@
this.spinner.Name = "spinner";
this.spinner.TabStop = false;
//
// tableLayouPanel5
// tableLayoutPanel5
//
resources.ApplyResources(this.tableLayouPanel5, "tableLayouPanel5");
this.tableLayouPanel5.Controls.Add(this.pictureBox1, 0, 0);
this.tableLayouPanel5.Controls.Add(this.checkForUpdatesNowLink, 2, 0);
this.tableLayouPanel5.Controls.Add(this.AutoCheckForUpdatesDisabledLabel, 1, 0);
this.tableLayouPanel5.Controls.Add(this.panel1, 0, 1);
this.tableLayouPanel5.Name = "tableLayouPanel5";
resources.ApplyResources(this.tableLayoutPanel5, "tableLayoutPanel5");
this.tableLayoutPanel5.Controls.Add(this.tableLayoutPanel1, 0, 2);
this.tableLayoutPanel5.Controls.Add(this.panel1, 0, 1);
this.tableLayoutPanel5.Controls.Add(this.tableLayoutPanel6, 0, 0);
this.tableLayoutPanel5.Name = "tableLayoutPanel5";
//
// panel1
//
this.tableLayouPanel5.SetColumnSpan(this.panel1, 3);
this.panel1.Controls.Add(this.dataGridViewHosts);
this.panel1.Controls.Add(this.dataGridViewUpdates);
resources.ApplyResources(this.panel1, "panel1");
@ -431,11 +423,17 @@
this.dataGridViewUpdates.ReadOnly = true;
this.dataGridViewUpdates.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewUpdates_CellClick);
this.dataGridViewUpdates.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewUpdates_CellDoubleClick);
this.dataGridViewUpdates.ColumnHeaderMouseClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dataGridViewUpdates_ColumnHeaderMouseClick);
this.dataGridViewUpdates.SelectionChanged += new System.EventHandler(this.dataGridViewUpdates_SelectionChanged);
this.dataGridViewUpdates.SortCompare += new System.Windows.Forms.DataGridViewSortCompareEventHandler(this.dataGridViewUpdates_SortCompare);
this.dataGridViewUpdates.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dataGridViewUpdates_KeyDown);
//
// tableLayoutPanel6
//
resources.ApplyResources(this.tableLayoutPanel6, "tableLayoutPanel6");
this.tableLayoutPanel6.Controls.Add(this.pictureBox1, 0, 0);
this.tableLayoutPanel6.Controls.Add(this.AutoCheckForUpdatesDisabledLabel, 1, 0);
this.tableLayoutPanel6.Name = "tableLayoutPanel6";
//
// ColumnExpand
//
this.ColumnExpand.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
@ -493,8 +491,7 @@
this.BackColor = System.Drawing.SystemColors.Window;
this.Controls.Add(this.tableLayoutPanel4);
this.Controls.Add(this.tableLayoutPanel2);
this.Controls.Add(this.tableLayouPanel5);
this.Controls.Add(this.tableLayoutPanel1);
this.Controls.Add(this.tableLayoutPanel5);
this.Name = "ManageUpdatesPage";
this.Resize += new System.EventHandler(this.ManageUpdatesPage_Resize);
this.tableLayoutPanel1.ResumeLayout(false);
@ -507,11 +504,13 @@
this.tableLayoutPanel4.ResumeLayout(false);
this.tableLayoutPanel4.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.spinner)).EndInit();
this.tableLayouPanel5.ResumeLayout(false);
this.tableLayouPanel5.PerformLayout();
this.tableLayoutPanel5.ResumeLayout(false);
this.tableLayoutPanel5.PerformLayout();
this.panel1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dataGridViewHosts)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dataGridViewUpdates)).EndInit();
this.tableLayoutPanel6.ResumeLayout(false);
this.tableLayoutPanel6.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
@ -531,23 +530,12 @@
private Controls.FilterLocationToolStripDropDownButton toolStripDropDownButtonServerFilter;
private Controls.FilterDatesToolStripDropDownButton toolStripDropDownButtonDateFilter;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator3;
private System.Windows.Forms.ToolStripButton toolStripButtonRefresh;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
private System.Windows.Forms.ToolStripButton toolStripButtonExportAll;
private System.Windows.Forms.ToolStripSplitButton toolStripSplitButtonDismiss;
private System.Windows.Forms.ToolStripMenuItem dismissAllToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem dismissSelectedToolStripMenuItem;
private System.Windows.Forms.ToolStripButton toolStripButtonRestoreDismissed;
private System.Windows.Forms.Label AutoCheckForUpdatesDisabledLabel;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.LinkLabel checkForUpdatesNowLink;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel4;
private System.Windows.Forms.DataGridViewImageColumn ColumnExpand;
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnMessage;
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnLocation;
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnDate;
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnWebPage;
private System.Windows.Forms.TableLayoutPanel tableLayouPanel5;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel5;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
private System.Windows.Forms.ToolStripDropDownButton toolStripDropDownButtonView;
private System.Windows.Forms.ToolStripMenuItem byUpdateToolStripMenuItem;
@ -564,5 +552,16 @@
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnInstalledUpdate;
private System.Windows.Forms.ToolStripButton toolStripButtonUpdate;
private Controls.SpinnerIcon spinner;
private System.Windows.Forms.ToolStripButton toolStripButtonRefresh;
private System.Windows.Forms.ToolStripSplitButton toolStripSplitButtonDismiss;
private System.Windows.Forms.ToolStripMenuItem dismissAllToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem dismissSelectedToolStripMenuItem;
private System.Windows.Forms.ToolStripButton toolStripButtonRestoreDismissed;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel6;
private System.Windows.Forms.DataGridViewImageColumn ColumnExpand;
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnMessage;
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnLocation;
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnDate;
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnWebPage;
}
}
}

View File

@ -41,6 +41,7 @@ using XenAdmin.Actions;
using XenAdmin.Alerts;
using XenAdmin.Controls;
using XenAdmin.Controls.DataGridViewEx;
using XenAdmin.Controls.MainWindowControls;
using XenAdmin.Core;
using XenAdmin.Dialogs;
using XenAdmin.Network;
@ -73,13 +74,18 @@ namespace XenAdmin.TabPages
tableLayoutPanel1.Visible = false;
toolStripSplitButtonDismiss.DefaultItem = dismissAllToolStripMenuItem;
toolStripSplitButtonDismiss.Text = dismissAllToolStripMenuItem.Text;
}
protected override void OnHandleCreated(EventArgs e)
{
base.OnHandleCreated(e);
try
{
//ensure we won't try to rebuild the list while setting the initial view
checksQueue++;
byHostToolStripMenuItem.Checked = false;
byUpdateToolStripMenuItem.Checked = true;
byHostToolStripMenuItem.Checked = Properties.Settings.Default.ShowUpdatesByServer;
byUpdateToolStripMenuItem.Checked = !Properties.Settings.Default.ShowUpdatesByServer;
ToggleView();
}
finally
@ -94,8 +100,7 @@ namespace XenAdmin.TabPages
protected override void RefreshPage()
{
toolStripDropDownButtonServerFilter.InitializeHostList();
toolStripDropDownButtonServerFilter.BuildFilterList();
toolStripDropDownButtonServerFilter.InitializeHostList(c => !Helpers.CloudOrGreater(c));
Rebuild();
}
@ -117,6 +122,8 @@ namespace XenAdmin.TabPages
public override string HelpID => "ManageUpdatesDialog";
public override NotificationsSubMode NotificationsSubMode => NotificationsSubMode.Updates;
#endregion
private void UpdatesCollectionChanged(CollectionChangeEventArgs e)
@ -165,7 +172,6 @@ namespace XenAdmin.TabPages
dataGridViewHosts.Rows.Clear();
dataGridViewHosts.Refresh();
checkForUpdatesNowLink.Enabled = false;
labelProgress.Text = Messages.AVAILABLE_UPDATES_SEARCHING;
spinner.StartSpinning();
tableLayoutPanel4.Visible = true;
@ -178,7 +184,6 @@ namespace XenAdmin.TabPages
checksQueue--;
toolStripButtonRefresh.Enabled = true;
toolStripButtonRestoreDismissed.Enabled = true;
checkForUpdatesNowLink.Enabled = true;
//to avoid flickering, make first the panel invisible and then stop the spinner, because
//it may be a few fractions of the second until the panel reappears if no updates are found
@ -314,7 +319,8 @@ namespace XenAdmin.TabPages
ToggleCentralWarningVisibility();
List<IXenConnection> xenConnections = ConnectionsManager.XenConnectionsCopy;
var xenConnections = ConnectionsManager.XenConnectionsCopy
.Where(c => c.IsConnected && !Helpers.CloudOrGreater(c)).ToList();
xenConnections.Sort();
var rowList = new List<DataGridViewRow>();
@ -457,6 +463,7 @@ namespace XenAdmin.TabPages
{
//store the view
Properties.Settings.Default.ShowUpdatesByServer = byHostToolStripMenuItem.Checked;
Settings.TrySaveSettings();
// buttons
toolStripDropDownButtonDateFilter.Visible = byUpdateToolStripMenuItem.Checked;
@ -467,7 +474,7 @@ namespace XenAdmin.TabPages
dataGridViewUpdates.Visible = byUpdateToolStripMenuItem.Checked;
dataGridViewHosts.Visible = byHostToolStripMenuItem.Checked;
// Turn off Date Filter for the updates-by-server view
// Turn off other filters for the updates-by-server view
if (byHostToolStripMenuItem.Checked)
toolStripDropDownButtonDateFilter.ResetFilterDates();
@ -483,9 +490,7 @@ namespace XenAdmin.TabPages
bool visible = !Properties.Settings.Default.AllowPatchesUpdates ||
!Properties.Settings.Default.AllowXenServerUpdates;
pictureBox1.Visible = visible;
AutoCheckForUpdatesDisabledLabel.Visible = visible;
checkForUpdatesNowLink.Visible = visible;
tableLayoutPanel6.Visible = visible;
}
private void ToggleCentralWarningVisibility()
@ -535,11 +540,12 @@ namespace XenAdmin.TabPages
if (alert is XenServerUpdateAlert serverUpdate)
hosts = serverUpdate.DistinctHosts.Select(h => h.uuid).ToList();
bool hide = false;
bool hide = false;
Program.Invoke(Program.MainWindow, () =>
hide = toolStripDropDownButtonDateFilter.HideByDate(alert.Timestamp.ToLocalTime())
|| toolStripDropDownButtonServerFilter.HideByLocation(hosts) || alert.IsDismissed());
hide = toolStripDropDownButtonDateFilter.HideByDate(alert.Timestamp.ToLocalTime()) ||
toolStripDropDownButtonServerFilter.HideByLocation(hosts) ||
alert.IsDismissed());
return hide;
}
@ -575,6 +581,8 @@ namespace XenAdmin.TabPages
private void UpdateButtonEnablement()
{
var connectionList = ConnectionsManager.XenConnectionsCopy.Where(c => !Helpers.CloudOrGreater(c)).ToList();
if (byUpdateToolStripMenuItem.Checked)
{
var allAlerts = Updates.UpdateAlerts;
@ -603,7 +611,6 @@ namespace XenAdmin.TabPages
}
else
{
var connectionList = ConnectionsManager.XenConnectionsCopy;
toolStripButtonExportAll.Enabled = connectionList.Any(c => c.IsConnected);
}
}
@ -635,6 +642,7 @@ namespace XenAdmin.TabPages
appliesCell.Value = alert.AppliesTo;
dateCell.Value = HelpersGUI.DateTimeToString(alert.Timestamp.ToLocalTime(), Messages.DATEFORMAT_DMY, true);
newRow.Cells.AddRange(expanderCell, detailCell, appliesCell, dateCell, actionCell);
return newRow;
@ -653,13 +661,6 @@ namespace XenAdmin.TabPages
{
var items = new List<ToolStripItem>();
if (alert.AllowedToDismiss())
{
var dismiss = new ToolStripMenuItem(Messages.ALERT_DISMISS);
dismiss.Click += ToolStripMenuItemDismiss_Click;
items.Add(dismiss);
}
if (alert is XenServerPatchAlert patchAlert && patchAlert.CanApply &&
!string.IsNullOrEmpty(patchAlert.Patch.PatchUrl) && patchAlert.RequiredClientVersion == null)
{
@ -682,6 +683,13 @@ namespace XenAdmin.TabPages
items.Add(download);
}
if (alert.AllowedToDismiss())
{
var dismiss = new ToolStripMenuItem(Messages.ALERT_DISMISS);
dismiss.Click += ToolStripMenuItemDismiss_Click;
items.Add(dismiss);
}
if (!string.IsNullOrEmpty(alert.WebPageLabel))
{
var fix = new ToolStripMenuItem(alert.FixLinkText) {ToolTipText = alert.WebPageLabel};
@ -970,12 +978,6 @@ namespace XenAdmin.TabPages
UpdateButtonEnablement();
}
private void dataGridViewUpdates_ColumnHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
{
if (dataGridViewUpdates.Columns[e.ColumnIndex].SortMode == DataGridViewColumnSortMode.Automatic)
Rebuild();
}
/// <summary>
/// Handles the automatic sorting of the AlertsGridView for the non-string columns
/// </summary>
@ -986,8 +988,7 @@ namespace XenAdmin.TabPages
if (e.Column.Index == ColumnDate.Index)
{
int sortResult = DateTime.Compare(alert1.Timestamp, alert2.Timestamp);
e.SortResult = (dataGridViewUpdates.SortOrder == SortOrder.Descending) ? sortResult *= -1 : sortResult;
e.SortResult = DateTime.Compare(alert1.Timestamp, alert2.Timestamp);
e.Handled = true;
}
}
@ -1186,7 +1187,7 @@ namespace XenAdmin.TabPages
if (exportAll)
{
List<IXenConnection> xenConnections = ConnectionsManager.XenConnectionsCopy;
var xenConnections = ConnectionsManager.XenConnectionsCopy.Where(c => !Helpers.CloudOrGreater(c)).ToList();
xenConnections.Sort();
foreach (IXenConnection xenConnection in xenConnections)
@ -1241,7 +1242,7 @@ namespace XenAdmin.TabPages
{
try
{
Process.Start(InvisibleMessages.UPSELL_SA);
Process.Start(InvisibleMessages.LICENSE_BUY_URL);
}
catch (Exception)
{
@ -1252,11 +1253,6 @@ namespace XenAdmin.TabPages
}
}
private void checkForUpdatesNowLink_Click(object sender, EventArgs e)
{
Updates.CheckForServerUpdates(userRequested: true);
}
private void ManageUpdatesPage_Resize(object sender, EventArgs e)
{
tableLayoutPanel4.Location = new Point((Width - tableLayoutPanel4.Width) / 2, tableLayoutPanel4.Location.Y);

View File

@ -202,7 +202,10 @@
<value>Segoe UI, 9pt</value>
</data>
<data name="tableLayoutPanel1.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 388</value>
<value>0, 348</value>
</data>
<data name="tableLayoutPanel1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 6, 0, 0</value>
</data>
<data name="tableLayoutPanel1.RowCount" type="System.Int32, mscorlib">
<value>1</value>
@ -220,10 +223,10 @@
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Parent" xml:space="preserve">
<value>$this</value>
<value>tableLayoutPanel5</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.ZOrder" xml:space="preserve">
<value>3</value>
<value>0</value>
</data>
<data name="tableLayoutPanel1.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="informationLabelIcon" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="informationLabel" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,Percent,100" /&gt;&lt;Rows Styles="Percent,100,Absolute,22" /&gt;&lt;/TableLayoutSettings&gt;</value>
@ -333,45 +336,6 @@
<data name="toolStripButtonRefresh.Text" xml:space="preserve">
<value>&amp;Check for Updates</value>
</data>
<data name="toolStripButtonUpdate.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
</value>
</data>
<data name="toolStripButtonUpdate.ImageTransparentColor" type="System.Drawing.Color, System.Drawing">
<value>Magenta</value>
</data>
<data name="toolStripButtonUpdate.Size" type="System.Drawing.Size, System.Drawing">
<value>97, 22</value>
</data>
<data name="toolStripButtonUpdate.Text" xml:space="preserve">
<value>I&amp;nstall Updates...</value>
</data>
<data name="toolStripSeparator1.Size" type="System.Drawing.Size, System.Drawing">
<value>6, 25</value>
</data>
<data name="toolStripButtonExportAll.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 9pt</value>
</data>
<data name="toolStripButtonExportAll.ImageTransparentColor" type="System.Drawing.Color, System.Drawing">
<value>Magenta</value>
</data>
<data name="toolStripButtonExportAll.Size" type="System.Drawing.Size, System.Drawing">
<value>45, 22</value>
</data>
<data name="toolStripButtonExportAll.Text" xml:space="preserve">
<value>E&amp;xport</value>
</data>
<data name="dismissAllToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>161, 22</value>
</data>
@ -427,10 +391,49 @@
<value>Magenta</value>
</data>
<data name="toolStripButtonRestoreDismissed.Size" type="System.Drawing.Size, System.Drawing">
<value>152, 22</value>
<value>106, 22</value>
</data>
<data name="toolStripButtonRestoreDismissed.Text" xml:space="preserve">
<value>Restore Dismissed &amp;Updates</value>
<value>&amp;Restore Dismissed</value>
</data>
<data name="toolStripButtonUpdate.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
</value>
</data>
<data name="toolStripButtonUpdate.ImageTransparentColor" type="System.Drawing.Color, System.Drawing">
<value>Magenta</value>
</data>
<data name="toolStripButtonUpdate.Size" type="System.Drawing.Size, System.Drawing">
<value>97, 22</value>
</data>
<data name="toolStripButtonUpdate.Text" xml:space="preserve">
<value>I&amp;nstall Updates...</value>
</data>
<data name="toolStripSeparator1.Size" type="System.Drawing.Size, System.Drawing">
<value>6, 25</value>
</data>
<data name="toolStripButtonExportAll.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 9pt</value>
</data>
<data name="toolStripButtonExportAll.ImageTransparentColor" type="System.Drawing.Color, System.Drawing">
<value>Magenta</value>
</data>
<data name="toolStripButtonExportAll.Size" type="System.Drawing.Size, System.Drawing">
<value>62, 22</value>
</data>
<data name="toolStripButtonExportAll.Text" xml:space="preserve">
<value>E&amp;xport All</value>
</data>
<data name="toolStrip1.Location" type="System.Drawing.Point, System.Drawing">
<value>1, 1</value>
@ -439,7 +442,7 @@
<value>1, 1, 1, 1</value>
</data>
<data name="toolStrip1.Size" type="System.Drawing.Size, System.Drawing">
<value>814, 25</value>
<value>822, 25</value>
</data>
<data name="toolStrip1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
@ -466,7 +469,7 @@
<value>Segoe UI, 9pt</value>
</data>
<data name="tableLayoutPanel2.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 12</value>
<value>8, 8</value>
</data>
<data name="tableLayoutPanel2.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 0</value>
@ -475,7 +478,7 @@
<value>1</value>
</data>
<data name="tableLayoutPanel2.Size" type="System.Drawing.Size, System.Drawing">
<value>816, 27</value>
<value>824, 27</value>
</data>
<data name="tableLayoutPanel2.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
@ -495,6 +498,9 @@
<data name="tableLayoutPanel2.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="toolStrip1" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Percent,100" /&gt;&lt;Rows Styles="Absolute,27,Absolute,27" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="AutoCheckForUpdatesDisabledLabel.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Left</value>
</data>
<data name="AutoCheckForUpdatesDisabledLabel.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
@ -507,9 +513,6 @@
<data name="AutoCheckForUpdatesDisabledLabel.Location" type="System.Drawing.Point, System.Drawing">
<value>25, 3</value>
</data>
<data name="AutoCheckForUpdatesDisabledLabel.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 6</value>
</data>
<data name="AutoCheckForUpdatesDisabledLabel.Size" type="System.Drawing.Size, System.Drawing">
<value>413, 15</value>
</data>
@ -526,10 +529,10 @@
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;AutoCheckForUpdatesDisabledLabel.Parent" xml:space="preserve">
<value>tableLayouPanel5</value>
<value>tableLayoutPanel6</value>
</data>
<data name="&gt;&gt;AutoCheckForUpdatesDisabledLabel.ZOrder" xml:space="preserve">
<value>2</value>
<value>1</value>
</data>
<data name="pictureBox1.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 9pt</value>
@ -540,9 +543,6 @@
<data name="pictureBox1.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 3</value>
</data>
<data name="pictureBox1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 6</value>
</data>
<data name="pictureBox1.Size" type="System.Drawing.Size, System.Drawing">
<value>16, 16</value>
</data>
@ -556,44 +556,11 @@
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;pictureBox1.Parent" xml:space="preserve">
<value>tableLayouPanel5</value>
<value>tableLayoutPanel6</value>
</data>
<data name="&gt;&gt;pictureBox1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="checkForUpdatesNowLink.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="checkForUpdatesNowLink.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="checkForUpdatesNowLink.Location" type="System.Drawing.Point, System.Drawing">
<value>444, 3</value>
</data>
<data name="checkForUpdatesNowLink.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 6</value>
</data>
<data name="checkForUpdatesNowLink.Size" type="System.Drawing.Size, System.Drawing">
<value>189, 15</value>
</data>
<data name="checkForUpdatesNowLink.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="checkForUpdatesNowLink.Text" xml:space="preserve">
<value>&amp;Check for all types of updates now</value>
</data>
<data name="&gt;&gt;checkForUpdatesNowLink.Name" xml:space="preserve">
<value>checkForUpdatesNowLink</value>
</data>
<data name="&gt;&gt;checkForUpdatesNowLink.Type" xml:space="preserve">
<value>System.Windows.Forms.LinkLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;checkForUpdatesNowLink.Parent" xml:space="preserve">
<value>tableLayouPanel5</value>
</data>
<data name="&gt;&gt;checkForUpdatesNowLink.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="button2.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
@ -712,7 +679,7 @@
<value>1</value>
</data>
<data name="tableLayoutPanel4.Location" type="System.Drawing.Point, System.Drawing">
<value>320, 160</value>
<value>320, 156</value>
</data>
<data name="tableLayoutPanel4.RowCount" type="System.Int32, mscorlib">
<value>1</value>
@ -738,11 +705,11 @@
<data name="tableLayoutPanel4.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="labelProgress" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="spinner" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,AutoSize,0" /&gt;&lt;Rows Styles="AutoSize,0" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="tableLayouPanel5.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<data name="tableLayoutPanel5.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Bottom, Left, Right</value>
</data>
<data name="tableLayouPanel5.ColumnCount" type="System.Int32, mscorlib">
<value>3</value>
<data name="tableLayoutPanel5.ColumnCount" type="System.Int32, mscorlib">
<value>1</value>
</data>
<metadata name="ColumnExpansion.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
@ -844,7 +811,7 @@
<value>1, 1, 1, 1</value>
</data>
<data name="dataGridViewHosts.Size" type="System.Drawing.Size, System.Drawing">
<value>816, 297</value>
<value>824, 317</value>
</data>
<data name="dataGridViewHosts.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
@ -928,7 +895,7 @@
<value>1, 1, 1, 1</value>
</data>
<data name="dataGridViewUpdates.Size" type="System.Drawing.Size, System.Drawing">
<value>816, 297</value>
<value>824, 317</value>
</data>
<data name="dataGridViewUpdates.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
@ -955,10 +922,10 @@
<value>0, 0, 0, 0</value>
</data>
<data name="panel1.Size" type="System.Drawing.Size, System.Drawing">
<value>816, 297</value>
<value>824, 317</value>
</data>
<data name="panel1.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
<value>1</value>
</data>
<data name="&gt;&gt;panel1.Name" xml:space="preserve">
<value>panel1</value>
@ -967,40 +934,79 @@
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;panel1.Parent" xml:space="preserve">
<value>tableLayouPanel5</value>
<value>tableLayoutPanel5</value>
</data>
<data name="&gt;&gt;panel1.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="tableLayouPanel5.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 51</value>
</data>
<data name="tableLayouPanel5.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 6, 0, 12</value>
</data>
<data name="tableLayouPanel5.RowCount" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="tableLayouPanel5.Size" type="System.Drawing.Size, System.Drawing">
<value>816, 322</value>
<data name="tableLayoutPanel6.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="tableLayouPanel5.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
<data name="tableLayoutPanel6.AutoSizeMode" type="System.Windows.Forms.AutoSizeMode, System.Windows.Forms">
<value>GrowAndShrink</value>
</data>
<data name="&gt;&gt;tableLayouPanel5.Name" xml:space="preserve">
<value>tableLayouPanel5</value>
</data>
<data name="&gt;&gt;tableLayouPanel5.Type" xml:space="preserve">
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tableLayouPanel5.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;tableLayouPanel5.ZOrder" xml:space="preserve">
<data name="tableLayoutPanel6.ColumnCount" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="tableLayouPanel5.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="pictureBox1" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="checkForUpdatesNowLink" Row="0" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="AutoCheckForUpdatesDisabledLabel" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="panel1" Row="1" RowSpan="1" Column="0" ColumnSpan="3" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,AutoSize,0,Percent,100" /&gt;&lt;Rows Styles="AutoSize,0,Percent,50,Percent,50" /&gt;&lt;/TableLayoutSettings&gt;</value>
<data name="tableLayoutPanel6.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="tableLayoutPanel6.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 3</value>
</data>
<data name="tableLayoutPanel6.RowCount" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="tableLayoutPanel6.Size" type="System.Drawing.Size, System.Drawing">
<value>441, 22</value>
</data>
<data name="tableLayoutPanel6.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="&gt;&gt;tableLayoutPanel6.Name" xml:space="preserve">
<value>tableLayoutPanel6</value>
</data>
<data name="&gt;&gt;tableLayoutPanel6.Type" xml:space="preserve">
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tableLayoutPanel6.Parent" xml:space="preserve">
<value>tableLayoutPanel5</value>
</data>
<data name="&gt;&gt;tableLayoutPanel6.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="tableLayoutPanel6.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="pictureBox1" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="AutoCheckForUpdatesDisabledLabel" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,AutoSize,0" /&gt;&lt;Rows Styles="AutoSize,0" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="tableLayoutPanel5.Location" type="System.Drawing.Point, System.Drawing">
<value>8, 47</value>
</data>
<data name="tableLayoutPanel5.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 12, 0, 0</value>
</data>
<data name="tableLayoutPanel5.RowCount" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="tableLayoutPanel5.Size" type="System.Drawing.Size, System.Drawing">
<value>824, 370</value>
</data>
<data name="tableLayoutPanel5.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="&gt;&gt;tableLayoutPanel5.Name" xml:space="preserve">
<value>tableLayoutPanel5</value>
</data>
<data name="&gt;&gt;tableLayoutPanel5.Type" xml:space="preserve">
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tableLayoutPanel5.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;tableLayoutPanel5.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="tableLayoutPanel5.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="tableLayoutPanel1" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="panel1" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="tableLayoutPanel6" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Percent,100" /&gt;&lt;Rows Styles="AutoSize,0,Percent,100,AutoSize,0,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>
@ -1015,7 +1021,7 @@
<value>Segoe UI, 9pt</value>
</data>
<data name="$this.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>12, 12, 12, 12</value>
<value>8, 8, 8, 8</value>
</data>
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
<value>840, 425</value>
@ -1068,24 +1074,6 @@
<data name="&gt;&gt;toolStripButtonRefresh.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;toolStripButtonUpdate.Name" xml:space="preserve">
<value>toolStripButtonUpdate</value>
</data>
<data name="&gt;&gt;toolStripButtonUpdate.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;toolStripSeparator1.Name" xml:space="preserve">
<value>toolStripSeparator1</value>
</data>
<data name="&gt;&gt;toolStripSeparator1.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;toolStripButtonExportAll.Name" xml:space="preserve">
<value>toolStripButtonExportAll</value>
</data>
<data name="&gt;&gt;toolStripButtonExportAll.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;toolStripSplitButtonDismiss.Name" xml:space="preserve">
<value>toolStripSplitButtonDismiss</value>
</data>
@ -1110,6 +1098,24 @@
<data name="&gt;&gt;toolStripButtonRestoreDismissed.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;toolStripButtonUpdate.Name" xml:space="preserve">
<value>toolStripButtonUpdate</value>
</data>
<data name="&gt;&gt;toolStripButtonUpdate.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;toolStripSeparator1.Name" xml:space="preserve">
<value>toolStripSeparator1</value>
</data>
<data name="&gt;&gt;toolStripSeparator1.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;toolStripButtonExportAll.Name" xml:space="preserve">
<value>toolStripButtonExportAll</value>
</data>
<data name="&gt;&gt;toolStripButtonExportAll.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;ColumnExpansion.Name" xml:space="preserve">
<value>ColumnExpansion</value>
</data>

View File

@ -31,6 +31,7 @@
using System;
using System.Windows.Forms;
using XenAdmin.Controls.MainWindowControls;
using XenAdmin.Help;
namespace XenAdmin.TabPages
@ -66,7 +67,7 @@ namespace XenAdmin.TabPages
DeregisterEventHandlers();
}
public virtual NotificationsSubMode NotificationsSubMode { get; }
public virtual string HelpID => "";

View File

@ -84,7 +84,7 @@ namespace XenAdmin.TabPages
InitializeComponent();
base.Text = Messages.WORKLOAD_BALANCING;
pdSectionConfiguration.fixFirstColumnWidth(200);
pdSectionConfiguration.FixFirstColumnWidth(200);
RefreshControls();
}

View File

@ -107,7 +107,9 @@
<Compile Include="Alerts\Types\FailedLoginAttemptAlert.cs" />
<Compile Include="Alerts\Types\CertificateAlert.cs" />
<Compile Include="Alerts\Types\AlarmMessageAlert.cs" />
<Compile Include="Alerts\Types\OutOfSyncWithCdnAlert.cs" />
<Compile Include="Alerts\Types\HotfixEligibilityAlert.cs" />
<Compile Include="Alerts\Types\LeafCoalesceAlert.cs" />
<Compile Include="Alerts\Types\PolicyAlert.cs" />
<Compile Include="Alerts\Types\XenServerUpdateAlert.cs" />
<Compile Include="Alerts\Types\DuplicateIqnAlert.cs" />
@ -545,6 +547,9 @@
<Compile Include="TabPages\BaseTabPage.Designer.cs">
<DependentUpon>BaseTabPage.cs</DependentUpon>
</Compile>
<Compile Include="TabPages\CdnUpdates\CdnExpandableRow.cs" />
<Compile Include="TabPages\CdnUpdates\CdnExtensions.cs" />
<Compile Include="TabPages\CdnUpdates\CdnExpandableTextAndImageCell.cs" />
<Compile Include="TabPages\DockerDetailsPage.cs">
<SubType>UserControl</SubType>
</Compile>
@ -557,6 +562,12 @@
<Compile Include="TabPages\HomePage.Designer.cs">
<DependentUpon>HomePage.cs</DependentUpon>
</Compile>
<Compile Include="TabPages\ManageCdnUpdatesPage.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="TabPages\ManageCdnUpdatesPage.Designer.cs">
<DependentUpon>ManageCdnUpdatesPage.cs</DependentUpon>
</Compile>
<Compile Include="TabPages\NotificationsBasePage.cs">
<SubType>UserControl</SubType>
</Compile>
@ -2289,6 +2300,15 @@
<EmbeddedResource Include="TabPages\HomePage.zh-CN.resx">
<DependentUpon>HomePage.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="TabPages\ManageCdnUpdatesPage.ja.resx">
<DependentUpon>ManageCdnUpdatesPage.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="TabPages\ManageCdnUpdatesPage.resx">
<DependentUpon>ManageCdnUpdatesPage.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="TabPages\ManageCdnUpdatesPage.zh-CN.resx">
<DependentUpon>ManageCdnUpdatesPage.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="TabPages\PvsPage.ja.resx">
<DependentUpon>PvsPage.cs</DependentUpon>
<SubType>Designer</SubType>
@ -4483,6 +4503,7 @@
<Content Include="Images\000_Sites_h32bit_16.png" />
<None Include="Images\000_TCP-IPGroup_h32bit_16.png" />
<None Include="Images\015_Download_h32bit_16.png" />
<None Include="Images\000_Tick_yellow_h32bit_16.png" />
<Content Include="Images\000_UserAndGroup_h32bit_16.png" />
<Content Include="Images\000_User_h32bit_32.png" />
<Content Include="Images\asterisk.png" />
@ -4548,6 +4569,7 @@
<None Include="Images\server_up_16.png" />
<None Include="Images\saved_searches_24.png" />
<None Include="Images\RunningDC_16.png" />
<None Include="Images\rightArrowLong_Blue_16.png" />
<Content Include="Images\save_to_disk.png" />
<Content Include="Images\scilinux_16x.png" />
<None Include="Images\server_32.png" />
@ -6780,4 +6802,4 @@
<PropertyGroup>
<PostBuildEvent>copy "$(ProjectDir)\ReportViewer\resource_report.rdlc" "$(TargetDir)"</PostBuildEvent>
</PropertyGroup>
</Project>
</Project>

View File

@ -113,6 +113,16 @@ namespace XenAdmin.Core
[JsonProperty("livepatches")]
public CdnLivePatch[] LivePatches { get; set; }
public override bool Equals(object other)
{
return other is CdnUpdate update && Id == update.Id;
}
public override int GetHashCode()
{
return Id.GetHashCode();
}
}
[Serializable]
@ -143,7 +153,8 @@ namespace XenAdmin.Core
Bugfix,
Improvement,
NewFeature,
PreviewFeature
PreviewFeature,
Foundational
}
[Serializable]

View File

@ -41,8 +41,9 @@ namespace XenAdmin.Actions
public class CheckForCdnUpdatesAction : AsyncAction
{
public CheckForCdnUpdatesAction(IXenConnection connection)
: base(connection, "Checking for updates from CDN")
: base(connection, string.Empty)
{
Title = Description = Messages.YUM_REPO_ACTION_CHECK_FOR_UPDATES;
ApiMethodsToRoleCheck.Add("http/updates");
}

View File

@ -37,6 +37,7 @@ using System.Linq;
using System.Net.NetworkInformation;
using XenCenterLib.Archive;
using XenAdmin.Actions.Updates;
using XenAdmin.Core;
namespace XenAdmin.Actions
{
@ -214,22 +215,48 @@ namespace XenAdmin.Actions
Description = Messages.COMPLETED;
}
private static bool IsFileServiceUri(Uri uri)
{
var updateUriPrefix = new Uri(InvisibleMessages.UPDATE_URL_PREFIX);
if (uri.Host == updateUriPrefix.Host)
return true;
var customUpdateUriPrefix = XenAdminConfigManager.Provider.GetCustomFileServicePrefix();
if (!string.IsNullOrEmpty(customUpdateUriPrefix))
{
var customUpdateUri = new Uri(customUpdateUriPrefix);
if (uri.Host == customUpdateUri.Host)
return true;
}
return false;
}
private void DownloadFile(out string outputFileName)
{
outputFileName = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
log.InfoFormat("Downloading update '{0}' (from '{1}') to '{2}'", UpdateName, _updateUri, outputFileName);
Description = string.Format(Messages.DOWNLOAD_AND_EXTRACT_ACTION_DOWNLOADING_DESC, UpdateName);
LogDescriptionChanges = false;
_client = new WebClient();
_client.DownloadProgressChanged += client_DownloadProgressChanged;
_client.DownloadFileCompleted += client_DownloadFileCompleted;
NetworkChange.NetworkAvailabilityChanged += NetworkAvailabilityChanged;
var credential = TokenManager.GetDownloadCredential(XenAdminConfigManager.Provider);
_client.Headers.Add("Authorization", $"Basic {credential}");
//useful when the updates use test locations
if (IsFileServiceUri(_updateUri))
{
log.InfoFormat("Authenticating account...");
Description = string.Format(Messages.DOWNLOAD_AND_EXTRACT_ACTION_AUTHENTICATING_DESC,
BrandManager.CompanyNameLegacy);
var credential = TokenManager.GetDownloadCredential(XenAdminConfigManager.Provider);
_client.Headers.Add("Authorization", $"Basic {credential}");
}
log.InfoFormat("Downloading update '{0}' (from '{1}') to '{2}'", UpdateName, _updateUri, outputFileName);
Description = string.Format(Messages.DOWNLOAD_AND_EXTRACT_ACTION_DOWNLOADING_DESC, UpdateName);
LogDescriptionChanges = false;
int errorCount = 0;
bool needToRetry = false;

View File

@ -192,7 +192,7 @@ namespace XenAdmin.Alerts
public string uuid;
protected int _priority;
public Alert()
protected Alert()
{
uuid = Guid.NewGuid().ToString();
}

View File

@ -1050,6 +1050,15 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to {0} Trial Edition.
/// </summary>
public static string Label_host_edition_trial {
get {
return ResourceManager.GetString("Label-host.edition-trial", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to {0} for Citrix Virtual Desktops.
/// </summary>

View File

@ -447,6 +447,9 @@
<data name="Label-host.edition-standard-per-socket" xml:space="preserve">
<value>{0} Standard Per-Socket</value>
</data>
<data name="Label-host.edition-trial" xml:space="preserve">
<value>{0} Trial Edition</value>
</data>
<data name="Label-host.edition-xendesktop" xml:space="preserve">
<value>{0} for Citrix Virtual Desktops</value>
</data>

View File

@ -133,11 +133,11 @@ namespace XenAdmin {
}
/// <summary>
/// Looks up a localized string similar to https://store.citrix.com/dr_product/citrix-hypervisor-subscription.
/// Looks up a localized string similar to https://xenserver.com/buy.
/// </summary>
public static string LICENSE_EXPIRY_WEBPAGE {
public static string LICENSE_BUY_URL {
get {
return ResourceManager.GetString("LICENSE_EXPIRY_WEBPAGE", resourceCulture);
return ResourceManager.GetString("LICENSE_BUY_URL", resourceCulture);
}
}
@ -213,6 +213,15 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to https://fileservice.citrix.com/direct/v2/download/.
/// </summary>
public static string UPDATE_URL_PREFIX {
get {
return ResourceManager.GetString("UPDATE_URL_PREFIX", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to https://www.citrix.com/products/citrix-hypervisor/get-started.html.
/// </summary>
@ -221,14 +230,5 @@ namespace XenAdmin {
return ResourceManager.GetString("UPSELL_LEARNMOREURL_TRIAL", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to https://store.citrix.com/dr_product/citrix-hypervisor-subscription.
/// </summary>
public static string UPSELL_SA {
get {
return ResourceManager.GetString("UPSELL_SA", resourceCulture);
}
}
}
}

View File

@ -129,12 +129,6 @@
<data name="HOMEPAGE" xml:space="preserve">
<value>https://www.citrix.com/ja-jp/products/citrix-hypervisor</value>
</data>
<data name="ISL_DEPRECATION_URL" xml:space="preserve">
<value>http://support.citrix.com/article/CTX141433</value>
</data>
<data name="LICENSE_EXPIRY_WEBPAGE" xml:space="preserve">
<value>https://store.citrix.com/dr_product/citrix-hypervisor-subscription</value>
</data>
<data name="LICENSE_SERVER_DOWNLOAD_LINK" xml:space="preserve">
<value>http://www.citrix.com/downloads/licensing/license-server</value>
</data>
@ -156,7 +150,4 @@
<data name="UPSELL_LEARNMOREURL_TRIAL" xml:space="preserve">
<value>https://www.citrix.com/products/citrix-hypervisor/get-started.html</value>
</data>
<data name="UPSELL_SA" xml:space="preserve">
<value>https://store.citrix.com/dr_product/citrix-hypervisor-subscription</value>
</data>
</root>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
@ -141,8 +141,8 @@
<data name="HOMEPAGE" xml:space="preserve">
<value>https://www.citrix.com/products/citrix-hypervisor</value>
</data>
<data name="LICENSE_EXPIRY_WEBPAGE" xml:space="preserve">
<value>https://store.citrix.com/dr_product/citrix-hypervisor-subscription</value>
<data name="LICENSE_BUY_URL" xml:space="preserve">
<value>https://xenserver.com/buy</value>
</data>
<data name="LICENSE_SERVER_DOWNLOAD_LINK" xml:space="preserve">
<value>http://www.citrix.com/downloads/licensing/license-server</value>
@ -168,10 +168,10 @@
<data name="TOKEN_API_URL" xml:space="preserve">
<value>https://fileservice.citrix.com/api/session/token</value>
</data>
<data name="UPDATE_URL_PREFIX" xml:space="preserve">
<value>https://fileservice.citrix.com/direct/v2/download/</value>
</data>
<data name="UPSELL_LEARNMOREURL_TRIAL" xml:space="preserve">
<value>https://www.citrix.com/products/citrix-hypervisor/get-started.html</value>
</data>
<data name="UPSELL_SA" xml:space="preserve">
<value>https://store.citrix.com/dr_product/citrix-hypervisor-subscription</value>
</data>
</root>
</root>

View File

@ -129,12 +129,6 @@
<data name="HOMEPAGE" xml:space="preserve">
<value>https://www.citrix.com.cn/products/citrix-hypervisor/</value>
</data>
<data name="ISL_DEPRECATION_URL" xml:space="preserve">
<value>http://support.citrix.com/article/CTX141433</value>
</data>
<data name="LICENSE_EXPIRY_WEBPAGE" xml:space="preserve">
<value>https://store.citrix.com/dr_product/citrix-hypervisor-subscription</value>
</data>
<data name="LICENSE_SERVER_DOWNLOAD_LINK" xml:space="preserve">
<value>http://www.citrix.com/downloads/licensing/license-server</value>
</data>
@ -156,7 +150,4 @@
<data name="UPSELL_LEARNMOREURL_TRIAL" xml:space="preserve">
<value>https://www.citrix.com/products/citrix-hypervisor/get-started.html</value>
</data>
<data name="UPSELL_SA" xml:space="preserve">
<value>https://store.citrix.com/dr_product/citrix-hypervisor-subscription</value>
</data>
</root>

View File

@ -4984,6 +4984,42 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to You have not synchronized with the update channel in {0} days..
/// </summary>
public static string ALERT_CDN_OUT_OF_SYNC_TITLE {
get {
return ResourceManager.GetString("ALERT_CDN_OUT_OF_SYNC_TITLE", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Configure Updates.
/// </summary>
public static string ALERT_CDN_REPO_NOT_CONFIGURED_ACTION_LINK {
get {
return ResourceManager.GetString("ALERT_CDN_REPO_NOT_CONFIGURED_ACTION_LINK", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Configuring an update channel will allow your system to synchronize and retrieve available updates..
/// </summary>
public static string ALERT_CDN_REPO_NOT_CONFIGURED_DESCRIPTION {
get {
return ResourceManager.GetString("ALERT_CDN_REPO_NOT_CONFIGURED_DESCRIPTION", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to You have not configured an update channel on &apos;{0}&apos;.
/// </summary>
public static string ALERT_CDN_REPO_NOT_CONFIGURED_TITLE {
get {
return ResourceManager.GetString("ALERT_CDN_REPO_NOT_CONFIGURED_TITLE", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to When CPU usage exceeds {0}% for {1} min(s).
/// </summary>
@ -7235,6 +7271,42 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to Migrate VMs off this server.
/// </summary>
public static string CDN_GUIDANCE_EVACUATE_HOST {
get {
return ResourceManager.GetString("CDN_GUIDANCE_EVACUATE_HOST", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Reboot this server.
/// </summary>
public static string CDN_GUIDANCE_REBOOT_HOST {
get {
return ResourceManager.GetString("CDN_GUIDANCE_REBOOT_HOST", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Reboot VMs running on this server.
/// </summary>
public static string CDN_GUIDANCE_RESTART_DEVICE_MODEL {
get {
return ResourceManager.GetString("CDN_GUIDANCE_RESTART_DEVICE_MODEL", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Restart Toolstack.
/// </summary>
public static string CDN_GUIDANCE_RESTART_TOOLSTACK {
get {
return ResourceManager.GetString("CDN_GUIDANCE_RESTART_TOOLSTACK", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The trusted CA certificate &apos;{0}&apos; of &apos;{1}&apos; expired on {2}..
/// </summary>
@ -16589,6 +16661,24 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to Your Customer Success Services (CSS) agreement has expired. This server will not receive any updates, including security updates..
/// </summary>
public static string EXPIRED_CSS_UPSELLING_MESSAGE_HOST {
get {
return ResourceManager.GetString("EXPIRED_CSS_UPSELLING_MESSAGE_HOST", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Your Customer Success Services (CSS) agreement has expired. This pool will not receive any updates, including security updates.
/// </summary>
public static string EXPIRED_CSS_UPSELLING_MESSAGE_POOL {
get {
return ResourceManager.GetString("EXPIRED_CSS_UPSELLING_MESSAGE_POOL", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Export All.
/// </summary>
@ -20330,6 +20420,133 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to Post-update tasks to be performed:
///{0}.
/// </summary>
public static string HOTFIX_POST_UPDATE_ACTIONS {
get {
return ResourceManager.GetString("HOTFIX_POST_UPDATE_ACTIONS", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to {0} packages will be updated.
/// </summary>
public static string HOTFIX_RPMS_TO_INSTALL {
get {
return ResourceManager.GetString("HOTFIX_RPMS_TO_INSTALL", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to {0} bug fixes.
/// </summary>
public static string HOTFIX_TYPE_BUG_FIX_MANY {
get {
return ResourceManager.GetString("HOTFIX_TYPE_BUG_FIX_MANY", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to 1 bug fix.
/// </summary>
public static string HOTFIX_TYPE_BUG_FIX_ONE {
get {
return ResourceManager.GetString("HOTFIX_TYPE_BUG_FIX_ONE", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to {0} foundational changes.
/// </summary>
public static string HOTFIX_TYPE_FOUNDATIONAL_MANY {
get {
return ResourceManager.GetString("HOTFIX_TYPE_FOUNDATIONAL_MANY", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to 1 foundational change.
/// </summary>
public static string HOTFIX_TYPE_FOUNDATIONAL_ONE {
get {
return ResourceManager.GetString("HOTFIX_TYPE_FOUNDATIONAL_ONE", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to {0} improvements.
/// </summary>
public static string HOTFIX_TYPE_IMPROVEMENT_MANY {
get {
return ResourceManager.GetString("HOTFIX_TYPE_IMPROVEMENT_MANY", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to 1 improvement.
/// </summary>
public static string HOTFIX_TYPE_IMPROVEMENT_ONE {
get {
return ResourceManager.GetString("HOTFIX_TYPE_IMPROVEMENT_ONE", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to {0} new features.
/// </summary>
public static string HOTFIX_TYPE_NEW_FEATURE_MANY {
get {
return ResourceManager.GetString("HOTFIX_TYPE_NEW_FEATURE_MANY", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to 1 new feature.
/// </summary>
public static string HOTFIX_TYPE_NEW_FEATURE_ONE {
get {
return ResourceManager.GetString("HOTFIX_TYPE_NEW_FEATURE_ONE", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to {0} feature previews.
/// </summary>
public static string HOTFIX_TYPE_PREVIEW_FEATURE_MANY {
get {
return ResourceManager.GetString("HOTFIX_TYPE_PREVIEW_FEATURE_MANY", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to 1 new feature preview.
/// </summary>
public static string HOTFIX_TYPE_PREVIEW_FEATURE_ONE {
get {
return ResourceManager.GetString("HOTFIX_TYPE_PREVIEW_FEATURE_ONE", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to {0} security fixes.
/// </summary>
public static string HOTFIX_TYPE_SECURITY_FIX_MANY {
get {
return ResourceManager.GetString("HOTFIX_TYPE_SECURITY_FIX_MANY", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to 1 security fix.
/// </summary>
public static string HOTFIX_TYPE_SECURITY_FIX_ONE {
get {
return ResourceManager.GetString("HOTFIX_TYPE_SECURITY_FIX_ONE", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Hourly; at {0} minutes past each hour.
/// </summary>
@ -21485,6 +21702,15 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to Indeterminable.
/// </summary>
public static string INDETERMINABLE {
get {
return ResourceManager.GetString("INDETERMINABLE", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Disk snapshots are not currently available for this VM.
/// </summary>
@ -22179,6 +22405,60 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to Data merge for VDI &apos;{0}&apos; of VM &apos;{1}&apos; has completed..
/// </summary>
public static string LEAF_COALESCE_COMPLETED_DESCRIPTION {
get {
return ResourceManager.GetString("LEAF_COALESCE_COMPLETED_DESCRIPTION", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Data merge for VM {0} has completed..
/// </summary>
public static string LEAF_COALESCE_COMPLETED_TITLE {
get {
return ResourceManager.GetString("LEAF_COALESCE_COMPLETED_TITLE", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Data merge for VDI &apos;{0}&apos; of VM &apos;{1}&apos; has failed..
/// </summary>
public static string LEAF_COALESCE_FAILED_DESCRIPTION {
get {
return ResourceManager.GetString("LEAF_COALESCE_FAILED_DESCRIPTION", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Data merge for VM {0} has failed..
/// </summary>
public static string LEAF_COALESCE_FAILED_TITLE {
get {
return ResourceManager.GetString("LEAF_COALESCE_FAILED_TITLE", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Data merge for VDI &apos;{0}&apos; of VM &apos;{1}&apos; has started, performance may be reduced..
/// </summary>
public static string LEAF_COALESCE_START_DESCRIPTION {
get {
return ResourceManager.GetString("LEAF_COALESCE_START_DESCRIPTION", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Data merge for VM {0} has started..
/// </summary>
public static string LEAF_COALESCE_START_TITLE {
get {
return ResourceManager.GetString("LEAF_COALESCE_START_TITLE", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Learn more....
/// </summary>
@ -22224,6 +22504,33 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to {0} Virtual Apps and Desktops {0} Cloud features enabled.
/// </summary>
public static string LICENSE_DESKTOP_CLOUD_FEATURES_ENABLED {
get {
return ResourceManager.GetString("LICENSE_DESKTOP_CLOUD_FEATURES_ENABLED", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to {0} Virtual Apps and Desktops features enabled.
/// </summary>
public static string LICENSE_DESKTOP_FEATURES_ENABLED {
get {
return ResourceManager.GetString("LICENSE_DESKTOP_FEATURES_ENABLED", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to {0} Virtual Apps and Desktops Premium features enabled.
/// </summary>
public static string LICENSE_DESKTOP_PLUS_FEATURES_ENABLED {
get {
return ResourceManager.GetString("LICENSE_DESKTOP_PLUS_FEATURES_ENABLED", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to {0} Virtual &amp;Apps and Desktops.
/// </summary>
@ -22332,6 +22639,24 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to Eligible for support.
/// </summary>
public static string LICENSE_ELIGIBLE_FOR_SUPPORT {
get {
return ResourceManager.GetString("LICENSE_ELIGIBLE_FOR_SUPPORT", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Premium features enabled.
/// </summary>
public static string LICENSE_ENTERPRISE_FEATURES_ENABLED {
get {
return ResourceManager.GetString("LICENSE_ENTERPRISE_FEATURES_ENABLED", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The licensing action for {0} failed..
/// </summary>
@ -22476,6 +22801,24 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to Active CSS.
/// </summary>
public static string LICENSE_MANAGER_ACTIVE_CSS {
get {
return ResourceManager.GetString("LICENSE_MANAGER_ACTIVE_CSS", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Active support agreement.
/// </summary>
public static string LICENSE_MANAGER_ACTIVE_CSS_LONG {
get {
return ResourceManager.GetString("LICENSE_MANAGER_ACTIVE_CSS_LONG", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Buy Licenses....
/// </summary>
@ -22485,6 +22828,42 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to Expired CSS.
/// </summary>
public static string LICENSE_MANAGER_EXPIRED_CSS {
get {
return ResourceManager.GetString("LICENSE_MANAGER_EXPIRED_CSS", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Expired support agreement.
/// </summary>
public static string LICENSE_MANAGER_EXPIRED_CSS_LONG {
get {
return ResourceManager.GetString("LICENSE_MANAGER_EXPIRED_CSS_LONG", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Licensed.
/// </summary>
public static string LICENSE_MANAGER_LICENSED {
get {
return ResourceManager.GetString("LICENSE_MANAGER_LICENSED", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Purchase Support....
/// </summary>
public static string LICENSE_MANAGER_PURCHASE_SUPPORT_LINK_TEXT {
get {
return ResourceManager.GetString("LICENSE_MANAGER_PURCHASE_SUPPORT_LINK_TEXT", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to License Expires:.
/// </summary>
@ -22521,6 +22900,24 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to Trial edition.
/// </summary>
public static string LICENSE_MANAGER_TRIAL_EDITION {
get {
return ResourceManager.GetString("LICENSE_MANAGER_TRIAL_EDITION", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Trial license.
/// </summary>
public static string LICENSE_MANAGER_TRIAL_LICENSE {
get {
return ResourceManager.GetString("LICENSE_MANAGER_TRIAL_LICENSE", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Never.
/// </summary>
@ -22557,6 +22954,15 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to Premium features enabled.
/// </summary>
public static string LICENSE_PREMIUM_FEATURES_ENABLED {
get {
return ResourceManager.GetString("LICENSE_PREMIUM_FEATURES_ENABLED", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The license server {0} could not be reached. You have until {1} to reconnect to the license server..
/// </summary>
@ -22620,6 +23026,15 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to Standard features only.
/// </summary>
public static string LICENSE_STANDARD_FEATURES_ENABLED {
get {
return ResourceManager.GetString("LICENSE_STANDARD_FEATURES_ENABLED", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Status.
/// </summary>
@ -22630,62 +23045,11 @@ namespace XenAdmin {
}
/// <summary>
/// Looks up a localized string similar to Eligible for support
///{0} Virtual Apps and Desktops {0} Cloud features enabled.
/// Looks up a localized string similar to Trial.
/// </summary>
public static string LICENSE_SUPPORT_AND_DESKTOP_CLOUD_FEATURES_ENABLED {
public static string LICENSE_TRIAL {
get {
return ResourceManager.GetString("LICENSE_SUPPORT_AND_DESKTOP_CLOUD_FEATURES_ENABLED", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Eligible for support
///{0} Virtual Apps and Desktops features enabled.
/// </summary>
public static string LICENSE_SUPPORT_AND_DESKTOP_FEATURES_ENABLED {
get {
return ResourceManager.GetString("LICENSE_SUPPORT_AND_DESKTOP_FEATURES_ENABLED", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Eligible for support
///{0} Virtual Apps and Desktops Premium features enabled.
/// </summary>
public static string LICENSE_SUPPORT_AND_DESKTOP_PLUS_FEATURES_ENABLED {
get {
return ResourceManager.GetString("LICENSE_SUPPORT_AND_DESKTOP_PLUS_FEATURES_ENABLED", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Eligible for support
///Premium features enabled.
/// </summary>
public static string LICENSE_SUPPORT_AND_ENTERPRISE_FEATURES_ENABLED {
get {
return ResourceManager.GetString("LICENSE_SUPPORT_AND_ENTERPRISE_FEATURES_ENABLED", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Eligible for support
///Premium features enabled.
/// </summary>
public static string LICENSE_SUPPORT_AND_PREMIUM_FEATURES_ENABLED {
get {
return ResourceManager.GetString("LICENSE_SUPPORT_AND_PREMIUM_FEATURES_ENABLED", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Eligible for support
///Standard features only.
/// </summary>
public static string LICENSE_SUPPORT_AND_STANDARD_FEATURES_ENABLED {
get {
return ResourceManager.GetString("LICENSE_SUPPORT_AND_STANDARD_FEATURES_ENABLED", resourceCulture);
return ResourceManager.GetString("LICENSE_TRIAL", resourceCulture);
}
}
@ -26380,7 +26744,7 @@ namespace XenAdmin {
}
/// <summary>
/// Looks up a localized string similar to The pool has already reached the maximum number of servers allowed by your license.
/// Looks up a localized string similar to The pool has already reached the maximum number of servers allowed by your license. Go to {0} to purchase licenses.
/// </summary>
public static string NEWPOOL_MAX_NUMBER_HOST_REACHED {
get {
@ -26416,7 +26780,7 @@ namespace XenAdmin {
}
/// <summary>
/// Looks up a localized string similar to The pool will exceed the maximum number of servers allowed by your license.
/// Looks up a localized string similar to The pool will exceed the maximum number of servers allowed by your license. Go to {0} to purchase licenses.
/// </summary>
public static string NEWPOOL_WILL_EXCEED_POOL_MAX_SIZE {
get {
@ -28226,6 +28590,15 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to Not configured.
/// </summary>
public static string NOT_CONFIGURED {
get {
return ResourceManager.GetString("NOT_CONFIGURED", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to not contained in.
/// </summary>
@ -28559,15 +28932,6 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to Alerts: {0}.
/// </summary>
public static string NOTIFICATIONS_SUBMODE_ALERTS_STATUS {
get {
return ResourceManager.GetString("NOTIFICATIONS_SUBMODE_ALERTS_STATUS", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Alerts ({0}).
/// </summary>
@ -28586,42 +28950,6 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to Events: {0}.
/// </summary>
public static string NOTIFICATIONS_SUBMODE_EVENTS_STATUS {
get {
return ResourceManager.GetString("NOTIFICATIONS_SUBMODE_EVENTS_STATUS", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to 1 error.
/// </summary>
public static string NOTIFICATIONS_SUBMODE_EVENTS_STATUS_ERROR {
get {
return ResourceManager.GetString("NOTIFICATIONS_SUBMODE_EVENTS_STATUS_ERROR", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to {0} errors.
/// </summary>
public static string NOTIFICATIONS_SUBMODE_EVENTS_STATUS_ERRORS {
get {
return ResourceManager.GetString("NOTIFICATIONS_SUBMODE_EVENTS_STATUS_ERRORS", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to {0} in progress.
/// </summary>
public static string NOTIFICATIONS_SUBMODE_EVENTS_STATUS_IN_PROGRESS {
get {
return ResourceManager.GetString("NOTIFICATIONS_SUBMODE_EVENTS_STATUS_IN_PROGRESS", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Events ({0} errors).
/// </summary>
@ -28649,15 +28977,6 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to Updates: {0}.
/// </summary>
public static string NOTIFICATIONS_SUBMODE_UPDATES_STATUS {
get {
return ResourceManager.GetString("NOTIFICATIONS_SUBMODE_UPDATES_STATUS", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Updates ({0}).
/// </summary>
@ -31593,15 +31912,6 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to Not configured.
/// </summary>
public static string PVS_CACHE_NOT_CONFIGURED {
get {
return ResourceManager.GetString("PVS_CACHE_NOT_CONFIGURED", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to This PVS cache storage cannot be changed because it is in use..
/// </summary>
@ -36633,6 +36943,15 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to Unlicensed servers will not receive any updates, including security updates..
/// </summary>
public static string TRIAL_EDITION_UPSELLING_MESSAGE {
get {
return ResourceManager.GetString("TRIAL_EDITION_UPSELLING_MESSAGE", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to True.
/// </summary>
@ -37245,6 +37564,15 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to Configure Updates....
/// </summary>
public static string UPDATES_GENERAL_TAB_CONFIG {
get {
return ResourceManager.GetString("UPDATES_GENERAL_TAB_CONFIG", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to (full application required).
/// </summary>
@ -37254,6 +37582,33 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to Last synchronized.
/// </summary>
public static string UPDATES_GENERAL_TAB_LAST_SYNCED {
get {
return ResourceManager.GetString("UPDATES_GENERAL_TAB_LAST_SYNCED", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Update channel.
/// </summary>
public static string UPDATES_GENERAL_TAB_REPO {
get {
return ResourceManager.GetString("UPDATES_GENERAL_TAB_REPO", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Synchronize Now.
/// </summary>
public static string UPDATES_GENERAL_TAB_SYNC_NOW {
get {
return ResourceManager.GetString("UPDATES_GENERAL_TAB_SYNC_NOW", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Automatically check for {0} updates.
/// </summary>
@ -43036,6 +43391,15 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to Checking for available updates....
/// </summary>
public static string YUM_REPO_ACTION_CHECK_FOR_UPDATES {
get {
return ResourceManager.GetString("YUM_REPO_ACTION_CHECK_FOR_UPDATES", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Disabling repository {0}....
/// </summary>
@ -43173,6 +43537,33 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to Are you sure you want to synchronize all connected pools or standalone servers with their respective update channel?.
/// </summary>
public static string YUM_REPO_SYNC_ALL_CONFIRMATION {
get {
return ResourceManager.GetString("YUM_REPO_SYNC_ALL_CONFIRMATION", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to You have applied filters to the list of pools or standalone servers. Do you want to synchronize all connected systems with their respective update channel, or only the systems you have chosen to view?.
/// </summary>
public static string YUM_REPO_SYNC_FILTER_CONFIRMATION {
get {
return ResourceManager.GetString("YUM_REPO_SYNC_FILTER_CONFIRMATION", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Synchronize &amp;all.
/// </summary>
public static string YUM_REPO_SYNC_YES_ALL_BUTTON {
get {
return ResourceManager.GetString("YUM_REPO_SYNC_YES_ALL_BUTTON", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to &amp;Yes, Synchronize.
/// </summary>
@ -43181,5 +43572,14 @@ namespace XenAdmin {
return ResourceManager.GetString("YUM_REPO_SYNC_YES_BUTTON", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Only synchronize &amp;visible.
/// </summary>
public static string YUM_REPO_SYNC_YES_VISIBLE_BUTTON {
get {
return ResourceManager.GetString("YUM_REPO_SYNC_YES_VISIBLE_BUTTON", resourceCulture);
}
}
}
}

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
@ -1831,6 +1831,18 @@ This alarm is set to be triggered when the total throughput exceeds {4}.</value>
<data name="ALERT_CAP_LABEL" xml:space="preserve">
<value>(Showing first {0} entries)</value>
</data>
<data name="ALERT_CDN_OUT_OF_SYNC_TITLE" xml:space="preserve">
<value>You have not synchronized with the update channel in {0} days.</value>
</data>
<data name="ALERT_CDN_REPO_NOT_CONFIGURED_ACTION_LINK" xml:space="preserve">
<value>Configure Updates</value>
</data>
<data name="ALERT_CDN_REPO_NOT_CONFIGURED_DESCRIPTION" xml:space="preserve">
<value>Configuring an update channel will allow your system to synchronize and retrieve available updates.</value>
</data>
<data name="ALERT_CDN_REPO_NOT_CONFIGURED_TITLE" xml:space="preserve">
<value>You have not configured an update channel on '{0}'</value>
</data>
<data name="ALERT_CPUS_SUB_TEXT" xml:space="preserve">
<value>When CPU usage exceeds {0}% for {1} min(s)</value>
</data>
@ -2618,6 +2630,18 @@ This will cancel compilation of the status report.</value>
<data name="CDDRIVE_MAX_ALLOWED_VBDS" xml:space="preserve">
<value>The DVD drive cannot be created, because you have reached the maximum number of virtual disks allowed for this virtual machine.</value>
</data>
<data name="CDN_GUIDANCE_EVACUATE_HOST" xml:space="preserve">
<value>Migrate VMs off this server</value>
</data>
<data name="CDN_GUIDANCE_REBOOT_HOST" xml:space="preserve">
<value>Reboot this server</value>
</data>
<data name="CDN_GUIDANCE_RESTART_DEVICE_MODEL" xml:space="preserve">
<value>Reboot VMs running on this server</value>
</data>
<data name="CDN_GUIDANCE_RESTART_TOOLSTACK" xml:space="preserve">
<value>Restart Toolstack</value>
</data>
<data name="CERTIFICATE_CA_ALERT_EXPIRED_DESCIRPTION" xml:space="preserve">
<value>The trusted CA certificate '{0}' of '{1}' expired on {2}.</value>
</data>
@ -5822,6 +5846,12 @@ Would you like to eject these ISOs before continuing?</value>
<data name="EXPAND_ALL" xml:space="preserve">
<value>E&amp;xpand All</value>
</data>
<data name="EXPIRED_CSS_UPSELLING_MESSAGE_HOST" xml:space="preserve">
<value>Your Customer Success Services (CSS) agreement has expired. This server will not receive any updates, including security updates.</value>
</data>
<data name="EXPIRED_CSS_UPSELLING_MESSAGE_POOL" xml:space="preserve">
<value>Your Customer Success Services (CSS) agreement has expired. This pool will not receive any updates, including security updates</value>
</data>
<data name="EXPORT_ALL" xml:space="preserve">
<value>Export All</value>
</data>
@ -7098,6 +7128,49 @@ This might result in failure to migrate VMs to this server during the RPU or to
<data name="HOTFIX_ELIGIBILITY_WARNING_FREE_NO_DATE" xml:space="preserve">
<value>End of Life for express customers</value>
</data>
<data name="HOTFIX_POST_UPDATE_ACTIONS" xml:space="preserve">
<value>Post-update tasks to be performed:
{0}</value>
</data>
<data name="HOTFIX_RPMS_TO_INSTALL" xml:space="preserve">
<value>{0} packages will be updated</value>
</data>
<data name="HOTFIX_TYPE_BUG_FIX_MANY" xml:space="preserve">
<value>{0} bug fixes</value>
</data>
<data name="HOTFIX_TYPE_BUG_FIX_ONE" xml:space="preserve">
<value>1 bug fix</value>
</data>
<data name="HOTFIX_TYPE_FOUNDATIONAL_MANY" xml:space="preserve">
<value>{0} foundational changes</value>
</data>
<data name="HOTFIX_TYPE_FOUNDATIONAL_ONE" xml:space="preserve">
<value>1 foundational change</value>
</data>
<data name="HOTFIX_TYPE_IMPROVEMENT_MANY" xml:space="preserve">
<value>{0} improvements</value>
</data>
<data name="HOTFIX_TYPE_IMPROVEMENT_ONE" xml:space="preserve">
<value>1 improvement</value>
</data>
<data name="HOTFIX_TYPE_NEW_FEATURE_MANY" xml:space="preserve">
<value>{0} new features</value>
</data>
<data name="HOTFIX_TYPE_NEW_FEATURE_ONE" xml:space="preserve">
<value>1 new feature</value>
</data>
<data name="HOTFIX_TYPE_PREVIEW_FEATURE_MANY" xml:space="preserve">
<value>{0} feature previews</value>
</data>
<data name="HOTFIX_TYPE_PREVIEW_FEATURE_ONE" xml:space="preserve">
<value>1 new feature preview</value>
</data>
<data name="HOTFIX_TYPE_SECURITY_FIX_MANY" xml:space="preserve">
<value>{0} security fixes</value>
</data>
<data name="HOTFIX_TYPE_SECURITY_FIX_ONE" xml:space="preserve">
<value>1 security fix</value>
</data>
<data name="HOURLY_SCHEDULE_FORMAT" xml:space="preserve">
<value>Hourly; at {0} minutes past each hour</value>
</data>
@ -7485,6 +7558,9 @@ This might result in failure to migrate VMs to this server during the RPU or to
<data name="INCORRECT_OLD_PASSWORD" xml:space="preserve">
<value>Incorrect old password</value>
</data>
<data name="INDETERMINABLE" xml:space="preserve">
<value>Indeterminable</value>
</data>
<data name="INFO_DISK_MODE" xml:space="preserve">
<value>Disk snapshots are not currently available for this VM</value>
</data>
@ -7717,6 +7793,24 @@ SR UUID: {1}</value>
<data name="LAUNCH_LICENSE_MANAGER" xml:space="preserve">
<value>License Manager</value>
</data>
<data name="LEAF_COALESCE_COMPLETED_DESCRIPTION" xml:space="preserve">
<value>Data merge for VDI '{0}' of VM '{1}' has completed.</value>
</data>
<data name="LEAF_COALESCE_COMPLETED_TITLE" xml:space="preserve">
<value>Data merge for VM {0} has completed.</value>
</data>
<data name="LEAF_COALESCE_FAILED_DESCRIPTION" xml:space="preserve">
<value>Data merge for VDI '{0}' of VM '{1}' has failed.</value>
</data>
<data name="LEAF_COALESCE_FAILED_TITLE" xml:space="preserve">
<value>Data merge for VM {0} has failed.</value>
</data>
<data name="LEAF_COALESCE_START_DESCRIPTION" xml:space="preserve">
<value>Data merge for VDI '{0}' of VM '{1}' has started, performance may be reduced.</value>
</data>
<data name="LEAF_COALESCE_START_TITLE" xml:space="preserve">
<value>Data merge for VM {0} has started.</value>
</data>
<data name="LEARN_MORE" xml:space="preserve">
<value>Learn more...</value>
</data>
@ -7732,6 +7826,15 @@ SR UUID: {1}</value>
<data name="LICENSE_ACTIVATED" xml:space="preserve">
<value>Activated</value>
</data>
<data name="LICENSE_DESKTOP_CLOUD_FEATURES_ENABLED" xml:space="preserve">
<value>{0} Virtual Apps and Desktops {0} Cloud features enabled</value>
</data>
<data name="LICENSE_DESKTOP_FEATURES_ENABLED" xml:space="preserve">
<value>{0} Virtual Apps and Desktops features enabled</value>
</data>
<data name="LICENSE_DESKTOP_PLUS_FEATURES_ENABLED" xml:space="preserve">
<value>{0} Virtual Apps and Desktops Premium features enabled</value>
</data>
<data name="LICENSE_EDITION_DESKTOP" xml:space="preserve">
<value>{0} Virtual &amp;Apps and Desktops</value>
</data>
@ -7768,6 +7871,12 @@ SR UUID: {1}</value>
<data name="LICENSE_EDITION_STANDARD_PERSOCKET_LEGACY" xml:space="preserve">
<value>{0} &amp;Standard Per-Socket ({1} required)</value>
</data>
<data name="LICENSE_ELIGIBLE_FOR_SUPPORT" xml:space="preserve">
<value>Eligible for support</value>
</data>
<data name="LICENSE_ENTERPRISE_FEATURES_ENABLED" xml:space="preserve">
<value>Premium features enabled</value>
</data>
<data name="LICENSE_ERROR_1" xml:space="preserve">
<value>The licensing action for {0} failed.</value>
</data>
@ -7816,9 +7925,27 @@ SR UUID: {1}</value>
<data name="LICENSE_LICENSED" xml:space="preserve">
<value>Licensed</value>
</data>
<data name="LICENSE_MANAGER_ACTIVE_CSS" xml:space="preserve">
<value>Active CSS</value>
</data>
<data name="LICENSE_MANAGER_ACTIVE_CSS_LONG" xml:space="preserve">
<value>Active support agreement</value>
</data>
<data name="LICENSE_MANAGER_BUY_LICENSE_LINK_TEXT" xml:space="preserve">
<value>Buy Licenses...</value>
</data>
<data name="LICENSE_MANAGER_EXPIRED_CSS" xml:space="preserve">
<value>Expired CSS</value>
</data>
<data name="LICENSE_MANAGER_EXPIRED_CSS_LONG" xml:space="preserve">
<value>Expired support agreement</value>
</data>
<data name="LICENSE_MANAGER_LICENSED" xml:space="preserve">
<value>Licensed</value>
</data>
<data name="LICENSE_MANAGER_PURCHASE_SUPPORT_LINK_TEXT" xml:space="preserve">
<value>Purchase Support...</value>
</data>
<data name="LICENSE_MANAGER_SUMMARY_LICENSE_EXPIRES" xml:space="preserve">
<value>License Expires:</value>
</data>
@ -7831,6 +7958,12 @@ SR UUID: {1}</value>
<data name="LICENSE_MANAGER_SUMMARY_LICENSE_TYPE" xml:space="preserve">
<value>License Type:</value>
</data>
<data name="LICENSE_MANAGER_TRIAL_EDITION" xml:space="preserve">
<value>Trial edition</value>
</data>
<data name="LICENSE_MANAGER_TRIAL_LICENSE" xml:space="preserve">
<value>Trial license</value>
</data>
<data name="LICENSE_NEVER" xml:space="preserve">
<value>Never</value>
</data>
@ -7843,6 +7976,9 @@ SR UUID: {1}</value>
<data name="LICENSE_NOT_ELIGIBLE_FOR_SUPPORT" xml:space="preserve">
<value>Not eligible for support</value>
</data>
<data name="LICENSE_PREMIUM_FEATURES_ENABLED" xml:space="preserve">
<value>Premium features enabled</value>
</data>
<data name="LICENSE_REGULAR_GRACE_TOOLTIP" xml:space="preserve">
<value>The license server {0} could not be reached. You have until {1} to reconnect to the license server.</value>
</data>
@ -7864,32 +8000,14 @@ SR UUID: {1}</value>
<data name="LICENSE_SERVER_WEB_CONSOLE_GOTO" xml:space="preserve">
<value>Go to...</value>
</data>
<data name="LICENSE_STANDARD_FEATURES_ENABLED" xml:space="preserve">
<value>Standard features only</value>
</data>
<data name="LICENSE_STATUS" xml:space="preserve">
<value>Status</value>
</data>
<data name="LICENSE_SUPPORT_AND_DESKTOP_CLOUD_FEATURES_ENABLED" xml:space="preserve">
<value>Eligible for support
{0} Virtual Apps and Desktops {0} Cloud features enabled</value>
</data>
<data name="LICENSE_SUPPORT_AND_DESKTOP_FEATURES_ENABLED" xml:space="preserve">
<value>Eligible for support
{0} Virtual Apps and Desktops features enabled</value>
</data>
<data name="LICENSE_SUPPORT_AND_DESKTOP_PLUS_FEATURES_ENABLED" xml:space="preserve">
<value>Eligible for support
{0} Virtual Apps and Desktops Premium features enabled</value>
</data>
<data name="LICENSE_SUPPORT_AND_ENTERPRISE_FEATURES_ENABLED" xml:space="preserve">
<value>Eligible for support
Premium features enabled</value>
</data>
<data name="LICENSE_SUPPORT_AND_PREMIUM_FEATURES_ENABLED" xml:space="preserve">
<value>Eligible for support
Premium features enabled</value>
</data>
<data name="LICENSE_SUPPORT_AND_STANDARD_FEATURES_ENABLED" xml:space="preserve">
<value>Eligible for support
Standard features only</value>
<data name="LICENSE_TRIAL" xml:space="preserve">
<value>Trial</value>
</data>
<data name="LICENSE_UNLICENSED" xml:space="preserve">
<value>Unlicensed</value>
@ -9182,7 +9300,7 @@ It is strongly recommended that you Cancel and apply the latest version of the p
<value>This server's Linux pack installation state differs from that of the coordinator</value>
</data>
<data name="NEWPOOL_MAX_NUMBER_HOST_REACHED" xml:space="preserve">
<value>The pool has already reached the maximum number of servers allowed by your license</value>
<value>The pool has already reached the maximum number of servers allowed by your license. Go to {0} to purchase licenses</value>
</data>
<data name="NEWPOOL_POOLINGRESTRICTED" xml:space="preserve">
<value>Pooling is restricted with this server's license</value>
@ -9194,7 +9312,7 @@ It is strongly recommended that you Cancel and apply the latest version of the p
<value>You cannot add an unlicensed server to a licensed pool</value>
</data>
<data name="NEWPOOL_WILL_EXCEED_POOL_MAX_SIZE" xml:space="preserve">
<value>The pool will exceed the maximum number of servers allowed by your license</value>
<value>The pool will exceed the maximum number of servers allowed by your license. Go to {0} to purchase licenses</value>
</data>
<data name="NEWSR_ACTION" xml:space="preserve">
<value>NFS SR [{0}]</value>
@ -9810,6 +9928,9 @@ When you configure an NFS storage repository, you simply provide the host name o
<data name="NOT_ATTACHED_TO" xml:space="preserve">
<value>not attached to</value>
</data>
<data name="NOT_CONFIGURED" xml:space="preserve">
<value>Not configured</value>
</data>
<data name="NOT_CONTAINED_IN" xml:space="preserve">
<value>not contained in</value>
</data>
@ -9921,27 +10042,12 @@ When you configure an NFS storage repository, you simply provide the host name o
<data name="NOTIFICATIONS_SUBMODE_ALERTS_READ" xml:space="preserve">
<value>Alerts</value>
</data>
<data name="NOTIFICATIONS_SUBMODE_ALERTS_STATUS" xml:space="preserve">
<value>Alerts: {0}</value>
</data>
<data name="NOTIFICATIONS_SUBMODE_ALERTS_UNREAD" xml:space="preserve">
<value>Alerts ({0})</value>
</data>
<data name="NOTIFICATIONS_SUBMODE_EVENTS_READ" xml:space="preserve">
<value>Events</value>
</data>
<data name="NOTIFICATIONS_SUBMODE_EVENTS_STATUS" xml:space="preserve">
<value>Events: {0}</value>
</data>
<data name="NOTIFICATIONS_SUBMODE_EVENTS_STATUS_ERROR" xml:space="preserve">
<value>1 error</value>
</data>
<data name="NOTIFICATIONS_SUBMODE_EVENTS_STATUS_ERRORS" xml:space="preserve">
<value>{0} errors</value>
</data>
<data name="NOTIFICATIONS_SUBMODE_EVENTS_STATUS_IN_PROGRESS" xml:space="preserve">
<value>{0} in progress</value>
</data>
<data name="NOTIFICATIONS_SUBMODE_EVENTS_UNREAD_MANY" xml:space="preserve">
<value>Events ({0} errors)</value>
</data>
@ -9951,9 +10057,6 @@ When you configure an NFS storage repository, you simply provide the host name o
<data name="NOTIFICATIONS_SUBMODE_UPDATES_READ" xml:space="preserve">
<value>Updates</value>
</data>
<data name="NOTIFICATIONS_SUBMODE_UPDATES_STATUS" xml:space="preserve">
<value>Updates: {0}</value>
</data>
<data name="NOTIFICATIONS_SUBMODE_UPDATES_UNREAD" xml:space="preserve">
<value>Updates ({0})</value>
</data>
@ -10950,9 +11053,6 @@ Click Previous if you need to go back and specify a different network location o
<data name="PVS_CACHE_MEMORY_SR_NAME" xml:space="preserve">
<value>MemorySR</value>
</data>
<data name="PVS_CACHE_NOT_CONFIGURED" xml:space="preserve">
<value>Not configured</value>
</data>
<data name="PVS_CACHE_STORAGE_CANNOT_BE_CHANGED" xml:space="preserve">
<value>This PVS cache storage cannot be changed because it is in use.</value>
</data>
@ -12663,6 +12763,9 @@ Do you want to connect to the pool coordinator '{1}'?</value>
<data name="TREESEARCHBOX_DROPDOWN_TOOLTIP" xml:space="preserve">
<value>Views and Saved Searches</value>
</data>
<data name="TRIAL_EDITION_UPSELLING_MESSAGE" xml:space="preserve">
<value>Unlicensed servers will not receive any updates, including security updates.</value>
</data>
<data name="TRUE" xml:space="preserve">
<value>True</value>
</data>
@ -12873,9 +12976,21 @@ Note that if RBAC is enabled, only updates which you have privileges to dismiss
<data name="UPDATES_DOWNLOAD_REQUIRED_XENCENTER" xml:space="preserve">
<value>Download {0}</value>
</data>
<data name="UPDATES_GENERAL_TAB_CONFIG" xml:space="preserve">
<value>Configure Updates...</value>
</data>
<data name="UPDATES_GENERAL_TAB_ENFORCE_HOMOGENEITY" xml:space="preserve">
<value>(full application required)</value>
</data>
<data name="UPDATES_GENERAL_TAB_LAST_SYNCED" xml:space="preserve">
<value>Last synchronized</value>
</data>
<data name="UPDATES_GENERAL_TAB_REPO" xml:space="preserve">
<value>Update channel</value>
</data>
<data name="UPDATES_GENERAL_TAB_SYNC_NOW" xml:space="preserve">
<value>Synchronize Now</value>
</data>
<data name="UPDATES_OPTIONS_DESC" xml:space="preserve">
<value>Automatically check for {0} updates</value>
</data>
@ -14830,6 +14945,9 @@ Any disk in your VM's DVD drive will be ejected when installing {1}.</value>
<data name="YOU_ARE_HERE" xml:space="preserve">
<value>You are here</value>
</data>
<data name="YUM_REPO_ACTION_CHECK_FOR_UPDATES" xml:space="preserve">
<value>Checking for available updates...</value>
</data>
<data name="YUM_REPO_ACTION_CONFIG_DESCRIPTION_DISABLE" xml:space="preserve">
<value>Disabling repository {0}...</value>
</data>
@ -14877,7 +14995,19 @@ Any disk in your VM's DVD drive will be ejected when installing {1}.</value>
Do you want to synchronize immediately?</value>
</data>
<data name="YUM_REPO_SYNC_ALL_CONFIRMATION" xml:space="preserve">
<value>Are you sure you want to synchronize all connected pools or standalone servers with their respective update channel?</value>
</data>
<data name="YUM_REPO_SYNC_FILTER_CONFIRMATION" xml:space="preserve">
<value>You have applied filters to the list of pools or standalone servers. Do you want to synchronize all connected systems with their respective update channel, or only the systems you have chosen to view?</value>
</data>
<data name="YUM_REPO_SYNC_YES_ALL_BUTTON" xml:space="preserve">
<value>Synchronize &amp;all</value>
</data>
<data name="YUM_REPO_SYNC_YES_BUTTON" xml:space="preserve">
<value>&amp;Yes, Synchronize</value>
</data>
<data name="YUM_REPO_SYNC_YES_VISIBLE_BUTTON" xml:space="preserve">
<value>Only synchronize &amp;visible</value>
</data>
</root>

View File

@ -224,9 +224,9 @@ namespace XenAdmin.Core
case Reason.LicenseMismatch:
return Messages.NEWPOOL_LICENSEMISMATCH;
case Reason.CoordinatorPoolMaxNumberHostReached:
return Messages.NEWPOOL_MAX_NUMBER_HOST_REACHED;
return string.Format(Messages.NEWPOOL_MAX_NUMBER_HOST_REACHED, InvisibleMessages.LICENSE_BUY_URL);
case Reason.WillExceedPoolMaxSize:
return Messages.NEWPOOL_WILL_EXCEED_POOL_MAX_SIZE;
return string.Format(Messages.NEWPOOL_WILL_EXCEED_POOL_MAX_SIZE, InvisibleMessages.LICENSE_BUY_URL);
case Reason.DifferentServerVersion:
return Messages.NEWPOOL_DIFF_SERVER;
case Reason.DifferentHomogeneousUpdatesFromCoordinator:

View File

@ -350,7 +350,7 @@ namespace XenAdmin
public const long TicksBefore1970 = 621355968000000000;
public static readonly string[] Iso8601DateFormats = {"yyyyMMddTHH:mm:ssZ", "yyyy-MM-ddTHH:mm:ssZ"};
public static readonly string[] NonIso8601DateFormats = { "yyyy-MM-dd" };
public static readonly string[] NonIso8601DateFormats = { "yyyy-MM-dd", "yyyy.MMdd" };
public static DateTime GetUnixMinDateTime()
{

View File

@ -43,7 +43,7 @@ namespace XenAPI
{
public partial class Host : IComparable<Host>, IEquatable<Host>
{
private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod()?.DeclaringType);
public enum Edition
{
@ -142,6 +142,7 @@ namespace XenAPI
case Edition.Standard:
return "standard";
default:
// CP-43000: For some hosts "trial" works, too. However, "express" is valid from Naples onwards
return Helpers.NaplesOrGreater(this) ? "express" : "free";
}
}
@ -186,6 +187,7 @@ namespace XenAPI
/// <summary>
/// The expiry date of this host's license in UTC.
/// Defaults to 2030-01-01 if not found.
/// </summary>
public virtual DateTime LicenseExpiryUTC()
{
@ -195,6 +197,25 @@ namespace XenAPI
return new DateTime(2030, 1, 1);
}
/// <summary>
/// The CSS expiry date of this host's license.
/// The time component is always set to midnight.
/// Returns null if the value doesn't exist.
/// </summary>
public virtual DateTime? LicenseCssExpiry()
{
if(license_params != null &&
license_params.TryGetValue("css_expiry", out var cssExpiryValue) &&
!string.IsNullOrEmpty(cssExpiryValue) &&
Util.TryParseNonIso8601DateTime(cssExpiryValue, out var result))
{
// css_expiry is not a datetime object
return result.Date;
}
return null;
}
public static bool RestrictRBAC(Host h)
{
return BoolKeyPreferTrue(h.license_params, "restrict_rbac");
@ -292,7 +313,7 @@ namespace XenAPI
public virtual bool IsFreeLicense()
{
return edition == "free" || edition == "express";
return edition == "free" || edition == "express" || edition == "trial";
}
public virtual bool IsFreeLicenseOrExpired()
@ -302,6 +323,46 @@ namespace XenAPI
return true;
}
/// <summary>
/// True if host qualifies for showing an upselling message based on its license and version.
/// <br />
/// Used to decide whether or not to show the upselling message from trial or express edition.
/// <br />
/// See CP-43000 for more info.
/// </summary>
public virtual bool CanShowTrialEditionUpsell()
{
return Helpers.NileOrGreater(this) && IsFreeLicense() && !IsInPreviewRelease();
}
/// <summary>
/// Return true if the is_preview_release value in host.software_version is present and set to true.
/// </summary>
public virtual bool IsInPreviewRelease()
{
return software_version.TryGetValue("is_preview_release", out var isPreviewReleaseString) &&
bool.TryParse(isPreviewReleaseString, out var isPreviewRelease) && isPreviewRelease;
}
/// <summary>
/// Returns true if the CSS license has expired, regardless of what edition is shown.
/// <br />
/// Do not rely on this method for enforcing restrictions as the user can circumvent this method
/// by updating the system date.
/// </summary>
public virtual bool CssLicenseHasExpired()
{
var cssExpiry = LicenseCssExpiry();
if (cssExpiry.HasValue)
{
// User can circumvent this by changing system date
return DateTime.UtcNow < cssExpiry;
}
return false;
}
public static bool RestrictHA(Host h)
{
return !BoolKey(h.license_params, "enable_xha");
@ -1430,6 +1491,11 @@ namespace XenAPI
return GetEdition(edition) == Edition.Standard;
}
public bool FreeFeaturesEnabled()
{
return GetEdition(edition) == Edition.Free;
}
public bool EligibleForSupport()
{
return GetEdition(edition) != Edition.Free;

View File

@ -110,6 +110,8 @@ namespace XenAPI
return Connection.Cache.Find_By_Uuid<PVS_proxy>(obj_uuid);
case cls.Certificate:
return Connection.Cache.Find_By_Uuid<Certificate>(obj_uuid);
case cls.VDI:
return Connection.Cache.Find_By_Uuid<VDI>(obj_uuid);
default:
return null;
}

View File

@ -499,9 +499,8 @@ namespace XenAPI
var sm = GetSM();
var vdiSizeUnlimited = sm != null && Array.IndexOf(sm.capabilities, "LARGE_VDI") != -1;
var vdiSize = vdis.Sum(vdi => vdi.virtual_size);
if (!vdiSizeUnlimited && vdiSize > DISK_MAX_SIZE)
if (!vdiSizeUnlimited && vdis.Any(vdi => vdi.virtual_size > DISK_MAX_SIZE))
{
cannotFitReason = string.Format(Messages.SR_DISKSIZE_EXCEEDS_DISK_MAX_SIZE,
Util.DiskSizeString(DISK_MAX_SIZE, 0));
@ -516,6 +515,7 @@ namespace XenAPI
var isThinlyProvisioned = sm != null && Array.IndexOf(sm.capabilities, "THIN_PROVISIONING") != -1;
var vdiPhysicalUtilization = vdis.Sum(vdi => vdi.physical_utilisation);
var vdiSize = vdis.Sum(vdi => vdi.virtual_size);
var sizeToConsider = isThinlyProvisioned ? vdiPhysicalUtilization : vdiSize;
if (sizeToConsider > physical_size)

View File

@ -136,6 +136,9 @@ namespace XenAPI
HA_STATEFILE_APPROACHING_TIMEOUT,
HA_HEARTBEAT_APPROACHING_TIMEOUT,
HA_STATEFILE_LOST,
LEAF_COALESCE_START_MESSAGE,
LEAF_COALESCE_COMPLETED,
LEAF_COALESCE_FAILED,
unknown
}
@ -349,6 +352,12 @@ namespace XenAPI
return MessageType.HA_HEARTBEAT_APPROACHING_TIMEOUT;
case "HA_STATEFILE_LOST":
return MessageType.HA_STATEFILE_LOST;
case "LEAF_COALESCE_START_MESSAGE":
return MessageType.LEAF_COALESCE_START_MESSAGE;
case "LEAF_COALESCE_COMPLETED":
return MessageType.LEAF_COALESCE_COMPLETED;
case "LEAF_COALESCE_FAILED":
return MessageType.LEAF_COALESCE_FAILED;
default:
return MessageType.unknown;
}