Feature/extend users table of admin control panel (#4076)

* Extend users table

* Update changelog
pull/4070/head^2
Thomas Kaul 2 days ago committed by GitHub
parent e4e05fac94
commit fc7e350cf7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## Unreleased
### Changed
- Extended the users table in the admin control panel
## 2.124.1 - 2024-11-25 ## 2.124.1 - 2024-11-25
### Fixed ### Fixed

@ -705,6 +705,7 @@ export class AdminService {
select: { select: {
activityCount: true, activityCount: true,
country: true, country: true,
dataProviderGhostfolioDailyRequests: true,
updatedAt: true updatedAt: true
} }
}, },
@ -740,6 +741,7 @@ export class AdminService {
subscription, subscription,
accountCount: _count.Account || 0, accountCount: _count.Account || 0,
country: Analytics?.country, country: Analytics?.country,
dailyApiRequests: Analytics?.dataProviderGhostfolioDailyRequests || 0,
lastActivity: Analytics?.updatedAt, lastActivity: Analytics?.updatedAt,
transactionCount: _count.Order || 0 transactionCount: _count.Order || 0
}; };

@ -60,6 +60,7 @@ export class AdminUsersComponent implements OnDestroy, OnInit {
'accounts', 'accounts',
'activities', 'activities',
'engagementPerDay', 'engagementPerDay',
'dailyApiRequests',
'lastRequest', 'lastRequest',
'actions' 'actions'
]; ];

@ -169,6 +169,27 @@
/> />
</td> </td>
</ng-container> </ng-container>
<ng-container matColumnDef="dailyApiRequests">
<th
*matHeaderCellDef
class="mat-mdc-header-cell px-1 py-2 text-right"
mat-header-cell
>
<ng-container i18n>API Requests Today</ng-container>
</th>
<td
*matCellDef="let element"
class="mat-mdc-cell px-1 py-2 text-right"
mat-cell
>
<gf-value
class="d-inline-block justify-content-end"
[locale]="user?.settings?.locale"
[precision]="0"
[value]="element.dailyApiRequests"
/>
</td>
</ng-container>
} }
@if (hasPermissionForSubscription) { @if (hasPermissionForSubscription) {

@ -6,6 +6,7 @@ export interface AdminUsers {
accountCount: number; accountCount: number;
country: string; country: string;
createdAt: Date; createdAt: Date;
dailyApiRequests: number;
engagement: number; engagement: number;
id: string; id: string;
lastActivity: Date; lastActivity: Date;

Loading…
Cancel
Save