mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-23 17:17:46 +01:00
Add the sortBy width push time and pull time of tags
Signed-off-by: Yogi_Wang <yawang@vmware.com>
This commit is contained in:
parent
8701007714
commit
26483836b3
@ -85,8 +85,8 @@
|
||||
<clr-dg-column [clrDgSortBy]="createdComparator">{{'REPOSITORY.CREATED' | translate}}</clr-dg-column>
|
||||
<clr-dg-column [clrDgField]="'docker_version'" *ngIf="!withClair">{{'REPOSITORY.DOCKER_VERSION' | translate}}</clr-dg-column>
|
||||
<clr-dg-column *ngIf="!withAdmiral">{{'REPOSITORY.LABELS' | translate}}</clr-dg-column>
|
||||
<clr-dg-column>{{'REPOSITORY.PUSH_TIME' | translate}}</clr-dg-column>
|
||||
<clr-dg-column>{{'REPOSITORY.PULL_TIME' | translate}}</clr-dg-column>
|
||||
<clr-dg-column [clrDgSortBy]="pushComparator">{{'REPOSITORY.PUSH_TIME' | translate}}</clr-dg-column>
|
||||
<clr-dg-column [clrDgSortBy]="pullComparator">{{'REPOSITORY.PULL_TIME' | translate}}</clr-dg-column>
|
||||
<clr-dg-placeholder>{{'TAG.PLACEHOLDER' | translate }}</clr-dg-placeholder>
|
||||
<clr-dg-row *clrDgItems="let t of tags" [clrDgItem]='t'>
|
||||
<clr-dg-cell class="truncated flex-max-width">
|
||||
|
@ -107,6 +107,8 @@ export class TagComponent implements OnInit, AfterViewInit {
|
||||
showlabel: boolean;
|
||||
|
||||
createdComparator: Comparator<Tag> = new CustomComparator<Tag>("created", "date");
|
||||
pullComparator: Comparator<Tag> = new CustomComparator<Tag>("pull_time", "date");
|
||||
pushComparator: Comparator<Tag> = new CustomComparator<Tag>("push_time", "date");
|
||||
|
||||
loading = false;
|
||||
copyFailed = false;
|
||||
@ -272,7 +274,7 @@ export class TagComponent implements OnInit, AfterViewInit {
|
||||
this.tags = doFiltering<Tag>(tags, state);
|
||||
this.tags = doSorting<Tag>(this.tags, state);
|
||||
this.tags = this.tags.map(tag => {
|
||||
tag.push_time = tag.push_time === AVAILABLE_TIME ? '' : tag.push_time;
|
||||
tag.pull_time = tag.pull_time === AVAILABLE_TIME ? '' : tag.pull_time;
|
||||
return tag;
|
||||
});
|
||||
this.loading = false;
|
||||
@ -543,7 +545,7 @@ export class TagComponent implements OnInit, AfterViewInit {
|
||||
}
|
||||
});
|
||||
this.tags = items.map(tag => {
|
||||
tag.push_time = tag.push_time === AVAILABLE_TIME ? '' : tag.push_time;
|
||||
tag.pull_time = tag.pull_time === AVAILABLE_TIME ? '' : tag.pull_time;
|
||||
return tag;
|
||||
});
|
||||
let signedName: { [key: string]: string[] } = {};
|
||||
|
Loading…
Reference in New Issue
Block a user