mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-19 23:28:20 +01:00
Fix error in Harbor
Signed-off-by: Yogi_Wang <yawang@vmware.com>
This commit is contained in:
parent
c0497c1a8d
commit
2134492587
@ -52,10 +52,10 @@ export class ImageNameInputComponent implements OnInit, OnDestroy {
|
||||
const prolist: any = this.proService.listProjects(name, undefined);
|
||||
if (prolist.subscribe) {
|
||||
prolist.subscribe(response => {
|
||||
if (response) {
|
||||
this.selectedProjectList = response.slice(0, 10);
|
||||
if (response.body) {
|
||||
this.selectedProjectList = response.body.slice(0, 10);
|
||||
// if input project name exist in the project list
|
||||
let exist = response.find((data: any) => data.name === name);
|
||||
let exist = response.body.find((data: any) => data.name === name);
|
||||
if (!exist) {
|
||||
this.noProjectInfo = "REPLICATION.NO_PROJECT_INFO";
|
||||
} else {
|
||||
|
@ -39,7 +39,9 @@ export class ResultGridComponent implements OnInit {
|
||||
this.scanningService.getVulnerabilityScanningResults(repositoryId, tagId)
|
||||
.subscribe((results: VulnerabilityItem[]) => {
|
||||
this.dataCache = results;
|
||||
this.scanningResults = this.dataCache.filter((item: VulnerabilityItem) => item.id !== '');
|
||||
if (results) {
|
||||
this.scanningResults = this.dataCache.filter((item: VulnerabilityItem) => item.id !== '');
|
||||
}
|
||||
}, error => { this.errorHandler.error(error); });
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,7 @@
|
||||
<clr-dg-cell>{{user.creation_time | date: 'short'}}</clr-dg-cell>
|
||||
</clr-dg-row>
|
||||
<clr-dg-footer>
|
||||
<span *ngIf="pagination.totalItems">{{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} {{'USER.OF' | translate }}</span>
|
||||
<span *ngIf="totalCount">{{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} {{'USER.OF' | translate }}</span>
|
||||
{{pagination.totalItems}} {{'USER.ITEMS' | translate }}
|
||||
<clr-dg-pagination #pagination [clrDgPageSize]="pageSize" [(clrDgPage)]="currentPage" [clrDgTotalItems]="totalCount">
|
||||
</clr-dg-pagination>
|
||||
|
Loading…
Reference in New Issue
Block a user