Improve accessory component (#16869)

Signed-off-by: AllForNothing <sshijun@vmware.com>
This commit is contained in:
Shijun Sun 2022-05-18 14:48:06 +08:00 committed by GitHub
parent b068515c53
commit 7596a7de5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 2 deletions

View File

@ -314,7 +314,18 @@
<div class="cell">
{{artifact.pull_time === availableTime ? "" : (artifact.pull_time| harborDatetime: 'short')}}</div>
</clr-dg-cell>
<sub-accessories (deleteAccessory)="deleteAccessory($event)" [projectName]="projectName" [repositoryName]="repoName" *ngIf="artifact?.accessories?.length" [total]="artifact?.accessoryNumber" [accessories]="artifact?.accessories" [clrIfExpanded]="false" ngProjectAs="clr-dg-row-detail"></sub-accessories>
<ng-container
ngProjectAs="clr-dg-row-detail"
*ngIf="artifact?.accessories?.length">
<sub-accessories
(deleteAccessory)="deleteAccessory($event)"
[projectName]="projectName"
[repositoryName]="repoName"
[artifactDigest]="artifact?.digest"
[total]="artifact?.accessoryNumber"
[accessories]="artifact?.accessories"
*clrIfExpanded></sub-accessories>
</ng-container>
</clr-dg-row>
<clr-dg-footer>
<clr-dg-pagination #pagination [clrDgTotalItems]="totalCount" [(clrDgPage)]="currentPage" [clrDgPageSize]="pageSize">

View File

@ -93,7 +93,7 @@ export class SubAccessoriesComponent implements OnInit {
projectName: this.projectName,
repositoryName: dbEncodeURIComponent(this.repositoryName),
reference: this.artifactDigest,
page: 1,
page: this.currentPage,
pageSize: ACCESSORY_PAGE_SIZE
};
this.newArtifactService.listAccessories(listTagParams)