diff --git a/java/code/src/com/redhat/rhn/frontend/action/systems/sdc/SystemDetailsEditAction.java b/java/code/src/com/redhat/rhn/frontend/action/systems/sdc/SystemDetailsEditAction.java index 144424e0c43e..748b4540694b 100644 --- a/java/code/src/com/redhat/rhn/frontend/action/systems/sdc/SystemDetailsEditAction.java +++ b/java/code/src/com/redhat/rhn/frontend/action/systems/sdc/SystemDetailsEditAction.java @@ -39,6 +39,7 @@ import com.suse.manager.maintenance.MaintenanceManager; import com.suse.manager.model.maintenance.MaintenanceSchedule; import com.suse.manager.webui.services.pillar.MinionPillarManager; +import com.suse.manager.webui.utils.UserPreferenceUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -296,9 +297,10 @@ private boolean applyAddonEntitlementChanges(HttpServletRequest request, log.debug("adding entitlement success msg"); if (ConfigDefaults.get().isDocAvailable()) { - createSuccessMessage(request, + createMessage(request, "system.entitle.added." + e.getLabel(), - s.getId().toString()); + s.getId().toString(), + GlobalInstanceHolder.USER_PREFERENCE_UTILS.getDocsLocale(user)); } else { createSuccessMessage(request, diff --git a/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml b/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml index cf6859a213dc..7d3c257f3c4c 100644 --- a/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml +++ b/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml @@ -9061,7 +9061,7 @@ Alternatively, you will want to download <strong>Incremental Channel Conte - <strong>Monitoring</strong> type has been applied.<br/><strong>Note:</strong> Since you added the Monitoring system type we automatically assigned the Prometheus Exporters formula to the system. Please apply the <a href="/rhn/manager/systems/details/highstate?sid={0}">Highstate</a> in order to install and enable the Prometheus metrics exporters. + <strong>Monitoring</strong> type has been applied.<br/><strong>Note:</strong> Since you added the Monitoring system type we automatically assigned the Prometheus Exporters formula to the system. Please apply the <a href="/rhn/manager/systems/details/highstate?sid={0}">Highstate</a> in order to install and enable the Prometheus metrics exporters.<br/><strong>Note:</strong> Please make sure to open the <a href="/docs/{1}/installation-and-upgrade/ports.html#_external_client_ports">required network ports</a> for all installed exporters. /rhn/systems/details/Overview.do diff --git a/java/code/src/com/suse/manager/webui/utils/UserPreferenceUtils.java b/java/code/src/com/suse/manager/webui/utils/UserPreferenceUtils.java index 7dc6c7cc852e..ca70e47c817a 100644 --- a/java/code/src/com/suse/manager/webui/utils/UserPreferenceUtils.java +++ b/java/code/src/com/suse/manager/webui/utils/UserPreferenceUtils.java @@ -104,6 +104,16 @@ public String getDocsLocale(PageContext pageContext) { HttpServletRequest request = (HttpServletRequest) pageContext.getRequest(); User user = new RequestContext(request).getCurrentUser(); + return getDocsLocale(user); + } + + /** + * Get the user's configured documentation locale. If no user is available return the config default + * + * @param user the current user + * @return the users documentation locale + */ + public String getDocsLocale(User user) { if (isUserAuthenticated(user)) { String locale = user.getPreferredDocsLocale(); if (locale != null) { diff --git a/java/spacewalk-java.changes b/java/spacewalk-java.changes index 26e605edb391..52517d8c4498 100644 --- a/java/spacewalk-java.changes +++ b/java/spacewalk-java.changes @@ -1,3 +1,4 @@ +- Extend success message after adding monitoring property (bsc#1212168) - show error message in action result even on parser error - cache debian package metadata snippets in DB - Fixed a bug that caused the tab Autoinstallation to hide when clicking on Power