diff --git a/src/portal/lib/package.json b/src/portal/lib/package.json index ff9ca5fe5..649f623d0 100644 --- a/src/portal/lib/package.json +++ b/src/portal/lib/package.json @@ -1,6 +1,6 @@ { "name": "@harbor/ui", - "version": "1.7.1-rc1", + "version": "1.7.4-rc2", "description": "Harbor shared UI components based on Clarity and Angular6", "author": "CNCF", "module": "index.js", diff --git a/src/portal/lib/src/config/gc/gc-history/gc-history.component.html b/src/portal/lib/src/config/gc/gc-history/gc-history.component.html index d71057e4d..999619af0 100644 --- a/src/portal/lib/src/config/gc/gc-history/gc-history.component.html +++ b/src/portal/lib/src/config/gc/gc-history/gc-history.component.html @@ -13,7 +13,7 @@ {{job.createTime | date:'medium'}} {{job.updateTime | date:'medium'}} - + {{'GC.LATEST_JOBS' | translate :{param: jobs.length} }} diff --git a/src/portal/lib/src/config/gc/gc-history/gc-history.component.ts b/src/portal/lib/src/config/gc/gc-history/gc-history.component.ts index 29df7c888..bc6ffce97 100644 --- a/src/portal/lib/src/config/gc/gc-history/gc-history.component.ts +++ b/src/portal/lib/src/config/gc/gc-history/gc-history.component.ts @@ -13,7 +13,7 @@ export class GcHistoryComponent implements OnInit { constructor( private gcRepoService: GcRepoService, private gcViewModelFactory: GcViewModelFactory, - ) { } + ) {} ngOnInit() { this.getJobs(); @@ -25,4 +25,8 @@ export class GcHistoryComponent implements OnInit { }); } + getLogLink(id): string { + return this.gcRepoService.getLogLink(id); + } + } diff --git a/src/portal/lib/src/config/gc/gc.api.repository.ts b/src/portal/lib/src/config/gc/gc.api.repository.ts index 5cc5bbf7b..5cf1b64c7 100644 --- a/src/portal/lib/src/config/gc/gc.api.repository.ts +++ b/src/portal/lib/src/config/gc/gc.api.repository.ts @@ -17,6 +17,8 @@ export abstract class GcApiRepository { abstract getStatus(id): Observable; abstract getJobs(): Observable; + + abstract getLogLink(id): string; } @Injectable() @@ -61,4 +63,8 @@ export class GcApiDefaultRepository extends GcApiRepository { .pipe(map(response => response.json())); } + public getLogLink(id) { + return `${this.config.gcEndpoint}/${id}/log`; + } + } diff --git a/src/portal/lib/src/config/gc/gc.service.ts b/src/portal/lib/src/config/gc/gc.service.ts index 9bca2c3b2..b04232377 100644 --- a/src/portal/lib/src/config/gc/gc.service.ts +++ b/src/portal/lib/src/config/gc/gc.service.ts @@ -57,4 +57,8 @@ export class GcRepoService { return this.gcApiRepository.putSchedule(param); } + + public getLogLink(id): string { + return this.gcApiRepository.getLogLink(id); + } }