Files
SimpleCloudNotifier/webapp/src/app/features/clients/client-list/client-list.component.html
Mike Schwörer 2b7950f5dc
All checks were successful
Build Docker and Deploy / Build Docker Container (push) Successful in 1m41s
Build Docker and Deploy / Run Unit-Tests (push) Successful in 9m31s
Build Docker and Deploy / Deploy to Server (push) Successful in 18s
More webapp changes+fixes
2025-12-05 21:39:32 +01:00

79 lines
2.5 KiB
HTML

<div class="page-content">
<div class="page-header">
<h2>Clients</h2>
<button nz-button (click)="loadClients()">
<span nz-icon nzType="reload"></span>
Refresh
</button>
</div>
<nz-card>
<nz-table
#clientTable
[nzData]="clients()"
[nzLoading]="loading()"
[nzShowPagination]="false"
[nzNoResult]="noResultTpl"
nzSize="middle"
>
<ng-template #noResultTpl></ng-template>
<thead>
<tr>
<th nzWidth="0"></th>
<th>Name</th>
<th nzWidth="0">Type</th>
<th nzWidth="0">Agent</th>
<th nzWidth="0">Created</th>
</tr>
</thead>
<tbody>
@for (client of clients(); track client.client_id) {
<tr class="clickable-row">
<td>
<a class="cell-link" [routerLink]="['/clients', client.client_id]">
<span
nz-icon
[nzType]="getClientIcon(client.type)"
nzTheme="outline"
class="client-icon"
></span>
</a>
</td>
<td>
<a class="cell-link" [routerLink]="['/clients', client.client_id]">
<div class="client-name">{{ client.name || '-' }}</div>
<div class="client-id mono">{{ client.client_id }}</div>
</a>
</td>
<td>
<a class="cell-link" [routerLink]="['/clients', client.client_id]">
<nz-tag>{{ getClientTypeLabel(client.type) }}</nz-tag>
</a>
</td>
<td>
<a class="cell-link" [routerLink]="['/clients', client.client_id]">
<div class="agent-info">
<span style="white-space: pre;">{{ client.agent_model }}</span>
<span style="white-space: pre;" class="agent-version">v{{ client.agent_version }}</span>
</div>
</a>
</td>
<td>
<a class="cell-link" [routerLink]="['/clients', client.client_id]">
<div class="timestamp-absolute">{{ client.timestamp_created | date:'yyyy-MM-dd HH:mm:ss' }}</div>
<div class="timestamp-relative">{{ client.timestamp_created | relativeTime }}</div>
</a>
</td>
</tr>
} @empty {
<tr>
<td colspan="5">
<nz-empty nzNotFoundContent="No clients registered"></nz-empty>
</td>
</tr>
}
</tbody>
</nz-table>
</nz-card>
</div>