mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-23 18:55:18 +01:00
use endpoint for gc log
Signed-off-by: Meina Zhou <meinaz@vmware.com>
This commit is contained in:
parent
9bd2de3e35
commit
f0d9b41bf5
@ -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",
|
||||
|
@ -13,7 +13,7 @@
|
||||
<clr-dg-cell>{{job.createTime | date:'medium'}}</clr-dg-cell>
|
||||
<clr-dg-cell>{{job.updateTime | date:'medium'}}</clr-dg-cell>
|
||||
<clr-dg-cell>
|
||||
<a *ngIf="job.status.toLowerCase() === 'finished' || job.status.toLowerCase() === 'error'" target="_blank" href="/api/system/gc/{{job.id}}/log"><clr-icon shape="list"></clr-icon></a>
|
||||
<a *ngIf="job.status.toLowerCase() === 'finished' || job.status.toLowerCase() === 'error'" target="_blank" [href]="getLogLink(job.id)"><clr-icon shape="list"></clr-icon></a>
|
||||
</clr-dg-cell>
|
||||
</clr-dg-row>
|
||||
<clr-dg-footer>{{'GC.LATEST_JOBS' | translate :{param: jobs.length} }}</clr-dg-footer>
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -17,6 +17,8 @@ export abstract class GcApiRepository {
|
||||
abstract getStatus(id): Observable<any>;
|
||||
|
||||
abstract getJobs(): Observable<any>;
|
||||
|
||||
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`;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -57,4 +57,8 @@ export class GcRepoService {
|
||||
|
||||
return this.gcApiRepository.putSchedule(param);
|
||||
}
|
||||
|
||||
public getLogLink(id): string {
|
||||
return this.gcApiRepository.getLogLink(id);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user