diff --git a/client/stillbox/src/app/calls.ts b/client/stillbox/src/app/calls.ts index a38502f..2d0b89c 100644 --- a/client/stillbox/src/app/calls.ts +++ b/client/stillbox/src/app/calls.ts @@ -4,6 +4,7 @@ export interface CallRecord { audioURL: string | null; duration: number; systemId: number; + talkerAlias: string | null; tgid: number; incidents: number; // in incident } diff --git a/client/stillbox/src/app/calls/calls.component.html b/client/stillbox/src/app/calls/calls.component.html index 86ce14f..c7c6105 100644 --- a/client/stillbox/src/app/calls/calls.component.html +++ b/client/stillbox/src/app/calls/calls.component.html @@ -168,6 +168,10 @@ > + + Source + + Duration diff --git a/client/stillbox/src/app/calls/calls.component.ts b/client/stillbox/src/app/calls/calls.component.ts index 030180f..19a8ab5 100644 --- a/client/stillbox/src/app/calls/calls.component.ts +++ b/client/stillbox/src/app/calls/calls.component.ts @@ -1,7 +1,7 @@ import { Component, ElementRef, inject, ViewChild } from '@angular/core'; import { CommonModule, AsyncPipe } from '@angular/common'; import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; -import { MatTable, MatTableModule } from '@angular/material/table'; +import { MatTableModule } from '@angular/material/table'; import { MatPaginator, MatPaginatorModule, @@ -19,6 +19,7 @@ import { DatePipe, DownloadURLPipe, FixedPointPipe, + TalkerPipe, TalkgroupPipe, TimePipe, } from './calls.service'; @@ -57,6 +58,7 @@ const reqPageSize = 200; MatIconModule, FixedPointPipe, TalkgroupPipe, + TalkerPipe, TimePipe, DatePipe, MatPaginatorModule, @@ -95,6 +97,7 @@ export class CallsComponent { 'system', 'group', 'talkgroup', + 'talker', 'duration', ]; curPage = { pageIndex: 0, pageSize: 0 }; diff --git a/client/stillbox/src/app/calls/calls.service.ts b/client/stillbox/src/app/calls/calls.service.ts index 570563f..a90ed08 100644 --- a/client/stillbox/src/app/calls/calls.service.ts +++ b/client/stillbox/src/app/calls/calls.service.ts @@ -27,6 +27,21 @@ export class DatePipe implements PipeTransform { } } +@Pipe({ + name: 'talker', + standalone: true, + pure: true, +}) +export class TalkerPipe implements PipeTransform { + transform(call: CallRecord, args?: any): string { + if (call.talkerAlias != null) { + return call.talkerAlias; + } + + return '—'; + } +} + @Pipe({ name: 'time', standalone: true,