mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-15 06:45:17 +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;
|
return this.systemInfo && this.systemInfo.has_ca_root;
|
||||||
}
|
}
|
||||||
|
|
||||||
getLink(repoEvt: NewRepository): string {
|
getLink(repoEvt: NewRepository) {
|
||||||
return `/harbor/projects/${repoEvt.project_id}/repositories/${repoEvt.name.substr(this.projectName.length + 1)}`;
|
return ['/harbor/projects', repoEvt.project_id, 'repositories', repoEvt.name.substr(this.projectName.length + 1)];
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnChanges(changes: SimpleChanges): void {
|
ngOnChanges(changes: SimpleChanges): void {
|
||||||
|
@ -36,7 +36,7 @@ export class ListRepositoryROComponent {
|
|||||||
getLink(projectId: number, repoName: string) {
|
getLink(projectId: number, repoName: string) {
|
||||||
let projectName = repoName.split('/')[0];
|
let projectName = repoName.split('/')[0];
|
||||||
let repositorieName = projectName ? repoName.substr(projectName.length + 1) : repoName;
|
let repositorieName = projectName ? repoName.substr(projectName.length + 1) : repoName;
|
||||||
return `/harbor/projects/${projectId}/repositories/${repositorieName}`;
|
return ['/harbor/projects', projectId, 'repositories', repositorieName];
|
||||||
}
|
}
|
||||||
getQueryParams() {
|
getQueryParams() {
|
||||||
if (this.sessionService.getCurrentUser()) {
|
if (this.sessionService.getCurrentUser()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user