diff --git a/src/portal/lib/src/image-name-input/image-name-input.component.ts b/src/portal/lib/src/image-name-input/image-name-input.component.ts index 30bd4e126..1a3170a62 100644 --- a/src/portal/lib/src/image-name-input/image-name-input.component.ts +++ b/src/portal/lib/src/image-name-input/image-name-input.component.ts @@ -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 { diff --git a/src/portal/lib/src/vulnerability-scanning/result-grid.component.ts b/src/portal/lib/src/vulnerability-scanning/result-grid.component.ts index 9ec18a35a..e9740bed8 100644 --- a/src/portal/lib/src/vulnerability-scanning/result-grid.component.ts +++ b/src/portal/lib/src/vulnerability-scanning/result-grid.component.ts @@ -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); }); } diff --git a/src/portal/src/app/user/user.component.html b/src/portal/src/app/user/user.component.html index 9e855c479..fcec60f99 100644 --- a/src/portal/src/app/user/user.component.html +++ b/src/portal/src/app/user/user.component.html @@ -33,7 +33,7 @@ {{user.creation_time | date: 'short'}} - {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} {{'USER.OF' | translate }} + {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} {{'USER.OF' | translate }} {{pagination.totalItems}} {{'USER.ITEMS' | translate }}