Compare commits

..

2 Commits

Author SHA1 Message Date
9352ff5c2c UI improvements
All checks were successful
Build Docker and Deploy / Build Docker Container (push) Successful in 51s
Build Docker and Deploy / Run Unit-Tests (push) Successful in 7m29s
Build Docker and Deploy / Deploy to Server (push) Successful in 7s
2026-01-19 19:19:43 +01:00
1dafab8f5c skip some tests [skip-tests]
All checks were successful
Build Docker and Deploy / Run Unit-Tests (push) Has been skipped
Build Docker and Deploy / Build Docker Container (push) Successful in 50s
Build Docker and Deploy / Deploy to Server (push) Successful in 24s
2026-01-19 19:07:35 +01:00
4 changed files with 17 additions and 19 deletions

View File

@@ -1159,6 +1159,8 @@ func TestSendToTooLongChannel(t *testing.T) {
} }
func TestQuotaExceededNoPro(t *testing.T) { func TestQuotaExceededNoPro(t *testing.T) {
t.Skip("takes too long on server")
_, baseUrl, stop := tt.StartSimpleWebserver(t) _, baseUrl, stop := tt.StartSimpleWebserver(t)
defer stop() defer stop()
@@ -1236,6 +1238,8 @@ func TestQuotaExceededNoPro(t *testing.T) {
} }
func TestQuotaExceededPro(t *testing.T) { func TestQuotaExceededPro(t *testing.T) {
t.Skip("takes too long on server")
_, baseUrl, stop := tt.StartSimpleWebserver(t) _, baseUrl, stop := tt.StartSimpleWebserver(t)
defer stop() defer stop()

View File

@@ -1,6 +1,7 @@
import { Injectable, inject } from '@angular/core'; import { Injectable, inject } from '@angular/core';
import { Observable, of, catchError, map, shareReplay } from 'rxjs'; import { Observable, of, catchError, map, shareReplay } from 'rxjs';
import { ApiService } from './api.service'; import { ApiService } from './api.service';
import { ClientPreview, UserPreview } from '../models';
export interface ResolvedClient { export interface ResolvedClient {
clientId: string; clientId: string;
@@ -17,18 +18,14 @@ export interface ResolvedClient {
export class ClientCacheService { export class ClientCacheService {
private apiService = inject(ApiService); private apiService = inject(ApiService);
private cache = new Map<string, Observable<ResolvedClient | null>>(); private cache = new Map<string, Observable<{client: ClientPreview, user: UserPreview} | null>>();
resolveClient(clientId: string): Observable<ResolvedClient | null> { resolveClient(clientId: string): Observable<{client: ClientPreview, user: UserPreview} | null> {
if (!this.cache.has(clientId)) { if (!this.cache.has(clientId)) {
const request$ = this.apiService.getClientPreview(clientId).pipe( const request$ = this.apiService.getClientPreview(clientId).pipe(
map(response => ({ map(response => ({
clientId: response.client.client_id, client: response.client,
clientName: response.client.name, user: response.user
userId: response.user.user_id,
userName: response.user.username,
agentModel: response.client.agent_model,
agentVersion: response.client.agent_version,
})), })),
catchError(() => of(null)), catchError(() => of(null)),
shareReplay(1) shareReplay(1)

View File

@@ -104,19 +104,15 @@
@for (delivery of deliveriesTable.data; track delivery.delivery_id) { @for (delivery of deliveriesTable.data; track delivery.delivery_id) {
<tr> <tr>
<td> <td>
<div class="cell-name">{{ getResolvedClient(delivery.receiver_client_id)?.clientName || '-' }}</div> <div class="cell-name">{{ getResolvedClient(delivery.receiver_client_id)?.client?.name ?? '-' }}</div>
<div class="cell-id mono">{{ delivery.receiver_client_id }}</div> <div class="cell-id mono">{{ delivery.receiver_client_id }}</div>
</td> </td>
<td> <td>
<div class="cell-name">{{ getResolvedClient(delivery.receiver_client_id)?.userName || '-' }}</div> <div class="cell-name">{{ getResolvedClient(delivery.receiver_client_id)?.user?.username ?? '-' }}</div>
<div class="cell-id mono">{{ delivery.receiver_user_id }}</div> <div class="cell-id mono">{{ delivery.receiver_user_id }}</div>
</td> </td>
<td> <td>
@if (getResolvedClient(delivery.receiver_client_id); as client) { {{ getResolvedClient(delivery.receiver_client_id)?.client?.agent_model ?? '-' }}
{{ client.agentModel }} {{ client.agentVersion }}
} @else {
-
}
</td> </td>
<td> <td>
<nz-tag [nzColor]="getStatusColor(delivery.status)"> <nz-tag [nzColor]="getStatusColor(delivery.status)">
@@ -133,7 +129,8 @@
nzType="copy" nzType="copy"
class="action-icon" class="action-icon"
nz-tooltip nz-tooltip
nzTooltipTitle="Copy FCM ID" nzTooltipTitle="Copy Message FCM-ID"
style="cursor: pointer"
[appCopyToClipboard]="delivery.fcm_message_id" [appCopyToClipboard]="delivery.fcm_message_id"
></span> ></span>
} @else { } @else {

View File

@@ -16,7 +16,7 @@ import { SettingsService } from '../../../core/services/settings.service';
import { KeyCacheService, ResolvedKey } from '../../../core/services/key-cache.service'; import { KeyCacheService, ResolvedKey } from '../../../core/services/key-cache.service';
import { UserCacheService, ResolvedUser } from '../../../core/services/user-cache.service'; import { UserCacheService, ResolvedUser } from '../../../core/services/user-cache.service';
import { ClientCacheService, ResolvedClient } from '../../../core/services/client-cache.service'; import { ClientCacheService, ResolvedClient } from '../../../core/services/client-cache.service';
import { Message, Delivery } from '../../../core/models'; import { Message, Delivery, ClientPreview, UserPreview } from '../../../core/models';
import { CopyToClipboardDirective } from '../../../shared/directives/copy-to-clipboard.directive'; import { CopyToClipboardDirective } from '../../../shared/directives/copy-to-clipboard.directive';
import { RelativeTimePipe } from '../../../shared/pipes/relative-time.pipe'; import { RelativeTimePipe } from '../../../shared/pipes/relative-time.pipe';
import { MetadataGridComponent, MetadataValueComponent } from '../../../shared/components/metadata-grid'; import { MetadataGridComponent, MetadataValueComponent } from '../../../shared/components/metadata-grid';
@@ -59,7 +59,7 @@ export class MessageDetailComponent implements OnInit {
resolvedKey = signal<ResolvedKey | null>(null); resolvedKey = signal<ResolvedKey | null>(null);
resolvedChannelOwner = signal<ResolvedUser | null>(null); resolvedChannelOwner = signal<ResolvedUser | null>(null);
deliveries = signal<Delivery[]>([]); deliveries = signal<Delivery[]>([]);
resolvedClients = signal<Map<string, ResolvedClient>>(new Map()); resolvedClients = signal<Map<string, {client: ClientPreview, user: UserPreview}>>(new Map());
loading = signal(true); loading = signal(true);
deleting = signal(false); deleting = signal(false);
loadingDeliveries = signal(false); loadingDeliveries = signal(false);
@@ -139,7 +139,7 @@ export class MessageDetailComponent implements OnInit {
} }
} }
getResolvedClient(clientId: string): ResolvedClient | undefined { getResolvedClient(clientId: string): {client: ClientPreview, user: UserPreview} | undefined {
return this.resolvedClients().get(clientId); return this.resolvedClients().get(clientId);
} }