Merge pull request #9739 from jwangyangls/fix-pull-time-sort

Fix the bug of cannot soft by pull time
This commit is contained in:
jwangyangls 2019-11-08 11:27:43 +08:00 committed by GitHub
commit a2dcdf8948
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 14 deletions

View File

@ -154,7 +154,7 @@
<div class="cell">{{t.push_time | date: 'short'}}</div> <div class="cell">{{t.push_time | date: 'short'}}</div>
</clr-dg-cell> </clr-dg-cell>
<clr-dg-cell> <clr-dg-cell>
<div class="cell">{{t.pull_time | date: 'short'}}</div> <div class="cell">{{t.pull_time === availableTime ? "" : (t.pull_time| date: 'short')}}</div>
</clr-dg-cell> </clr-dg-cell>
</clr-dg-row> </clr-dg-row>
<clr-dg-footer> <clr-dg-footer>

View File

@ -91,7 +91,7 @@ export class TagComponent implements OnInit, AfterViewInit {
tags: Tag[]; tags: Tag[];
availableTime = AVAILABLE_TIME;
showTagManifestOpened: boolean; showTagManifestOpened: boolean;
retagDialogOpened: boolean; retagDialogOpened: boolean;
manifestInfoTitle: string; manifestInfoTitle: string;
@ -133,14 +133,14 @@ export class TagComponent implements OnInit, AfterViewInit {
}; };
filterOneLabel: Label = this.initFilter; filterOneLabel: Label = this.initFilter;
@ViewChild("confirmationDialog", {static: false}) @ViewChild("confirmationDialog", { static: false })
confirmationDialog: ConfirmationDialogComponent; confirmationDialog: ConfirmationDialogComponent;
@ViewChild("imageNameInput", {static: false}) @ViewChild("imageNameInput", { static: false })
imageNameInput: ImageNameInputComponent; imageNameInput: ImageNameInputComponent;
@ViewChild("digestTarget", {static: false}) textInput: ElementRef; @ViewChild("digestTarget", { static: false }) textInput: ElementRef;
@ViewChild("copyInput", {static: false}) copyInput: CopyInputComponent; @ViewChild("copyInput", { static: false }) copyInput: CopyInputComponent;
pageSize: number = DEFAULT_PAGE_SIZE; pageSize: number = DEFAULT_PAGE_SIZE;
currentPage = 1; currentPage = 1;
@ -273,10 +273,6 @@ export class TagComponent implements OnInit, AfterViewInit {
// Do filtering and sorting // Do filtering and sorting
this.tags = doFiltering<Tag>(tags, state); this.tags = doFiltering<Tag>(tags, state);
this.tags = doSorting<Tag>(this.tags, state); this.tags = doSorting<Tag>(this.tags, state);
this.tags = this.tags.map(tag => {
tag.pull_time = tag.pull_time === AVAILABLE_TIME ? '' : tag.pull_time;
return tag;
});
this.loading = false; this.loading = false;
}, error => { }, error => {
this.loading = false; this.loading = false;
@ -533,10 +529,7 @@ export class TagComponent implements OnInit, AfterViewInit {
signatures.push(t.name); signatures.push(t.name);
} }
}); });
this.tags = items.map(tag => { this.tags = items;
tag.pull_time = tag.pull_time === AVAILABLE_TIME ? '' : tag.pull_time;
return tag;
});
let signedName: { [key: string]: string[] } = {}; let signedName: { [key: string]: string[] } = {};
signedName[this.repoName] = signatures; signedName[this.repoName] = signatures;
this.signatureOutput.emit(signedName); this.signatureOutput.emit(signedName);