mirror of
https://github.com/andwati/zitadel.git
synced 2026-10-27 17:52:14 +00:00
chore(console): dependencies, type checks (#4264)
* cli, core * material cdk * schematics * chore(deps): bump ngx-color from 7.3.3 to 8.0.2 in /console (#4228) Bumps [ngx-color](https://github.com/scttcper/ngx-color) from 7.3.3 to 8.0.2. - [Release notes](https://github.com/scttcper/ngx-color/releases) - [Commits](https://github.com/scttcper/ngx-color/compare/v7.3.3...v8.0.2) --- updated-dependencies: - dependency-name: ngx-color dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * eslint-plugin * chore(deps): bump moment from 2.29.3 to 2.29.4 in /console (#3926) Bumps [moment](https://github.com/moment/moment) from 2.29.3 to 2.29.4. - [Release notes](https://github.com/moment/moment/releases) - [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md) - [Commits](https://github.com/moment/moment/compare/2.29.3...2.29.4) --- updated-dependencies: - dependency-name: moment dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump codemirror from 5.65.6 to 6.0.1 in /console (#3928) Bumps [codemirror](https://github.com/codemirror/basic-setup) from 5.65.6 to 6.0.1. - [Release notes](https://github.com/codemirror/basic-setup/releases) - [Changelog](https://github.com/codemirror/basic-setup/blob/main/CHANGELOG.md) - [Commits](https://github.com/codemirror/basic-setup/commits/6.0.1) --- updated-dependencies: - dependency-name: codemirror dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * lock * use codemirror 5 * remove redundant null undefined checks * i18n, undefined checks * remove redundant null and undefined checks * checks Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Livio Spring <[email protected]>
This commit is contained in:
co-authored by
dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Livio Spring
parent
60b2092d2c
commit
70b3d80b37
@@ -4,7 +4,7 @@
|
||||
[dataSize]="dataSource.totalResult"
|
||||
[timestamp]="dataSource.viewTimestamp"
|
||||
[selection]="selection"
|
||||
[loading]="dataSource?.loading$ | async"
|
||||
[loading]="dataSource.loading$ | async"
|
||||
>
|
||||
<ng-container actions *ngIf="selection.hasValue()">
|
||||
<ng-content select="[selectactions]"></ng-content>
|
||||
@@ -139,7 +139,7 @@
|
||||
*ngIf="dataSource"
|
||||
class="paginator"
|
||||
#paginator
|
||||
[timestamp]="dataSource?.viewTimestamp"
|
||||
[timestamp]="dataSource.viewTimestamp"
|
||||
[pageSize]="INITIALPAGESIZE"
|
||||
[length]="dataSource.totalResult"
|
||||
[pageSizeOptions]="[25, 50, 100, 250]"
|
||||
|
||||
@@ -32,7 +32,7 @@ export class MembersTableComponent implements OnInit, OnDestroy {
|
||||
@Input() public canWrite: boolean | null = false;
|
||||
@ViewChild(PaginatorComponent) public paginator!: PaginatorComponent;
|
||||
@ViewChild(MatTable) public table!: MatTable<Member.AsObject>;
|
||||
@Input() public dataSource!: MemberDatasource;
|
||||
@Input() public dataSource?: MemberDatasource;
|
||||
public selection: SelectionModel<any> = new SelectionModel<any>(true, []);
|
||||
@Input() public memberRoleOptions: string[] = [];
|
||||
@Input() public factoryLoadFunc!: Function;
|
||||
@@ -112,14 +112,14 @@ export class MembersTableComponent implements OnInit, OnDestroy {
|
||||
|
||||
public isAllSelected(): boolean {
|
||||
const numSelected = this.selection.selected.length;
|
||||
const numRows = this.dataSource.membersSubject.value.length;
|
||||
const numRows = this.dataSource?.membersSubject.value.length;
|
||||
return numSelected === numRows;
|
||||
}
|
||||
|
||||
public masterToggle(): void {
|
||||
this.isAllSelected()
|
||||
? this.selection.clear()
|
||||
: this.dataSource.membersSubject.value.forEach((row: Member.AsObject) => this.selection.select(row));
|
||||
: this.dataSource?.membersSubject.value.forEach((row: Member.AsObject) => this.selection.select(row));
|
||||
}
|
||||
|
||||
public changePage(event?: PageEvent): any {
|
||||
|
||||
@@ -125,8 +125,8 @@
|
||||
*ngIf="(mgmtService?.ownedProjectsCount | async) && (mgmtService?.grantedProjectsCount | async)"
|
||||
class="count"
|
||||
>({{
|
||||
((mgmtService?.ownedProjectsCount | async) ?? 0) +
|
||||
((mgmtService?.grantedProjectsCount | async) ?? 0)
|
||||
((mgmtService.ownedProjectsCount | async) ?? 0) +
|
||||
((mgmtService.grantedProjectsCount | async) ?? 0)
|
||||
}})</small
|
||||
>
|
||||
</div>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
class="org-button-with-pin"
|
||||
mat-button
|
||||
[ngClass]="{
|
||||
active: pinnedorg.id === org?.id,
|
||||
active: pinnedorg.id === org.id,
|
||||
'border-bottom': pinned.selected.length && i === pinned.selected.length - 1
|
||||
}"
|
||||
[disabled]="!pinnedorg.id"
|
||||
@@ -37,7 +37,7 @@
|
||||
*ngIf="!pinned.isSelected(temporg)"
|
||||
class="org-button-with-pin"
|
||||
mat-button
|
||||
[ngClass]="{ active: temporg.id === org?.id }"
|
||||
[ngClass]="{ active: temporg.id === org.id }"
|
||||
[disabled]="!temporg.id"
|
||||
(click)="setActiveOrg(temporg)"
|
||||
>
|
||||
|
||||
+49
-23
@@ -1,8 +1,17 @@
|
||||
<cnsl-refresh-table [loading]="loading$ | async" (refreshed)="refreshPage()" [dataSize]="dataSource.data.length"
|
||||
[timestamp]="keyResult?.details?.viewTimestamp" [selection]="selection">
|
||||
<cnsl-refresh-table
|
||||
[loading]="loading$ | async"
|
||||
(refreshed)="refreshPage()"
|
||||
[dataSize]="dataSource.data.length"
|
||||
[timestamp]="keyResult?.details?.viewTimestamp"
|
||||
[selection]="selection"
|
||||
>
|
||||
<div actions>
|
||||
<a [disabled]="([('user.write:' + userId), 'user.write'] | hasRole | async) === false" color="primary"
|
||||
mat-raised-button (click)="openAddKey()">
|
||||
<a
|
||||
[disabled]="(['user.write:' + userId, 'user.write'] | hasRole | async) === false"
|
||||
color="primary"
|
||||
mat-raised-button
|
||||
(click)="openAddKey()"
|
||||
>
|
||||
<mat-icon class="icon">add</mat-icon>{{ 'ACTIONS.NEW' | translate }}
|
||||
</a>
|
||||
</div>
|
||||
@@ -11,34 +20,41 @@
|
||||
<table class="table" mat-table [dataSource]="dataSource">
|
||||
<ng-container matColumnDef="select">
|
||||
<th mat-header-cell *matHeaderCellDef>
|
||||
<mat-checkbox color="primary" (change)="$event ? masterToggle() : null"
|
||||
<mat-checkbox
|
||||
color="primary"
|
||||
(change)="$event ? masterToggle() : null"
|
||||
[checked]="selection.hasValue() && isAllSelected()"
|
||||
[indeterminate]="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
|
||||
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.PERSONALACCESSTOKEN.ID' | translate }} </th>
|
||||
<td mat-cell *matCellDef="let key"> {{key?.id}} </td>
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'USER.PERSONALACCESSTOKEN.ID' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let key">{{ key?.id }}</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="creationDate">
|
||||
<th mat-header-cell *matHeaderCellDef> {{ 'USER.MACHINE.CREATIONDATE' | translate }} </th>
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'USER.MACHINE.CREATIONDATE' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let key">
|
||||
{{key.details?.creationDate | timestampToDate | localizedDate: 'fromNow'}}
|
||||
{{ key.details?.creationDate | timestampToDate | localizedDate: 'fromNow' }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="expirationDate">
|
||||
<th mat-header-cell *matHeaderCellDef> {{ 'USER.MACHINE.EXPIRATIONDATE' | translate }} </th>
|
||||
<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'}}
|
||||
{{ key.expirationDate | timestampToDate | localizedDate: 'EEE dd. MMM YYYY, HH:mm' }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
@@ -46,8 +62,14 @@
|
||||
<th mat-header-cell *matHeaderCellDef></th>
|
||||
<td mat-cell *matCellDef="let key">
|
||||
<cnsl-table-actions>
|
||||
<button actions [disabled]="([('user.write:' + userId), 'user.write'] | hasRole | async) === false"
|
||||
mat-icon-button color="warn" matTooltip="{{'ACTIONS.DELETE' | translate}}" (click)="deleteKey(key)">
|
||||
<button
|
||||
actions
|
||||
[disabled]="(['user.write:' + userId, 'user.write'] | hasRole | async) === false"
|
||||
mat-icon-button
|
||||
color="warn"
|
||||
matTooltip="{{ 'ACTIONS.DELETE' | translate }}"
|
||||
(click)="deleteKey(key)"
|
||||
>
|
||||
<i class="las la-trash"></i>
|
||||
</button>
|
||||
</cnsl-table-actions>
|
||||
@@ -55,12 +77,16 @@
|
||||
</ng-container>
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
||||
<tr class="highlight" mat-row *matRowDef="let row; columns: displayedColumns;">
|
||||
</tr>
|
||||
|
||||
<tr class="highlight" mat-row *matRowDef="let row; columns: displayedColumns"></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>
|
||||
<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>
|
||||
</cnsl-refresh-table>
|
||||
|
||||
@@ -26,13 +26,14 @@ export class PersonalAccessTokensComponent implements OnInit {
|
||||
@Input() userId!: string;
|
||||
|
||||
@ViewChild(PaginatorComponent) public paginator!: PaginatorComponent;
|
||||
public dataSource: MatTableDataSource<PersonalAccessToken.AsObject> =
|
||||
new MatTableDataSource<PersonalAccessToken.AsObject>();
|
||||
public dataSource: MatTableDataSource<PersonalAccessToken.AsObject> = new MatTableDataSource<PersonalAccessToken.AsObject>(
|
||||
[],
|
||||
);
|
||||
public selection: SelectionModel<PersonalAccessToken.AsObject> = new SelectionModel<PersonalAccessToken.AsObject>(
|
||||
true,
|
||||
[],
|
||||
);
|
||||
public keyResult!: ListPersonalAccessTokensResponse.AsObject;
|
||||
public keyResult: ListPersonalAccessTokensResponse.AsObject | undefined = undefined;
|
||||
private loadingSubject: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);
|
||||
public loading$: Observable<boolean> = this.loadingSubject.asObservable();
|
||||
@Input() public displayedColumns: string[] = ['id', 'creationDate', 'expirationDate', 'actions'];
|
||||
|
||||
@@ -24,9 +24,9 @@ export class ProjectRolesTableComponent implements OnInit {
|
||||
@Input() public actionsVisible: boolean = false;
|
||||
@Input() public selectedKeys: string[] = [];
|
||||
@Input() public showSelectionActionButton: boolean = true;
|
||||
@ViewChild(PaginatorComponent) public paginator!: PaginatorComponent;
|
||||
@ViewChild(MatTable) public table!: MatTable<Role.AsObject>;
|
||||
public dataSource!: ProjectRolesDataSource;
|
||||
@ViewChild(PaginatorComponent) public paginator?: PaginatorComponent;
|
||||
@ViewChild(MatTable) public table?: MatTable<Role.AsObject>;
|
||||
public dataSource: ProjectRolesDataSource = new ProjectRolesDataSource(this.mgmtService);
|
||||
public selection: SelectionModel<Role.AsObject> = new SelectionModel<Role.AsObject>(true, []);
|
||||
@Output() public changedSelection: EventEmitter<Array<Role.AsObject>> = new EventEmitter();
|
||||
@Input() public displayedColumns: string[] = ['key', 'displayname', 'group', 'creationDate', 'changeDate', 'actions'];
|
||||
@@ -36,9 +36,7 @@ export class ProjectRolesTableComponent implements OnInit {
|
||||
private toast: ToastService,
|
||||
private dialog: MatDialog,
|
||||
private router: Router,
|
||||
) {
|
||||
this.dataSource = new ProjectRolesDataSource(this.mgmtService);
|
||||
}
|
||||
) {}
|
||||
|
||||
public gotoRouterLink(rL: any) {
|
||||
this.router.navigate(rL);
|
||||
@@ -63,7 +61,7 @@ export class ProjectRolesTableComponent implements OnInit {
|
||||
}
|
||||
|
||||
private loadRolesPage(): void {
|
||||
this.dataSource.loadRoles(this.projectId, this.grantId, this.paginator.pageIndex, this.paginator.pageSize);
|
||||
this.dataSource.loadRoles(this.projectId, this.grantId, this.paginator?.pageIndex ?? 0, this.paginator?.pageSize ?? 25);
|
||||
}
|
||||
|
||||
public changePage(): void {
|
||||
@@ -134,7 +132,7 @@ export class ProjectRolesTableComponent implements OnInit {
|
||||
}
|
||||
|
||||
public refreshPage(): void {
|
||||
this.dataSource.loadRoles(this.projectId, this.grantId, this.paginator.pageIndex, this.paginator.pageSize);
|
||||
this.dataSource.loadRoles(this.projectId, this.grantId, this.paginator?.pageIndex ?? 0, this.paginator?.pageSize ?? 25);
|
||||
}
|
||||
|
||||
public get selectionAllowed(): boolean {
|
||||
|
||||
Reference in New Issue
Block a user