smolnar82 commented on code in PR #787:
URL: https://github.com/apache/knox/pull/787#discussion_r1342566676
##########
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:
This is relevant. As you can see, other UIs were revised, and updated if
necessary, to get their URLs relative to the topology context and not rely on
hard-coded app names to be replaced.
Without this change the feature is not working.
--
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]