mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-25 03:35:21 +01:00
Fix unescaped URL for repo links (#16092)
Signed-off-by: AllForNothing <sshijun@vmware.com>
This commit is contained in:
parent
5b7e684bc4
commit
eb8db3215c
@ -125,8 +125,8 @@ export class RepositoryGridviewComponent implements OnChanges, OnInit, OnDestroy
|
||||
return this.systemInfo && this.systemInfo.has_ca_root;
|
||||
}
|
||||
|
||||
getLink(repoEvt: NewRepository): string {
|
||||
return `/harbor/projects/${repoEvt.project_id}/repositories/${repoEvt.name.substr(this.projectName.length + 1)}`;
|
||||
getLink(repoEvt: NewRepository) {
|
||||
return ['/harbor/projects', repoEvt.project_id, 'repositories', repoEvt.name.substr(this.projectName.length + 1)];
|
||||
}
|
||||
|
||||
ngOnChanges(changes: SimpleChanges): void {
|
||||
|
@ -36,7 +36,7 @@ export class ListRepositoryROComponent {
|
||||
getLink(projectId: number, repoName: string) {
|
||||
let projectName = repoName.split('/')[0];
|
||||
let repositorieName = projectName ? repoName.substr(projectName.length + 1) : repoName;
|
||||
return `/harbor/projects/${projectId}/repositories/${repositorieName}`;
|
||||
return ['/harbor/projects', projectId, 'repositories', repositorieName];
|
||||
}
|
||||
getQueryParams() {
|
||||
if (this.sessionService.getCurrentUser()) {
|
||||
|
Loading…
Reference in New Issue
Block a user