1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-14 00:19:16 +01:00

fix: password auth metrics (#8735)

This commit is contained in:
Mateusz Kwasniewski 2024-11-13 12:10:53 +01:00 committed by GitHub
parent cb316f012c
commit 61e297dd22
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 2 deletions

View File

@ -224,7 +224,10 @@ export class InstanceStatsService {
'unleash.auth.simple', 'unleash.auth.simple',
); );
return settings?.disabled !== false; return (
typeof settings?.disabled === 'undefined' ||
settings.disabled === false
);
} }
async hasSCIM(): Promise<boolean> { async hasSCIM(): Promise<boolean> {

View File

@ -408,7 +408,7 @@ export function registerPrometheusMetrics(
}); });
dbMetrics.registerGaugeDbMetric({ dbMetrics.registerGaugeDbMetric({
name: 'password_auth', name: 'password_auth_enabled',
help: 'Whether password auth is enabled', help: 'Whether password auth is enabled',
query: () => instanceStatsService.hasPasswordAuth(), query: () => instanceStatsService.hasPasswordAuth(),
map: (result) => ({ value: result ? 1 : 0 }), map: (result) => ({ value: result ? 1 : 0 }),