From 84f0a3a3ea1831562d36a31cd406ea7dc5a36d4a Mon Sep 17 00:00:00 2001 From: Mihaela Stoica Date: Fri, 28 Oct 2016 16:58:15 +0100 Subject: [PATCH] CA-227072: Improvements to the confirmation message on deleting a site - show a different message when deleting a Cache Configuration (a PVS_site object) that is actively in use by a PVS site - some more text changes on the "Configure PVS Cache" dialog Signed-off-by: Mihaela Stoica --- .../Dialogs/PvsCacheConfigurationDialog.cs | 5 ++++- .../Dialogs/PvsCacheConfigurationDialog.resx | 10 ++++----- .../PvsPages/PvsCacheConfigurationPage.resx | 8 +++---- XenModel/Messages.Designer.cs | 21 +++++++++++++------ XenModel/Messages.resx | 15 +++++++------ 5 files changed, 37 insertions(+), 22 deletions(-) diff --git a/XenAdmin/Dialogs/PvsCacheConfigurationDialog.cs b/XenAdmin/Dialogs/PvsCacheConfigurationDialog.cs index 02d0bf19f..d051104b6 100644 --- a/XenAdmin/Dialogs/PvsCacheConfigurationDialog.cs +++ b/XenAdmin/Dialogs/PvsCacheConfigurationDialog.cs @@ -159,9 +159,12 @@ namespace XenAdmin.Dialogs } // show confirmation dialog + var message = site != null && !string.IsNullOrEmpty(site.PVS_uuid) + ? string.Format(Messages.CONFIRM_DELETE_PVS_SITE_IN_USE, siteName) + : string.Format(Messages.CONFIRM_DELETE_PVS_SITE, siteName); DialogResult dialogResult; using (var dlg = new ThreeButtonDialog( - new ThreeButtonDialog.Details(SystemIcons.Warning, string.Format(Messages.CONFIRM_DELETE_PVS_SITE, siteName), Messages.XENCENTER), + new ThreeButtonDialog.Details(SystemIcons.Warning, message, Messages.XENCENTER), ThreeButtonDialog.ButtonOK, ThreeButtonDialog.ButtonCancel)) { diff --git a/XenAdmin/Dialogs/PvsCacheConfigurationDialog.resx b/XenAdmin/Dialogs/PvsCacheConfigurationDialog.resx index 70e13d96d..28aa80fde 100644 --- a/XenAdmin/Dialogs/PvsCacheConfigurationDialog.resx +++ b/XenAdmin/Dialogs/PvsCacheConfigurationDialog.resx @@ -139,19 +139,19 @@ NoControl - 194, 111 + 172, 111 5, 0, 3, 0 - 156, 25 + 199, 25 10 - A&dd Site for Caching + A&dd PVS Cache Configuration ImageBeforeText @@ -268,13 +268,13 @@ 5, 0, 3, 0 - 150, 25 + 199, 25 9 - A&dd Site for Caching + A&dd PVS Cache Configuration MiddleLeft diff --git a/XenAdmin/Dialogs/PvsPages/PvsCacheConfigurationPage.resx b/XenAdmin/Dialogs/PvsPages/PvsCacheConfigurationPage.resx index f76e308c5..381609a69 100644 --- a/XenAdmin/Dialogs/PvsPages/PvsCacheConfigurationPage.resx +++ b/XenAdmin/Dialogs/PvsPages/PvsCacheConfigurationPage.resx @@ -176,7 +176,7 @@ If Memory only is chosen, the allowed cache size depends on the server's Control NoControl - 255, 330 + 231, 330 3, 5, 3, 3 @@ -185,13 +185,13 @@ If Memory only is chosen, the allowed cache size depends on the server's Control 5, 0, 5, 0 - 182, 23 + 206, 23 6 - &Remove Cache Configuration + &Remove PVS Cache Configuration ImageBeforeText @@ -341,7 +341,7 @@ If Memory only is chosen, the allowed cache size depends on the server's Control NoControl - 127, 330 + 103, 330 3, 5, 3, 3 diff --git a/XenModel/Messages.Designer.cs b/XenModel/Messages.Designer.cs index 20c95cb74..e80a36156 100755 --- a/XenModel/Messages.Designer.cs +++ b/XenModel/Messages.Designer.cs @@ -403,7 +403,7 @@ namespace XenAdmin { } /// - /// Looks up a localized string similar to Configuring PVS site. + /// Looks up a localized string similar to Configuring PVS cache. /// public static string ACTION_CONFUGURE_PVS_SITE_DESCRIPTION { get { @@ -421,7 +421,7 @@ namespace XenAdmin { } /// - /// Looks up a localized string similar to Configure PVS site '{0}'. + /// Looks up a localized string similar to Configure PVS cache on '{0}'. /// public static string ACTION_CONFUGURE_PVS_SITE_TITLE { get { @@ -475,7 +475,7 @@ namespace XenAdmin { } /// - /// Looks up a localized string similar to Deleting PVS site. + /// Looks up a localized string similar to Deleting PVS cache configuration. /// public static string ACTION_DELETE_PVS_SITE_DESCRIPTION { get { @@ -493,7 +493,7 @@ namespace XenAdmin { } /// - /// Looks up a localized string similar to Deleting PVS site '{0}'. + /// Looks up a localized string similar to Deleting PVS cache configuration on '{0}'. /// public static string ACTION_DELETE_PVS_SITE_TITLE { get { @@ -943,7 +943,7 @@ namespace XenAdmin { } /// - /// Looks up a localized string similar to Enabling PVS read caching for VM '{0}' on site '{1}'. + /// Looks up a localized string similar to Enabling PVS read caching for VM '{0}' on '{1}'. /// public static string ACTION_ENABLE_PVS_READ_CACHING_FOR { get { @@ -7308,6 +7308,15 @@ namespace XenAdmin { } } + /// + /// Looks up a localized string similar to This configuration is in use by PVS. Are you sure you want to delete '{0}'?. + /// + public static string CONFIRM_DELETE_PVS_SITE_IN_USE { + get { + return ResourceManager.GetString("CONFIRM_DELETE_PVS_SITE_IN_USE", resourceCulture); + } + } + /// /// Looks up a localized string similar to Are you sure you want to delete the tag '{0}' from all managed resources?. /// @@ -28003,7 +28012,7 @@ namespace XenAdmin { } /// - /// Looks up a localized string similar to This PVS site cannot be removed because it contains running proxies.. + /// Looks up a localized string similar to This PVS cache configuration cannot be removed because it contains running proxies.. /// public static string PVS_SITE_CANNOT_BE_REMOVED { get { diff --git a/XenModel/Messages.resx b/XenModel/Messages.resx index 7bb3f958e..8933e11f4 100755 --- a/XenModel/Messages.resx +++ b/XenModel/Messages.resx @@ -232,13 +232,13 @@ Clean up disk space - Configuring PVS site + Configuring PVS cache Configured - Configure PVS site '{0}' + Configure PVS cache on '{0}' Creating {0} ... @@ -256,13 +256,13 @@ Deactivating Multiple Virtual Disks - Deleting PVS site + Deleting PVS cache configuration Done - Deleting PVS site '{0}' + Deleting PVS cache configuration on '{0}' Deleting storage items... @@ -415,7 +415,7 @@ Enable PVS read caching - Enabling PVS read caching for VM '{0}' on site '{1}' + Enabling PVS read caching for VM '{0}' on '{1}' Enabling @@ -2655,6 +2655,9 @@ Do you want to continue? Are you sure you want to delete '{0}'? + + Are you sure you want to delete '{0}'? This configuration is in use by PVS. + Are you sure you want to delete the tag '{0}' from all managed resources? @@ -9737,7 +9740,7 @@ Press OK to continue the wizard and return to the server and follow the instruct Not configured - This PVS site cannot be removed because it contains running proxies. + This PVS cache configuration cannot be removed because there are VMs that are streamed from this site. PVS Servers on site {0}'