mirror of
https://github.com/bitwarden/directory-connector
synced 2025-12-10 05:13:17 +00:00
sim fixes
This commit is contained in:
@@ -15,8 +15,8 @@
|
||||
Simulate
|
||||
</button>
|
||||
<div class="form-check mt-2">
|
||||
<input class="form-check-input" type="checkbox" id="sinceLast" [(ngModel)]="sinceLast">
|
||||
<label class="form-check-label" for="sinceLast">Since the last successful sync</label>
|
||||
<input class="form-check-input" type="checkbox" id="simSinceLast" [(ngModel)]="simSinceLast">
|
||||
<label class="form-check-label" for="simSinceLast">Since the last successful sync</label>
|
||||
</div>
|
||||
<ng-container *ngIf="!simBtn.loading && (simUsers || simGroups)">
|
||||
<hr />
|
||||
|
||||
@@ -21,8 +21,8 @@ export class DashboardComponent {
|
||||
simDisabledUsers: UserEntry[] = [];
|
||||
simDeletedUsers: UserEntry[] = [];
|
||||
simPromise: Promise<any>;
|
||||
simSinceLast: boolean = false;
|
||||
syncPromise: Promise<any>;
|
||||
sinceLast: boolean = false;
|
||||
|
||||
constructor(private i18nService: I18nService, private syncService: SyncService) { }
|
||||
|
||||
@@ -32,9 +32,15 @@ export class DashboardComponent {
|
||||
}
|
||||
|
||||
async simulate() {
|
||||
this.simGroups = null;
|
||||
this.simUsers = null;
|
||||
this.simEnabledUsers = [];
|
||||
this.simDisabledUsers = [];
|
||||
this.simDeletedUsers = [];
|
||||
|
||||
this.simPromise = new Promise(async (resolve, reject) => {
|
||||
try {
|
||||
const result = await this.syncService.sync(!this.sinceLast, false);
|
||||
const result = await this.syncService.sync(!this.simSinceLast, false);
|
||||
this.simUsers = result[1];
|
||||
this.simGroups = result[0];
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user