zeroflag commented on code in PR #787:
URL: https://github.com/apache/knox/pull/787#discussion_r1342507778


##########
gateway-server/src/main/java/org/apache/knox/gateway/GatewayServer.java:
##########
@@ -933,6 +936,20 @@ private synchronized void internalActivateArchive( 
Topology topology, File warDi
     }
   }
 
+  private void processApplicationPathAliases(File warDir, Topology topology) {
+    final Map<String, Collection<String>> applicationPathAliases = 
config.getApplicationPathAliases();
+    if (!applicationPathAliases.isEmpty()) {

Review Comment:
   Why do we need the `isEmpty` before iterating over the map?



##########
knox-homepage-ui/home/app/homepage.service.ts:
##########
@@ -27,8 +27,10 @@ import {SessionInformation} from 
'./sessionInformation/session.information';
 
 @Injectable()
 export class HomepageService {
-    apiUrl = window.location.pathname.replace(new RegExp('home/.*'), 
'api/v1/metadata/');
-    sessionUrl = window.location.pathname.replace(new RegExp('home/.*'), 
'session/api/v1/sessioninfo');
+    pathParts = window.location.pathname.split('/');
+    topologyContext = '/' + this.pathParts[1] + '/' + this.pathParts[2] + '/';
+    apiUrl = this.topologyContext + 'api/v1/metadata/';
+    sessionUrl = this.topologyContext + 'session/api/v1/sessioninfo';
     generalProxyInformationUrl = this.apiUrl + 'info';
     publicCertUrl = this.apiUrl + 'publicCert?type=';
     topologiesUrl = this.apiUrl + 'topologies';

Review Comment:
   Are these changes relevant to this patch, or is this just refactoring of the 
existing code?



-- 
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.

To unsubscribe, e-mail: [email protected]

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

Reply via email to