|
|
@ -7,26 +7,121 @@ |
|
|
|
<div class="content-in-border"> |
|
|
|
<app-need-auth-to-continue *ngIf="!authService.isAuth()"></app-need-auth-to-continue> |
|
|
|
<div *ngIf="authService.isAuth()"> |
|
|
|
<table mat-table [dataSource]="dataSource" matSort style="width: 100%"> |
|
|
|
<div style="padding-bottom: 10px;"> |
|
|
|
<mat-chip-list> |
|
|
|
<mat-chip [matMenuTriggerFor]="addFilter">Искать по...</mat-chip> |
|
|
|
<mat-menu #addFilter> |
|
|
|
<button mat-menu-item>Имени</button> |
|
|
|
<button mat-menu-item [matMenuTriggerFor]="timeSelect">Времени</button> |
|
|
|
|
|
|
|
<ng-container matColumnDef="account_id"> |
|
|
|
<th mat-header-cell *matHeaderCellDef mat-sort-header> AccountId </th> |
|
|
|
<td mat-cell *matCellDef="let row"> {{row.account_id}} </td> |
|
|
|
|
|
|
|
<button mat-menu-item (click)="addServerToSearch()">Серверу</button> |
|
|
|
<button mat-menu-item>Содержимому</button> |
|
|
|
</mat-menu> |
|
|
|
<mat-menu #timeSelect> |
|
|
|
<button mat-menu-item (click)="addEndTimeToSearch()">До ...</button> |
|
|
|
<button mat-menu-item (click)="addBeginTimeToSearch()">После ...</button> |
|
|
|
</mat-menu> |
|
|
|
|
|
|
|
<mat-chip *ngIf="filter.updated" (click)="getMessages()">Обновить</mat-chip> |
|
|
|
<mat-chip |
|
|
|
*ngFor="let acId of filter.accounts" |
|
|
|
(removed)="removeAccountFromSearch(acId)">{{acId}} |
|
|
|
<button matChipRemove> |
|
|
|
<mat-icon>cancel</mat-icon> |
|
|
|
</button> |
|
|
|
</mat-chip> |
|
|
|
<mat-chip |
|
|
|
*ngIf="filter.message!=null" |
|
|
|
(removed)="removeMessageFromSearch()">Сообщение содержит: {{filter.message}} |
|
|
|
<button matChipRemove> |
|
|
|
<mat-icon>cancel</mat-icon> |
|
|
|
</button> |
|
|
|
</mat-chip> |
|
|
|
|
|
|
|
<mat-chip *ngIf="filter.serverId!=null" |
|
|
|
(removed)="removeServerFromSearch()" [matMenuTriggerFor]="serverSelect"> |
|
|
|
{{getServerName(filter.serverId)}} |
|
|
|
<button matChipRemove> |
|
|
|
<mat-icon>cancel</mat-icon> |
|
|
|
</button> |
|
|
|
<mat-menu #serverSelect> |
|
|
|
<button mat-menu-item *ngFor="let server of serverList" (click)="addServerToSearch(server.server_id)">{{server.name}}</button> |
|
|
|
</mat-menu> |
|
|
|
</mat-chip> |
|
|
|
|
|
|
|
<mat-chip |
|
|
|
*ngIf="filter.begin!=null" |
|
|
|
(removed)="removeBeginTimeFromSearch()" |
|
|
|
[matMenuTriggerFor]="dateBeginSelect"> |
|
|
|
Дата после {{filter.begin | date:"HH:mm dd/MM/yyyy"}} |
|
|
|
<button matChipRemove> |
|
|
|
<mat-icon>cancel</mat-icon> |
|
|
|
</button> |
|
|
|
<mat-menu #dateBeginSelect> |
|
|
|
<mat-form-field appearance="fill" |
|
|
|
(click)="$event.stopPropagation()"> |
|
|
|
<mat-label>Дата после</mat-label> |
|
|
|
<input matInput type="datetime-local" [(ngModel)]="filter.begin"> |
|
|
|
</mat-form-field> |
|
|
|
</mat-menu> |
|
|
|
</mat-chip> |
|
|
|
|
|
|
|
<mat-chip |
|
|
|
*ngIf="filter.end!=null" |
|
|
|
(removed)="removeEndTimeFromSearch()" |
|
|
|
[matMenuTriggerFor]="dateEndSelect"> |
|
|
|
Дата до {{filter.end | date:"HH:mm dd/MM/yyyy"}} |
|
|
|
<button matChipRemove> |
|
|
|
<mat-icon>cancel</mat-icon> |
|
|
|
</button> |
|
|
|
<mat-menu #dateEndSelect> |
|
|
|
<mat-form-field appearance="fill" |
|
|
|
(click)="$event.stopPropagation()"> |
|
|
|
<mat-label>Дата после</mat-label> |
|
|
|
<input matInput type="datetime-local" [(ngModel)]="filter.end"> |
|
|
|
</mat-form-field> |
|
|
|
</mat-menu> |
|
|
|
</mat-chip> |
|
|
|
</mat-chip-list> |
|
|
|
</div> |
|
|
|
|
|
|
|
<table mat-table [dataSource]="dataSource" style="width: 100%"> |
|
|
|
|
|
|
|
<ng-container matColumnDef="account_name"> |
|
|
|
<th mat-header-cell *matHeaderCellDef> Игрок </th> |
|
|
|
<td mat-cell *matCellDef="let row" [matMenuTriggerFor]="accountMenu"> {{row.account_name}} |
|
|
|
<mat-menu #accountMenu> |
|
|
|
<button mat-menu-item (click)="addAccountToSearch(row.account_name)">Добавить в поиск</button> |
|
|
|
<button mat-menu-item (click)="searchPlayer(row.account_name)">Открыть профиль</button> |
|
|
|
</mat-menu></td> |
|
|
|
</ng-container> |
|
|
|
|
|
|
|
<ng-container matColumnDef="date"> |
|
|
|
<th mat-header-cell *matHeaderCellDef mat-sort-header> Date </th> |
|
|
|
<td mat-cell *matCellDef="let row"> {{row.utime*1000 | date:"hh:mm:ss dd/MM/yyyy"}} </td> |
|
|
|
<th mat-header-cell *matHeaderCellDef> Дата </th> |
|
|
|
<td mat-cell *matCellDef="let row" [matMenuTriggerFor]="dateMenu"> {{row.utime*1000 | date:"HH:mm:ss dd/MM/yyyy"}} |
|
|
|
<mat-menu #dateMenu> |
|
|
|
<button mat-menu-item (click)="addEndTimeToSearch(row.utime*1000)">Искать до {{row.utime*1000 | date:"HH:mm:ss dd/MM/yyyy"}}</button> |
|
|
|
<button mat-menu-item (click)="addBeginTimeToSearch(row.utime*1000)">Искать после {{row.utime*1000 | date:"HH:mm:ss dd/MM/yyyy"}}</button> |
|
|
|
</mat-menu> |
|
|
|
</td> |
|
|
|
</ng-container> |
|
|
|
|
|
|
|
<ng-container matColumnDef="message"> |
|
|
|
<th mat-header-cell *matHeaderCellDef mat-sort-header> Message </th> |
|
|
|
<td mat-cell *matCellDef="let row"> {{row.message}} </td> |
|
|
|
<th mat-header-cell *matHeaderCellDef> Сообщение </th> |
|
|
|
<td mat-cell *matCellDef="let row" [matMenuTriggerFor]="messageMenu"> {{row.message}} |
|
|
|
<mat-menu #messageMenu> |
|
|
|
<button mat-menu-item (click)="addMessageToSearch(row.message)">Добавить в поиск</button> |
|
|
|
</mat-menu></td> |
|
|
|
</ng-container> |
|
|
|
|
|
|
|
<ng-container matColumnDef="server_id"> |
|
|
|
<th mat-header-cell *matHeaderCellDef mat-sort-header> ServerId </th> |
|
|
|
<td mat-cell *matCellDef="let row"> {{row.server_id}} </td> |
|
|
|
<ng-container matColumnDef="serverName"> |
|
|
|
<th mat-header-cell *matHeaderCellDef> Сервер </th> |
|
|
|
<td mat-cell *matCellDef="let row" [matMenuTriggerFor]="serverMenu"> {{row.serverName}} |
|
|
|
<mat-menu #serverMenu> |
|
|
|
<button mat-menu-item (click)="addServerToSearch(row.server_id)">Добавить в поиск</button> |
|
|
|
</mat-menu> |
|
|
|
</td> |
|
|
|
</ng-container> |
|
|
|
|
|
|
|
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr> |
|
|
@ -34,11 +129,15 @@ |
|
|
|
|
|
|
|
<!-- Row shown when there is no matching data. --> |
|
|
|
<tr class="mat-row" *matNoDataRow> |
|
|
|
<td class="mat-cell" colspan="4">No data matching the filter </td> |
|
|
|
<td class="mat-cell" colspan="4">Нет сообщений</td> |
|
|
|
</tr> |
|
|
|
</table> |
|
|
|
|
|
|
|
<mat-paginator [pageSizeOptions]="[5, 10, 25, 100]" aria-label="Select page of users"></mat-paginator> |
|
|
|
<mat-paginator |
|
|
|
[pageSizeOptions]="[5, 10, 25, 100]" |
|
|
|
[pageSize]="10" |
|
|
|
(page)="getMessages()" |
|
|
|
></mat-paginator> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|