diff --git a/src/portal/lib/src/replication/replication-tasks/replication-tasks.component.html b/src/portal/lib/src/replication/replication-tasks/replication-tasks.component.html index 055aecaa7..d441c799b 100644 --- a/src/portal/lib/src/replication/replication-tasks/replication-tasks.component.html +++ b/src/portal/lib/src/replication/replication-tasks/replication-tasks.component.html @@ -110,7 +110,7 @@ {{t.operation}} {{t.status}} {{t.start_time | date: 'short'}} - {{t.end_time | date: 'short'}} + {{t.end_time ? (t.end_time | date: 'short') : "-"}} diff --git a/src/portal/lib/src/replication/replication-tasks/replication-tasks.component.ts b/src/portal/lib/src/replication/replication-tasks/replication-tasks.component.ts index 633e8d1df..bc5623101 100644 --- a/src/portal/lib/src/replication/replication-tasks/replication-tasks.component.ts +++ b/src/portal/lib/src/replication/replication-tasks/replication-tasks.component.ts @@ -8,11 +8,7 @@ import { ErrorHandler } from "../../error-handler/error-handler"; import { ReplicationJob, ReplicationTasks, Comparator, ReplicationJobItem, State } from "../../service/interface"; import { CustomComparator, DEFAULT_PAGE_SIZE, calculatePage, doFiltering, doSorting } from "../../utils"; import { RequestQueryParams } from "../../service/RequestQueryParams"; -const taskStatus: any = { - PENDING: "pending", - RUNNING: "running", - SCHEDULED: "scheduled" -}; +const executionStatus = 'InProgress'; @Component({ selector: 'replication-tasks', templateUrl: './replication-tasks.component.html', @@ -73,7 +69,7 @@ export class ReplicationTasksComponent implements OnInit, OnDestroy { if (!this.timerDelay) { this.timerDelay = timer(10000, 10000).subscribe(() => { let count: number = 0; - if (this.executions['in_progress'] > 0) { + if (this.executions['status'] === executionStatus) { count++; } if (count > 0) { @@ -180,9 +176,6 @@ export class ReplicationTasksComponent implements OnInit, OnDestroy { } public doSearch(value: string): void { - if (!value) { - return; - } this.searchTask = value.trim(); this.loading = true; this.clrLoadTasks(); diff --git a/src/portal/lib/src/replication/replication.component.ts b/src/portal/lib/src/replication/replication.component.ts index e75c58b87..6d2a9279f 100644 --- a/src/portal/lib/src/replication/replication.component.ts +++ b/src/portal/lib/src/replication/replication.component.ts @@ -246,9 +246,6 @@ export class ReplicationComponent implements OnInit, OnDestroy { ); } public doSearchExecutions(terms: string): void { - if (!terms) { - return; - } this.currentTerm = terms.trim(); // Trigger data loading and start from first page this.jobsLoading = true;