smolnar82 commented on a change in pull request #430:
URL: https://github.com/apache/knox/pull/430#discussion_r609044290



##########
File path: 
gateway-server/src/main/java/org/apache/knox/gateway/config/impl/GatewayConfigImpl.java
##########
@@ -1209,4 +1211,23 @@ public long getKeystoreCacheEntryTimeToLiveInMinutes() {
   public boolean isGatewayServerIncomingXForwardedSupportEnabled() {
     return getBoolean(KNOX_INCOMING_XFORWARDED_ENABLED, true);
   }
+
+  @Override
+  public Map<String, Collection<String>> getHomePageProfiles() {
+    final Map<String, Collection<String>> profiles = 
getPreConfiguredProfiles(); // pre-configured profiles might be overwritten
+    this.forEach(config -> {
+      if (config.getKey().startsWith(KNOX_HOMEPAGE_PROFILE_PREFIX)) {
+        
profiles.put(config.getKey().substring(KNOX_HOMEPAGE_PROFILE_PREFIX.length()), 
getTrimmedStringCollection(config.getKey()));
+      }
+    });
+    return profiles;
+  }
+
+  private Map<String, Collection<String>> getPreConfiguredProfiles() {
+    final Map<String, Collection<String>> profiles = new HashMap<>();
+    profiles.put("full", Arrays.asList("gpi_version", "gpi_cert", 
"gpi_admin_ui", "gpi_admin_api", "gpi_md_api", "gpi_tokens"));

Review comment:
       Yepp; I'm going to figure out how to get rid of circular dependency and 
submit a new patch.

##########
File path: 
gateway-server/src/main/java/org/apache/knox/gateway/config/impl/GatewayConfigImpl.java
##########
@@ -1209,4 +1211,23 @@ public long getKeystoreCacheEntryTimeToLiveInMinutes() {
   public boolean isGatewayServerIncomingXForwardedSupportEnabled() {
     return getBoolean(KNOX_INCOMING_XFORWARDED_ENABLED, true);
   }
+
+  @Override
+  public Map<String, Collection<String>> getHomePageProfiles() {
+    final Map<String, Collection<String>> profiles = 
getPreConfiguredProfiles(); // pre-configured profiles might be overwritten
+    this.forEach(config -> {
+      if (config.getKey().startsWith(KNOX_HOMEPAGE_PROFILE_PREFIX)) {
+        
profiles.put(config.getKey().substring(KNOX_HOMEPAGE_PROFILE_PREFIX.length()), 
getTrimmedStringCollection(config.getKey()));
+      }
+    });
+    return profiles;
+  }
+
+  private Map<String, Collection<String>> getPreConfiguredProfiles() {
+    final Map<String, Collection<String>> profiles = new HashMap<>();
+    profiles.put("full", Arrays.asList("gpi_version", "gpi_cert", 
"gpi_admin_ui", "gpi_admin_api", "gpi_md_api", "gpi_tokens"));

Review comment:
       Yepp; I'm going to figure out how to get rid of circular dependency and 
submit a new patch.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to