mirror of
https://github.com/andwati/zitadel.git
synced 2026-10-20 14:34:25 +00:00
* es lint * modify tsconfig, auto lint some stuff * lint * lint * lint * lint * html ts lint * lint * lint, tsconfig * fix project delete, state table * eslint config, remove cnslHint directive * mfa selector, info row fixes * lint * fix login policy, granted orgs table state, lint Co-authored-by: Florian Forster <[email protected]>
71 lines
3.7 KiB
HTML
71 lines
3.7 KiB
HTML
<cnsl-refresh-table [loading]="loading$ | async" (refreshed)="refreshPage()" [dataSize]="dataSource.data.length"
|
||
[timestamp]="keyResult?.details?.viewTimestamp" [selection]="selection">
|
||
<div actions>
|
||
<a [disabled]="([('project.app.write:' + projectId), 'project.app.write'] | hasRole | async) === false"
|
||
color="primary" mat-raised-button (click)="openAddKey()">
|
||
<mat-icon class="icon">add</mat-icon>{{ 'ACTIONS.NEW' | translate }}
|
||
</a>
|
||
</div>
|
||
|
||
<div class="table-wrapper">
|
||
<table class="table" mat-table [dataSource]="dataSource">
|
||
<ng-container matColumnDef="select">
|
||
<th mat-header-cell *matHeaderCellDef>
|
||
<mat-checkbox color="primary" (change)="$event ? masterToggle() : null"
|
||
[checked]="selection.hasValue() && isAllSelected()"
|
||
[indeterminate]="selection.hasValue() && !isAllSelected()">
|
||
</mat-checkbox>
|
||
</th>
|
||
<td mat-cell *matCellDef="let key">
|
||
<mat-checkbox color="primary" (click)="$event.stopPropagation()"
|
||
(change)="$event ? selection.toggle(key) : null" [checked]="selection.isSelected(key)">
|
||
</mat-checkbox>
|
||
</td>
|
||
</ng-container>
|
||
|
||
<ng-container matColumnDef="id">
|
||
<th mat-header-cell *matHeaderCellDef> {{ 'USER.MACHINE.ID' | translate }} </th>
|
||
<td mat-cell *matCellDef="let key"> {{key?.id}} </td>
|
||
</ng-container>
|
||
|
||
<ng-container matColumnDef="type">
|
||
<th mat-header-cell *matHeaderCellDef> {{ 'USER.MACHINE.TYPE' | translate }} </th>
|
||
<td mat-cell *matCellDef="let key"> {{'USER.MACHINE.KEYTYPES.'+key?.type | translate}} </td>
|
||
</ng-container>
|
||
|
||
<ng-container matColumnDef="creationDate">
|
||
<th mat-header-cell *matHeaderCellDef> {{ 'USER.MACHINE.CREATIONDATE' | translate }} </th>
|
||
<td mat-cell *matCellDef="let key">
|
||
{{key.details.creationDate | timestampToDate | localizedDate: 'EEE dd. MMM YYYY, HH:mm'}}
|
||
</td>
|
||
</ng-container>
|
||
|
||
<ng-container matColumnDef="expirationDate">
|
||
<th mat-header-cell *matHeaderCellDef> {{ 'USER.MACHINE.EXPIRATIONDATE' | translate }} </th>
|
||
<td mat-cell *matCellDef="let key">
|
||
{{key.expirationDate | timestampToDate | localizedDate: 'EEE dd. MMM YYYY, HH:mm'}}
|
||
</td>
|
||
</ng-container>
|
||
|
||
<ng-container matColumnDef="actions" stickyEnd>
|
||
<th mat-header-cell *matHeaderCellDef></th>
|
||
<td mat-cell *matCellDef="let key">
|
||
<button
|
||
[disabled]="([('project.app.write:' + projectId), 'project.app.write'] | hasRole | async) === false"
|
||
mat-icon-button color="warn" matTooltip="{{'ACTIONS.DELETE' | translate}}"
|
||
(click)="deleteKey(key)">
|
||
<i class="las la-trash"></i>
|
||
</button>
|
||
</td>
|
||
</ng-container>
|
||
|
||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
||
<tr class="highlight" mat-row *matRowDef="let key; columns: displayedColumns;"
|
||
(click)="selection.toggle(key);">
|
||
</tr>
|
||
|
||
</table>
|
||
<cnsl-paginator #paginator class="paginator" [timestamp]="keyResult?.details?.viewTimestamp" [length]="keyResult?.details?.totalResult || 0" [pageSize]="10"
|
||
[pageSizeOptions]="[5, 10, 20]" (page)="changePage($event)"></cnsl-paginator>
|
||
</div>
|
||
</cnsl-refresh-table> |