[
https://issues.apache.org/jira/browse/KNOX-2950?focusedWorklogId=882876&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-882876
]
ASF GitHub Bot logged work on KNOX-2950:
----------------------------------------
Author: ASF GitHub Bot
Created on: 02/Oct/23 11:22
Start Date: 02/Oct/23 11:22
Worklog Time Spent: 10m
Work Description: 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.
Issue Time Tracking
-------------------
Worklog Id: (was: 882876)
Time Spent: 0.5h (was: 20m)
> Token generation should be reachable using the old URL
> ------------------------------------------------------
>
> Key: KNOX-2950
> URL: https://issues.apache.org/jira/browse/KNOX-2950
> Project: Apache Knox
> Issue Type: Bug
> Components: TokenGenerationUI
> Reporter: Sandor Molnar
> Assignee: Sandor Molnar
> Priority: Major
> Fix For: 2.1.0
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> With KNOX-2811, the token generation UI's URL is changed from
> {{'.../tokengen/index.html'}} to {{'.../token-generation/index.html'}}. The
> idea was that clients will use the Knox Home page to go to that particular
> UI. However, it might be the case that other 3rd party tools have that link
> hard-coded.
> So it'd be nice to reach the same UI with an additional context with the old
> name ({{tokengen}}).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)