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>
</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-row>
<clr-dg-footer>

View File

@ -91,7 +91,7 @@ export class TagComponent implements OnInit, AfterViewInit {
tags: Tag[];
availableTime = AVAILABLE_TIME;
showTagManifestOpened: boolean;
retagDialogOpened: boolean;
manifestInfoTitle: string;
@ -273,10 +273,6 @@ export class TagComponent implements OnInit, AfterViewInit {
// Do filtering and sorting
this.tags = doFiltering<Tag>(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;
}, error => {
this.loading = false;
@ -533,10 +529,7 @@ export class TagComponent implements OnInit, AfterViewInit {
signatures.push(t.name);
}
});
this.tags = items.map(tag => {
tag.pull_time = tag.pull_time === AVAILABLE_TIME ? '' : tag.pull_time;
return tag;
});
this.tags = items;
let signedName: { [key: string]: string[] } = {};
signedName[this.repoName] = signatures;
this.signatureOutput.emit(signedName);