2022-09-01 09:44:39 +02:00
|
|
|
<cnsl-refresh-table
|
|
|
|
[loading]="dataSource.loading$ | async"
|
|
|
|
[selection]="selection"
|
|
|
|
(refreshed)="refreshPage()"
|
|
|
|
[dataSize]="dataSource.totalResult"
|
|
|
|
[timestamp]="dataSource.viewTimestamp"
|
|
|
|
>
|
2022-04-28 12:35:02 +02:00
|
|
|
<ng-template cnslHasRole [hasRole]="['project.app.write']" actions>
|
2022-09-01 09:44:39 +02:00
|
|
|
<a [disabled]="disabled" [routerLink]="['/projects', projectId, 'apps', 'create']" color="primary" mat-raised-button>
|
2023-10-26 10:29:06 +02:00
|
|
|
<div class="cnsl-action-button">
|
|
|
|
<mat-icon class="icon">add</mat-icon>
|
|
|
|
<span>{{ 'ACTIONS.NEW' | translate }}</span>
|
|
|
|
</div>
|
2022-04-28 12:35:02 +02:00
|
|
|
</a>
|
|
|
|
</ng-template>
|
|
|
|
|
|
|
|
<div class="table-wrapper">
|
|
|
|
<table [dataSource]="dataSource" mat-table class="table" aria-label="Elements">
|
|
|
|
<ng-container matColumnDef="select">
|
2023-10-26 10:29:06 +02:00
|
|
|
<th mat-header-cell *matHeaderCellDef>
|
|
|
|
<div class="selection">
|
|
|
|
<mat-checkbox
|
|
|
|
color="primary"
|
|
|
|
(change)="$event ? masterToggle() : null"
|
|
|
|
[checked]="selection.hasValue() && isAllSelected()"
|
|
|
|
[indeterminate]="selection.hasValue() && !isAllSelected()"
|
|
|
|
>
|
|
|
|
</mat-checkbox>
|
|
|
|
</div>
|
2022-04-28 12:35:02 +02:00
|
|
|
</th>
|
2023-10-26 10:29:06 +02:00
|
|
|
<td mat-cell *matCellDef="let row">
|
|
|
|
<div class="selection">
|
|
|
|
<mat-checkbox
|
|
|
|
color="primary"
|
|
|
|
(click)="$event.stopPropagation()"
|
|
|
|
(change)="$event ? selection.toggle(row) : null"
|
|
|
|
[checked]="selection.isSelected(row)"
|
|
|
|
>
|
|
|
|
</mat-checkbox>
|
|
|
|
</div>
|
2022-04-28 12:35:02 +02:00
|
|
|
</td>
|
|
|
|
</ng-container>
|
|
|
|
|
|
|
|
<ng-container matColumnDef="name">
|
2022-09-01 09:44:39 +02:00
|
|
|
<th mat-header-cell *matHeaderCellDef>{{ 'APP.NAME' | translate }}</th>
|
|
|
|
<td class="pointer" [routerLink]="['/projects', projectId, 'apps', app.id]" mat-cell *matCellDef="let app">
|
|
|
|
{{ app.name }}
|
|
|
|
</td>
|
2022-04-28 12:35:02 +02:00
|
|
|
</ng-container>
|
|
|
|
|
|
|
|
<ng-container matColumnDef="type">
|
2022-09-01 09:44:39 +02:00
|
|
|
<th mat-header-cell *matHeaderCellDef>{{ 'APP.TYPE' | translate }}</th>
|
|
|
|
<td class="pointer" [routerLink]="['/projects', projectId, 'apps', app.id]" mat-cell *matCellDef="let app">
|
2022-04-28 12:35:02 +02:00
|
|
|
<span *ngIf="app?.oidcConfig?.appType !== undefined && app?.oidcConfig?.appType !== null">
|
2022-09-01 09:44:39 +02:00
|
|
|
{{ 'APP.OIDC.APPTYPE.' + app?.oidcConfig?.appType | translate }}
|
2022-04-28 12:35:02 +02:00
|
|
|
</span>
|
|
|
|
<span *ngIf="app.apiConfig">API</span>
|
|
|
|
</td>
|
|
|
|
</ng-container>
|
|
|
|
|
|
|
|
<ng-container matColumnDef="state">
|
2022-09-01 09:44:39 +02:00
|
|
|
<th mat-header-cell *matHeaderCellDef>{{ 'USER.DATA.STATE' | translate }}</th>
|
|
|
|
<td class="pointer" mat-cell *matCellDef="let app" [routerLink]="['/projects', projectId, 'apps', app.id]">
|
|
|
|
<span
|
|
|
|
class="state"
|
|
|
|
[ngClass]="{
|
|
|
|
active: app.state === AppState.APP_STATE_ACTIVE,
|
2024-07-30 16:12:39 +02:00
|
|
|
inactive: app.state === AppState.APP_STATE_INACTIVE,
|
2022-09-01 09:44:39 +02:00
|
|
|
}"
|
|
|
|
>
|
|
|
|
{{ 'APP.PAGES.DETAIL.STATE.' + app?.state | translate }}
|
2022-04-28 12:35:02 +02:00
|
|
|
</span>
|
|
|
|
</td>
|
|
|
|
</ng-container>
|
|
|
|
|
|
|
|
<ng-container matColumnDef="creationDate">
|
2022-09-01 09:44:39 +02:00
|
|
|
<th mat-header-cell *matHeaderCellDef>{{ 'PROJECT.ROLE.CREATIONDATE' | translate }}</th>
|
|
|
|
<td class="pointer" [routerLink]="['/projects', projectId, 'apps', app.id]" mat-cell *matCellDef="let app">
|
|
|
|
<span *ngIf="app?.details?.creationDate">{{
|
2023-09-28 14:59:58 +02:00
|
|
|
app.details.creationDate | timestampToDate | localizedDate: 'dd. MMM, HH:mm'
|
2022-09-01 09:44:39 +02:00
|
|
|
}}</span>
|
2022-04-28 12:35:02 +02:00
|
|
|
</td>
|
|
|
|
</ng-container>
|
|
|
|
|
|
|
|
<ng-container matColumnDef="changeDate">
|
2022-09-01 09:44:39 +02:00
|
|
|
<th mat-header-cell *matHeaderCellDef>{{ 'PROJECT.ROLE.CHANGEDATE' | translate }}</th>
|
|
|
|
<td class="pointer" [routerLink]="['/projects', projectId, 'apps', app.id]" mat-cell *matCellDef="let app">
|
|
|
|
<span *ngIf="app?.details?.changeDate">{{
|
2023-09-28 14:59:58 +02:00
|
|
|
app.details.changeDate | timestampToDate | localizedDate: 'dd. MMM, HH:mm'
|
2022-09-01 09:44:39 +02:00
|
|
|
}}</span>
|
2022-04-28 12:35:02 +02:00
|
|
|
</td>
|
|
|
|
</ng-container>
|
|
|
|
|
|
|
|
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
2022-09-01 09:44:39 +02:00
|
|
|
<tr class="highlight" mat-row *matRowDef="let row; columns: displayedColumns"></tr>
|
2022-04-28 12:35:02 +02:00
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
|
2022-09-01 09:44:39 +02:00
|
|
|
<cnsl-paginator
|
|
|
|
class="paginator"
|
|
|
|
#paginator
|
|
|
|
[timestamp]="dataSource.viewTimestamp"
|
|
|
|
[length]="dataSource.totalResult"
|
|
|
|
[pageSize]="25"
|
|
|
|
[pageSizeOptions]="[25, 50, 100, 250]"
|
|
|
|
>
|
2022-04-28 12:35:02 +02:00
|
|
|
</cnsl-paginator>
|
2022-09-01 09:44:39 +02:00
|
|
|
</cnsl-refresh-table>
|