mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-20 23:57:42 +01:00
[fix] [replication] Success rate should be displayed as 0 when status is inprogress
1.[replication] sccess rate should be displayed as 0 when status is inprogress 2.[repository] fix get repo name error when the repo contains the project name field Signed-off-by: Yogi_Wang <yawang@vmware.com>
This commit is contained in:
parent
47e731d885
commit
de4793c52d
@ -122,7 +122,7 @@ export class RepositoryGridviewComponent implements OnChanges, OnInit, OnDestroy
|
|||||||
}
|
}
|
||||||
|
|
||||||
goIntoRepo(repoEvt: NewRepository): void {
|
goIntoRepo(repoEvt: NewRepository): void {
|
||||||
let linkUrl = ['harbor', 'projects', repoEvt.project_id, 'repositories', repoEvt.name.split(`${this.projectName}/`)[1]];
|
let linkUrl = ['harbor', 'projects', repoEvt.project_id, 'repositories', repoEvt.name.substr(this.projectName.length + 1)];
|
||||||
this.router.navigate(linkUrl);
|
this.router.navigate(linkUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -223,7 +223,7 @@ export class RepositoryGridviewComponent implements OnChanges, OnInit, OnDestroy
|
|||||||
operMessage.name = 'OPERATION.DELETE_REPO';
|
operMessage.name = 'OPERATION.DELETE_REPO';
|
||||||
operMessage.data.id = repo.id;
|
operMessage.data.id = repo.id;
|
||||||
operMessage.state = OperationState.progressing;
|
operMessage.state = OperationState.progressing;
|
||||||
repo.name = repo.name.split(`${this.projectName}/`)[1];
|
repo.name = repo.name.substr(this.projectName.length + 1);
|
||||||
operMessage.data.name = repo.name;
|
operMessage.data.name = repo.name;
|
||||||
|
|
||||||
this.operationService.publishInfo(operMessage);
|
this.operationService.publishInfo(operMessage);
|
||||||
|
@ -69,7 +69,7 @@ export class ListRepositoryROComponent implements OnInit, OnDestroy {
|
|||||||
public gotoLink(projectId: number, repoName: string): void {
|
public gotoLink(projectId: number, repoName: string): void {
|
||||||
this.searchTrigger.closeSearch(true);
|
this.searchTrigger.closeSearch(true);
|
||||||
let projectName = repoName.split('/')[0];
|
let projectName = repoName.split('/')[0];
|
||||||
let repositorieName = projectName ? repoName.split(`${projectName}/`)[1] : repoName;
|
let repositorieName = projectName ? repoName.substr(projectName.length + 1) : repoName;
|
||||||
let linkUrl = ['harbor', 'projects', projectId, 'repositories', repositorieName ];
|
let linkUrl = ['harbor', 'projects', projectId, 'repositories', repositorieName ];
|
||||||
this.router.navigate(linkUrl);
|
this.router.navigate(linkUrl);
|
||||||
}
|
}
|
||||||
|
@ -77,7 +77,7 @@
|
|||||||
<clr-dg-cell>{{j.start_time | date: 'short'}}</clr-dg-cell>
|
<clr-dg-cell>{{j.start_time | date: 'short'}}</clr-dg-cell>
|
||||||
<clr-dg-cell>{{getDuration(j)}}</clr-dg-cell>
|
<clr-dg-cell>{{getDuration(j)}}</clr-dg-cell>
|
||||||
<clr-dg-cell>
|
<clr-dg-cell>
|
||||||
{{(j.total > 0 ? j.succeed / j.total : 1)| percent }}
|
{{(j.status === 'InProgress'? (j.total > 0 ? j.succeed / j.total : 0): j.total > 0 ? j.succeed / j.total : 1)| percent }}
|
||||||
</clr-dg-cell>
|
</clr-dg-cell>
|
||||||
<clr-dg-cell>{{j.total}}</clr-dg-cell>
|
<clr-dg-cell>{{j.total}}</clr-dg-cell>
|
||||||
</clr-dg-row>
|
</clr-dg-row>
|
||||||
|
Loading…
Reference in New Issue
Block a user