web/flows: fix Sentry not being loaded correctly

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-04-22 20:47:48 +02:00
parent 3983b7fbe4
commit 799d186510
4 changed files with 16 additions and 15 deletions

View file

@ -337,7 +337,7 @@ if CONFIG.y("postgresql.s3_backup"):
# Sentry integration
_ERROR_REPORTING = CONFIG.y_bool("error_reporting.enabled", False)
if not DEBUG and _ERROR_REPORTING:
if _ERROR_REPORTING:
# pylint: disable=abstract-class-instantiated
sentry_init(
dsn="https://a579bb09306d4f8b8d8847c052d3a1d3@sentry.beryju.org/8",

View file

@ -36,13 +36,14 @@ import { AuthenticatorValidateStageChallenge } from "./stages/authenticator_vali
import { WebAuthnAuthenticatorRegisterChallenge } from "./stages/authenticator_webauthn/WebAuthnAuthenticatorRegisterStage";
import { CaptchaChallenge } from "./stages/captcha/CaptchaStage";
import { StageHost } from "./stages/base";
import { Challenge, ChallengeTypeEnum, Config, FlowsApi, RootApi } from "authentik-api";
import { Challenge, ChallengeTypeEnum, Config, FlowsApi } from "authentik-api";
import { DEFAULT_CONFIG } from "../api/Config";
import { ifDefined } from "lit-html/directives/if-defined";
import { until } from "lit-html/directives/until";
import { AccessDeniedChallenge } from "./access_denied/FlowAccessDenied";
import { PFSize } from "../elements/Spinner";
import { TITLE_SUFFIX } from "../constants";
import { configureSentry } from "../api/Sentry";
@customElement("ak-flow-executor")
export class FlowExecutor extends LitElement implements StageHost {
@ -124,7 +125,7 @@ export class FlowExecutor extends LitElement implements StageHost {
}
firstUpdated(): void {
new RootApi(DEFAULT_CONFIG).rootConfigList().then((config) => {
configureSentry().then((config) => {
this.config = config;
});
this.loading = true;

View file

@ -1665,8 +1665,8 @@ msgid "Library"
msgstr "Library"
#: src/elements/table/Table.ts:120
#: src/flows/FlowExecutor.ts:164
#: src/flows/FlowExecutor.ts:210
#: src/flows/FlowExecutor.ts:165
#: src/flows/FlowExecutor.ts:211
#: src/flows/access_denied/FlowAccessDenied.ts:27
#: src/flows/stages/authenticator_static/AuthenticatorStaticStage.ts:43
#: src/flows/stages/authenticator_totp/AuthenticatorTOTPStage.ts:33
@ -2321,7 +2321,7 @@ msgstr "Post binding"
msgid "Post binding (auto-submit)"
msgstr "Post binding (auto-submit)"
#: src/flows/FlowExecutor.ts:252
#: src/flows/FlowExecutor.ts:253
msgid "Powered by authentik"
msgstr "Powered by authentik"
@ -2575,7 +2575,7 @@ msgstr "Retry Task"
msgid "Retry authentication"
msgstr "Retry authentication"
#: src/flows/FlowExecutor.ts:142
#: src/flows/FlowExecutor.ts:143
msgid "Return"
msgstr "Return"
@ -2823,7 +2823,7 @@ msgstr "Skip path regex"
msgid "Slug"
msgstr "Slug"
#: src/flows/FlowExecutor.ts:135
#: src/flows/FlowExecutor.ts:136
msgid "Something went wrong! Please try again later."
msgstr "Something went wrong! Please try again later."
@ -3863,7 +3863,7 @@ msgstr "When selected, incoming assertion's Signatures will be validated against
msgid "When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged."
msgstr "When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged."
#: src/flows/FlowExecutor.ts:131
#: src/flows/FlowExecutor.ts:132
msgid "Whoops!"
msgstr "Whoops!"

View file

@ -1657,8 +1657,8 @@ msgid "Library"
msgstr ""
#: src/elements/table/Table.ts:120
#: src/flows/FlowExecutor.ts:164
#: src/flows/FlowExecutor.ts:210
#: src/flows/FlowExecutor.ts:165
#: src/flows/FlowExecutor.ts:211
#: src/flows/access_denied/FlowAccessDenied.ts:27
#: src/flows/stages/authenticator_static/AuthenticatorStaticStage.ts:43
#: src/flows/stages/authenticator_totp/AuthenticatorTOTPStage.ts:33
@ -2313,7 +2313,7 @@ msgstr ""
msgid "Post binding (auto-submit)"
msgstr ""
#: src/flows/FlowExecutor.ts:252
#: src/flows/FlowExecutor.ts:253
msgid "Powered by authentik"
msgstr ""
@ -2567,7 +2567,7 @@ msgstr ""
msgid "Retry authentication"
msgstr ""
#: src/flows/FlowExecutor.ts:142
#: src/flows/FlowExecutor.ts:143
msgid "Return"
msgstr ""
@ -2815,7 +2815,7 @@ msgstr ""
msgid "Slug"
msgstr ""
#: src/flows/FlowExecutor.ts:135
#: src/flows/FlowExecutor.ts:136
msgid "Something went wrong! Please try again later."
msgstr ""
@ -3851,7 +3851,7 @@ msgstr ""
msgid "When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged."
msgstr ""
#: src/flows/FlowExecutor.ts:131
#: src/flows/FlowExecutor.ts:132
msgid "Whoops!"
msgstr ""