Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend success message after enabling monitoring #7348

Merged
merged 3 commits into from
Aug 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9061,7 +9061,7 @@ Alternatively, you will want to download <strong>Incremental Channel Conte
</context-group>
</trans-unit>
<trans-unit id="system.entitle.added.monitoring_entitled" xml:space="preserve">
<source>&lt;strong&gt;Monitoring&lt;/strong&gt; type has been applied.&lt;br/&gt;&lt;strong&gt;Note:&lt;/strong&gt; Since you added the Monitoring system type we automatically assigned the Prometheus Exporters formula to the system. Please apply the &lt;a href="/rhn/manager/systems/details/highstate?sid={0}"&gt;Highstate&lt;/a&gt; in order to install and enable the Prometheus metrics exporters.</source>
<source>&lt;strong&gt;Monitoring&lt;/strong&gt; type has been applied.&lt;br/&gt;&lt;strong&gt;Note:&lt;/strong&gt; Since you added the Monitoring system type we automatically assigned the Prometheus Exporters formula to the system. Please apply the &lt;a href="/rhn/manager/systems/details/highstate?sid={0}"&gt;Highstate&lt;/a&gt; in order to install and enable the Prometheus metrics exporters.&lt;br/&gt;&lt;strong&gt;Note:&lt;/strong&gt; Please make sure to open the &lt;a href="/docs/{1}/installation-and-upgrade/ports.html#_external_client_ports">required network ports&lt;/a&gt; for all installed exporters.</source>
<context-group name="ctx">
<context context-type="sourcefile">/rhn/systems/details/Overview.do</context>
</context-group>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions java/spacewalk-java.changes.witek.update_monitoring_added
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Extend success message after adding monitoring property (bsc#1212168)
Loading