Browse Source

feat(component): implement data provider status component

pull/4998/head
KenTandrian 1 week ago
committed by Thomas Kaul
parent
commit
08c3b9460e
  1. 11
      apps/client/src/app/components/admin-settings/admin-settings.component.html
  2. 8
      apps/client/src/app/components/admin-settings/admin-settings.component.ts
  3. 2
      apps/client/src/app/components/admin-settings/admin-settings.module.ts

11
apps/client/src/app/components/admin-settings/admin-settings.component.html

@ -85,6 +85,15 @@
</td>
</ng-container>
<ng-container matColumnDef="status">
<th *matHeaderCellDef class="px-1 py-2 text-center" mat-header-cell>
<ng-container i18n>Status</ng-container>
</th>
<td *matCellDef="let element" class="px-1 py-2 text-center" mat-cell>
<gf-data-provider-status [dataSource]="element.dataSource" />
</td>
</ng-container>
<ng-container matColumnDef="assetProfileCount">
<th *matHeaderCellDef class="px-1 py-2 text-right" mat-header-cell>
<ng-container i18n>Asset Profiles</ng-container>
@ -98,7 +107,7 @@
</td>
</ng-container>
<ng-container matColumnDef="status">
<ng-container matColumnDef="usage">
<th *matHeaderCellDef class="px-1 py-2" mat-header-cell></th>
<td *matCellDef="let element" class="px-1 py-2" mat-cell>
@if (isGhostfolioDataProvider(element)) {

8
apps/client/src/app/components/admin-settings/admin-settings.component.ts

@ -32,7 +32,13 @@ import { catchError, filter, of, Subject, takeUntil } from 'rxjs';
export class AdminSettingsComponent implements OnDestroy, OnInit {
public dataSource = new MatTableDataSource<DataProviderInfo>();
public defaultDateFormat: string;
public displayedColumns = ['name', 'assetProfileCount', 'status', 'actions'];
public displayedColumns = [
'name',
'status',
'assetProfileCount',
'usage',
'actions'
];
public ghostfolioApiStatus: DataProviderGhostfolioStatusResponse;
public isGhostfolioApiKeyValid: boolean;
public isLoading = false;

2
apps/client/src/app/components/admin-settings/admin-settings.module.ts

@ -1,5 +1,6 @@
import { GfAdminPlatformModule } from '@ghostfolio/client/components/admin-platform/admin-platform.module';
import { GfAdminTagModule } from '@ghostfolio/client/components/admin-tag/admin-tag.module';
import { GfDataProviderStatusComponent } from '@ghostfolio/client/components/data-provider-status/data-provider-status.component';
import { GfEntityLogoComponent } from '@ghostfolio/ui/entity-logo';
import { GfPremiumIndicatorComponent } from '@ghostfolio/ui/premium-indicator';
import { GfValueComponent } from '@ghostfolio/ui/value';
@ -22,6 +23,7 @@ import { AdminSettingsComponent } from './admin-settings.component';
CommonModule,
GfAdminPlatformModule,
GfAdminTagModule,
GfDataProviderStatusComponent,
GfEntityLogoComponent,
GfPremiumIndicatorComponent,
GfValueComponent,

Loading…
Cancel
Save