Fix the quoestion of cannot soft by pull time

Signed-off-by: Yogi_Wang <yawang@vmware.com>
This commit is contained in:
Yogi_Wang 2019-11-05 14:05:24 +08:00
parent 473b453616
commit 143f2a13b7
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;
@ -133,14 +133,14 @@ export class TagComponent implements OnInit, AfterViewInit {
};
filterOneLabel: Label = this.initFilter;
@ViewChild("confirmationDialog", {static: false})
@ViewChild("confirmationDialog", { static: false })
confirmationDialog: ConfirmationDialogComponent;
@ViewChild("imageNameInput", {static: false})
@ViewChild("imageNameInput", { static: false })
imageNameInput: ImageNameInputComponent;
@ViewChild("digestTarget", {static: false}) textInput: ElementRef;
@ViewChild("copyInput", {static: false}) copyInput: CopyInputComponent;
@ViewChild("digestTarget", { static: false }) textInput: ElementRef;
@ViewChild("copyInput", { static: false }) copyInput: CopyInputComponent;
pageSize: number = DEFAULT_PAGE_SIZE;
currentPage = 1;
@ -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);