fix(console): remove clear view (#3483)

This commit is contained in:
Livio Amstutz 2022-04-25 13:34:08 +02:00 committed by GitHub
parent 2c4799c223
commit 81c010adaa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 0 additions and 42 deletions

View File

@ -32,16 +32,6 @@
</td>
</ng-container>
<ng-container matColumnDef="actions" stickyEnd>
<th mat-header-cell *matHeaderCellDef></th>
<td mat-cell *matCellDef="let view">
<button mat-icon-button matTooltip="{{'IAM.VIEWS.CLEAR' | translate}}" color="warn"
(click)="cancelView(view.viewName, view.database)">
<mat-icon svgIcon="mdi_broom"></mat-icon>
</button>
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr class="highlight" mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
</table>

View File

@ -47,27 +47,4 @@ export class IamViewsComponent implements AfterViewInit {
this.dataSource.sort = this.sort;
});
}
public cancelView(viewname: string, db: string): void {
const dialogRef = this.dialog.open(WarnDialogComponent, {
data: {
confirmKey: 'ACTIONS.CLEAR',
cancelKey: 'ACTIONS.CANCEL',
titleKey: 'IAM.VIEWS.DIALOG.VIEW_CLEAR_TITLE',
descriptionKey: 'IAM.VIEWS.DIALOG.VIEW_CLEAR_DESCRIPTION',
},
width: '400px',
});
dialogRef.afterClosed().subscribe(resp => {
if (resp) {
this.adminService.clearView(viewname, db).then(() => {
this.toast.showInfo('IAM.VIEWS.CLEARED', true);
this.loadViews();
}).catch(error => {
this.toast.showError(error);
});
}
});
}
}

View File

@ -17,8 +17,6 @@ import {
AddOIDCIDPResponse,
AddSecondFactorToLoginPolicyRequest,
AddSecondFactorToLoginPolicyResponse,
ClearViewRequest,
ClearViewResponse,
DeactivateIDPRequest,
DeactivateIDPResponse,
GetCustomDomainClaimedMessageTextRequest,
@ -358,13 +356,6 @@ export class AdminService {
return this.grpcService.admin.listFailedEvents(req, null).then(resp => resp.toObject());
}
public clearView(viewname: string, db: string): Promise<ClearViewResponse.AsObject> {
const req = new ClearViewRequest();
req.setDatabase(db);
req.setViewName(viewname);
return this.grpcService.admin.clearView(req, null).then(resp => resp.toObject());
}
public removeFailedEvent(viewname: string, db: string, sequence: number): Promise<RemoveFailedEventResponse.AsObject> {
const req = new RemoveFailedEventRequest();
req.setDatabase(db);