mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-24 01:27:49 +01:00
Merge pull request #7599 from pureshine/hide-endtime
Display '-' if the end_time does not exist
This commit is contained in:
commit
f85870511d
@ -110,7 +110,7 @@
|
|||||||
<clr-dg-cell>{{t.operation}}</clr-dg-cell>
|
<clr-dg-cell>{{t.operation}}</clr-dg-cell>
|
||||||
<clr-dg-cell>{{t.status}}</clr-dg-cell>
|
<clr-dg-cell>{{t.status}}</clr-dg-cell>
|
||||||
<clr-dg-cell>{{t.start_time | date: 'short'}}</clr-dg-cell>
|
<clr-dg-cell>{{t.start_time | date: 'short'}}</clr-dg-cell>
|
||||||
<clr-dg-cell>{{t.end_time | date: 'short'}}</clr-dg-cell>
|
<clr-dg-cell>{{t.end_time ? (t.end_time | date: 'short') : "-"}}</clr-dg-cell>
|
||||||
<clr-dg-cell>
|
<clr-dg-cell>
|
||||||
<a target="_blank" [href]="viewLog(t.id)">
|
<a target="_blank" [href]="viewLog(t.id)">
|
||||||
<clr-icon shape="list"></clr-icon>
|
<clr-icon shape="list"></clr-icon>
|
||||||
|
@ -8,11 +8,7 @@ import { ErrorHandler } from "../../error-handler/error-handler";
|
|||||||
import { ReplicationJob, ReplicationTasks, Comparator, ReplicationJobItem, State } from "../../service/interface";
|
import { ReplicationJob, ReplicationTasks, Comparator, ReplicationJobItem, State } from "../../service/interface";
|
||||||
import { CustomComparator, DEFAULT_PAGE_SIZE, calculatePage, doFiltering, doSorting } from "../../utils";
|
import { CustomComparator, DEFAULT_PAGE_SIZE, calculatePage, doFiltering, doSorting } from "../../utils";
|
||||||
import { RequestQueryParams } from "../../service/RequestQueryParams";
|
import { RequestQueryParams } from "../../service/RequestQueryParams";
|
||||||
const taskStatus: any = {
|
const executionStatus = 'InProgress';
|
||||||
PENDING: "pending",
|
|
||||||
RUNNING: "running",
|
|
||||||
SCHEDULED: "scheduled"
|
|
||||||
};
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'replication-tasks',
|
selector: 'replication-tasks',
|
||||||
templateUrl: './replication-tasks.component.html',
|
templateUrl: './replication-tasks.component.html',
|
||||||
@ -73,7 +69,7 @@ export class ReplicationTasksComponent implements OnInit, OnDestroy {
|
|||||||
if (!this.timerDelay) {
|
if (!this.timerDelay) {
|
||||||
this.timerDelay = timer(10000, 10000).subscribe(() => {
|
this.timerDelay = timer(10000, 10000).subscribe(() => {
|
||||||
let count: number = 0;
|
let count: number = 0;
|
||||||
if (this.executions['in_progress'] > 0) {
|
if (this.executions['status'] === executionStatus) {
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
@ -180,9 +176,6 @@ export class ReplicationTasksComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public doSearch(value: string): void {
|
public doSearch(value: string): void {
|
||||||
if (!value) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.searchTask = value.trim();
|
this.searchTask = value.trim();
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.clrLoadTasks();
|
this.clrLoadTasks();
|
||||||
|
@ -246,9 +246,6 @@ export class ReplicationComponent implements OnInit, OnDestroy {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
public doSearchExecutions(terms: string): void {
|
public doSearchExecutions(terms: string): void {
|
||||||
if (!terms) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.currentTerm = terms.trim();
|
this.currentTerm = terms.trim();
|
||||||
// Trigger data loading and start from first page
|
// Trigger data loading and start from first page
|
||||||
this.jobsLoading = true;
|
this.jobsLoading = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user