Feature/introduce data gathering progress (#467)

* Add data gathering progress

* Update changelog
This commit is contained in:
Thomas Kaul
2021-11-13 11:32:28 +01:00
committed by GitHub
parent 9df8541145
commit a42700b9fe
6 changed files with 37 additions and 6 deletions

View File

@@ -22,6 +22,7 @@ import { takeUntil } from 'rxjs/operators';
})
export class AdminPageComponent implements OnDestroy, OnInit {
public dataGatheringInProgress: boolean;
public dataGatheringProgress: number;
public defaultDateFormat = DEFAULT_DATE_FORMAT;
public exchangeRates: { label1: string; label2: string; value: number }[];
public lastDataGathering: string;
@@ -134,12 +135,14 @@ export class AdminPageComponent implements OnDestroy, OnInit {
.pipe(takeUntil(this.unsubscribeSubject))
.subscribe(
({
dataGatheringProgress,
exchangeRates,
lastDataGathering,
transactionCount,
userCount,
users
}) => {
this.dataGatheringProgress = dataGatheringProgress;
this.exchangeRates = exchangeRates;
this.users = users;

View File

@@ -35,14 +35,15 @@
</div>
</div>
<div class="d-flex my-3">
<div class="w-50" i18n>Last Data Gathering</div>
<div class="w-50" i18n>Data Gathering</div>
<div class="w-50">
<div>
<ng-container *ngIf="lastDataGathering"
>{{ lastDataGathering }}</ng-container
>
<ng-container *ngIf="dataGatheringInProgress" i18n
>In Progress</ng-container
>In Progress ({{ dataGatheringProgress | percent : '1.2-2'
}})</ng-container
>
</div>
<div class="mt-2 overflow-hidden">