mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-22 18:25:56 +01:00
Merge pull request #8800 from jwangyangls/pull-time-sort
Add the sortBy width push time and pull time of tags
This commit is contained in:
commit
8dd7530280
@ -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