oleewere closed pull request #44: AMBARI-24959. Log Search: show log level 
filters are enabled or disabled on /info/features endpoint
URL: https://github.com/apache/ambari-logsearch/pull/44
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/common/LogSearchConstants.java
 
b/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/common/LogSearchConstants.java
index 7db839f475..a0c5aa9c19 100644
--- 
a/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/common/LogSearchConstants.java
+++ 
b/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/common/LogSearchConstants.java
@@ -62,6 +62,7 @@
   public static final String SORT = "sort";
 
   // info features constants
+  public static final String LOG_LEVEL_FILTERS_KEY = "log_level_filters";
   public static final String SHIPPER_CONFIG_API_KEY = "metadata_patterns";
   public static final String AUTH_FEATURE_KEY = "auth";
 
diff --git 
a/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/manager/InfoManager.java
 
b/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/manager/InfoManager.java
index 3aabdbfcde..687bf0b577 100644
--- 
a/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/manager/InfoManager.java
+++ 
b/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/manager/InfoManager.java
@@ -81,6 +81,8 @@
     Map<String, Object> featuresMap = new HashMap<>();
     featuresMap.put(LogSearchConstants.AUTH_FEATURE_KEY, getAuthMap());
     featuresMap.put(LogSearchConstants.SHIPPER_CONFIG_API_KEY, 
logSearchConfigApiConfig.isConfigApiEnabled());
+    boolean logLevelFiltersEnabled = 
logSearchConfigApiConfig.isConfigApiEnabled() || 
logSearchConfigApiConfig.isSolrFilterStorage() || 
logSearchConfigApiConfig.isZkFilterStorage();
+    featuresMap.put(LogSearchConstants.LOG_LEVEL_FILTERS_KEY, 
logLevelFiltersEnabled);
     return featuresMap;
   }
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to