Browse Source

Task/improve style of settings tables in admin control panel (#7708)

* Improve style of settings table

* Update changelog
pull/7712/head
Thomas Kaul 4 days ago
committed by GitHub
parent
commit
b54e2ac144
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 3
      CHANGELOG.md
  2. 33
      apps/client/src/app/components/admin-platform/admin-platform.component.html
  3. 8
      apps/client/src/app/components/admin-platform/admin-platform.component.ts
  4. 26
      apps/client/src/app/components/admin-settings/admin-settings.component.html
  5. 1
      apps/client/src/app/components/admin-settings/admin-settings.component.ts
  6. 19
      apps/client/src/app/components/admin-tag/admin-tag.component.html

3
CHANGELOG.md

@ -13,6 +13,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed ### Changed
- Improved the style of the table in the data providers management of the admin control panel
- Improved the style of the table in the platform management of the admin control panel
- Improved the style of the table in the tag management of the admin control panel
- Improved the historical market data gathering by storing the market prices carried forward for the most recent dates without data from the data provider, distinguished by `isCarriedForward` - Improved the historical market data gathering by storing the market prices carried forward for the most recent dates without data from the data provider, distinguished by `isCarriedForward`
- Introduced a cooldown of 12 hours for the historical market data gathering of a symbol by retaining the completed jobs - Introduced a cooldown of 12 hours for the historical market data gathering of a symbol by retaining the completed jobs

33
apps/client/src/app/components/admin-platform/admin-platform.component.html

@ -9,34 +9,40 @@
Add Platform Add Platform
</a> </a>
</div> </div>
<table <div class="overflow-x-auto">
<table
class="gf-table w-100" class="gf-table w-100"
mat-table mat-table
matSort matSort
matSortActive="name" matSortActive="name"
matSortDirection="asc" matSortDirection="asc"
[dataSource]="dataSource" [dataSource]="dataSource"
> >
<ng-container matColumnDef="name"> <ng-container matColumnDef="icon" sticky>
<th *matHeaderCellDef class="px-1" mat-header-cell mat-sort-header="name"> <th *matHeaderCellDef class="px-1" mat-header-cell></th>
<ng-container i18n>Name</ng-container> <td *matCellDef="let element" class="px-1 text-center" mat-cell>
</th>
<td *matCellDef="let element" class="px-1" mat-cell>
<gf-entity-logo <gf-entity-logo
class="d-inline mr-1"
[hasPlaceholder]="true" [hasPlaceholder]="true"
[tooltip]="element.name" [tooltip]="element.name"
[url]="element.url" [url]="element.url"
/> />
<span>{{ element.name }}</span> </td>
</td></ng-container </ng-container>
>
<ng-container matColumnDef="name">
<th *matHeaderCellDef class="px-1" mat-header-cell mat-sort-header="name">
<ng-container i18n>Name</ng-container>
</th>
<td *matCellDef="let element" class="px-1 text-nowrap" mat-cell>
{{ element.name }}
</td>
</ng-container>
<ng-container matColumnDef="url"> <ng-container matColumnDef="url">
<th *matHeaderCellDef class="px-1" mat-header-cell mat-sort-header="url"> <th *matHeaderCellDef class="px-1" mat-header-cell mat-sort-header="url">
<ng-container i18n>Url</ng-container> <ng-container i18n>Url</ng-container>
</th> </th>
<td *matCellDef="let element" class="px-1" mat-cell> <td *matCellDef="let element" class="px-1 text-nowrap" mat-cell>
{{ element.url }} {{ element.url }}
</td> </td>
</ng-container> </ng-container>
@ -94,7 +100,8 @@
<tr *matHeaderRowDef="displayedColumns" mat-header-row></tr> <tr *matHeaderRowDef="displayedColumns" mat-header-row></tr>
<tr *matRowDef="let row; columns: displayedColumns" mat-row></tr> <tr *matRowDef="let row; columns: displayedColumns" mat-row></tr>
</table> </table>
</div>
<mat-paginator <mat-paginator
[class.d-none]="dataSource.data.length <= pageSize" [class.d-none]="dataSource.data.length <= pageSize"

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

@ -61,7 +61,13 @@ export class GfAdminPlatformComponent implements OnInit {
public readonly locale = input(getLocale()); public readonly locale = input(getLocale());
protected dataSource = new MatTableDataSource<Platform>(); protected dataSource = new MatTableDataSource<Platform>();
protected readonly displayedColumns = ['name', 'url', 'accounts', 'actions']; protected readonly displayedColumns = [
'icon',
'name',
'url',
'accounts',
'actions'
];
protected readonly pageSize = DEFAULT_PAGE_SIZE; protected readonly pageSize = DEFAULT_PAGE_SIZE;
protected platforms: Platform[]; protected platforms: Platform[];

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

@ -40,6 +40,7 @@
</mat-card-actions> </mat-card-actions>
</mat-card> </mat-card>
} }
<div class="overflow-x-auto">
<table <table
class="gf-table w-100" class="gf-table w-100"
mat-table mat-table
@ -48,6 +49,13 @@
matSortDirection="asc" matSortDirection="asc"
[dataSource]="dataSource" [dataSource]="dataSource"
> >
<ng-container matColumnDef="icon" sticky>
<th *matHeaderCellDef class="px-1" mat-header-cell></th>
<td *matCellDef="let element" class="px-1 text-center" mat-cell>
<gf-entity-logo [hasPlaceholder]="true" [url]="element.url" />
</td>
</ng-container>
<ng-container matColumnDef="name"> <ng-container matColumnDef="name">
<th <th
*matHeaderCellDef *matHeaderCellDef
@ -57,14 +65,7 @@
> >
<ng-container i18n>Name</ng-container> <ng-container i18n>Name</ng-container>
</th> </th>
<td *matCellDef="let element" class="px-1" mat-cell> <td *matCellDef="let element" class="px-1 text-nowrap" mat-cell>
<div class="d-flex align-items-center">
<gf-entity-logo
class="mr-1"
[hasPlaceholder]="true"
[url]="element.url"
/>
<div>
@if (isGhostfolioDataProvider(element)) { @if (isGhostfolioDataProvider(element)) {
<a <a
class="align-items-center d-inline-flex" class="align-items-center d-inline-flex"
@ -98,8 +99,6 @@
} @else { } @else {
{{ element.name }} {{ element.name }}
} }
</div>
</div>
</td> </td>
</ng-container> </ng-container>
@ -149,7 +148,9 @@
) { ) {
<div <div
[matTooltip]="ghostfolioApiStatusTooltip" [matTooltip]="ghostfolioApiStatusTooltip"
[matTooltipDisabled]="!ghostfolioApiStatus.isWithinSetupPeriod" [matTooltipDisabled]="
!ghostfolioApiStatus.isWithinSetupPeriod
"
> >
<mat-progress-bar <mat-progress-bar
mode="determinate" mode="determinate"
@ -199,7 +200,7 @@
</mat-menu> </mat-menu>
} @else if (hasGhostfolioApiKey === false) { } @else if (hasGhostfolioApiKey === false) {
<button <button
class="special" class="special text-nowrap"
mat-flat-button mat-flat-button
(click)="onSetGhostfolioApiKey()" (click)="onSetGhostfolioApiKey()"
> >
@ -213,6 +214,7 @@
<tr *matHeaderRowDef="displayedColumns" mat-header-row></tr> <tr *matHeaderRowDef="displayedColumns" mat-header-row></tr>
<tr *matRowDef="let row; columns: displayedColumns" mat-row></tr> <tr *matRowDef="let row; columns: displayedColumns" mat-row></tr>
</table> </table>
</div>
@if (isLoading) { @if (isLoading) {
<ngx-skeleton-loader <ngx-skeleton-loader
animation="pulse" animation="pulse"

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

@ -76,6 +76,7 @@ export class GfAdminSettingsComponent implements OnInit {
public dataSource = new MatTableDataSource<DataProviderInfo>(); public dataSource = new MatTableDataSource<DataProviderInfo>();
public defaultDateFormat: string; public defaultDateFormat: string;
public displayedColumns = [ public displayedColumns = [
'icon',
'name', 'name',
'status', 'status',
'assetProfileCount', 'assetProfileCount',

19
apps/client/src/app/components/admin-tag/admin-tag.component.html

@ -9,28 +9,34 @@
Add Tag Add Tag
</a> </a>
</div> </div>
<table <div class="overflow-x-auto">
<table
class="gf-table w-100" class="gf-table w-100"
mat-table mat-table
matSort matSort
matSortActive="name" matSortActive="name"
matSortDirection="asc" matSortDirection="asc"
[dataSource]="dataSource" [dataSource]="dataSource"
> >
<ng-container matColumnDef="name"> <ng-container matColumnDef="name">
<th *matHeaderCellDef class="px-1" mat-header-cell mat-sort-header="name"> <th *matHeaderCellDef class="px-1" mat-header-cell mat-sort-header="name">
<ng-container i18n>Name</ng-container> <ng-container i18n>Name</ng-container>
</th> </th>
<td *matCellDef="let element" class="px-1" mat-cell> <td *matCellDef="let element" class="px-1 text-nowrap" mat-cell>
{{ translate(element.name) }} {{ translate(element.name) }}
</td> </td>
</ng-container> </ng-container>
<ng-container matColumnDef="userId"> <ng-container matColumnDef="userId">
<th *matHeaderCellDef class="px-1" mat-header-cell mat-sort-header="userId"> <th
*matHeaderCellDef
class="px-1"
mat-header-cell
mat-sort-header="userId"
>
<ng-container i18n>User</ng-container> <ng-container i18n>User</ng-container>
</th> </th>
<td *matCellDef="let element" class="px-1" mat-cell> <td *matCellDef="let element" class="px-1 text-nowrap" mat-cell>
<span class="text-monospace">{{ element.userId }}</span> <span class="text-monospace">{{ element.userId }}</span>
</td> </td>
</ng-container> </ng-container>
@ -114,7 +120,8 @@
<tr *matHeaderRowDef="displayedColumns" mat-header-row></tr> <tr *matHeaderRowDef="displayedColumns" mat-header-row></tr>
<tr *matRowDef="let row; columns: displayedColumns" mat-row></tr> <tr *matRowDef="let row; columns: displayedColumns" mat-row></tr>
</table> </table>
</div>
<mat-paginator <mat-paginator
[class.d-none]="dataSource.data.length <= pageSize" [class.d-none]="dataSource.data.length <= pageSize"

Loading…
Cancel
Save