sources/ldap: add check command to verify ldap connectivity (#7263)
* sources/ldap: add check command to verify ldap connectivity Signed-off-by: Jens Langhammer <jens@goauthentik.io> * default to checking all sources Signed-off-by: Jens Langhammer <jens@goauthentik.io> * start adding an API for ldap connectivity Signed-off-by: Jens Langhammer <jens@goauthentik.io> * add webui for ldap source connection status Signed-off-by: Jens Langhammer <jens@goauthentik.io> * better show sync status, clear previous tasks Signed-off-by: Jens Langhammer <jens@goauthentik.io> * set timeout on redis lock for ldap sync Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix py lint Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix web lint Signed-off-by: Jens Langhammer <jens@goauthentik.io> --------- Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
		| @ -44,11 +44,11 @@ export class LDAPSyncStatusChart extends AKChart<SyncStatus[]> { | ||||
|         await Promise.all( | ||||
|             sources.results.map(async (element) => { | ||||
|                 try { | ||||
|                     const health = await api.sourcesLdapSyncStatusList({ | ||||
|                     const health = await api.sourcesLdapSyncStatusRetrieve({ | ||||
|                         slug: element.slug, | ||||
|                     }); | ||||
|  | ||||
|                     health.forEach((task) => { | ||||
|                     health.tasks.forEach((task) => { | ||||
|                         if (task.status !== TaskStatusEnum.Successful) { | ||||
|                             metrics.failed += 1; | ||||
|                         } | ||||
| @ -60,7 +60,7 @@ export class LDAPSyncStatusChart extends AKChart<SyncStatus[]> { | ||||
|                             metrics.healthy += 1; | ||||
|                         } | ||||
|                     }); | ||||
|                     if (health.length < 1) { | ||||
|                     if (health.tasks.length < 1) { | ||||
|                         metrics.unsynced += 1; | ||||
|                     } | ||||
|                 } catch { | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Jens L
					Jens L