events: migrate SystemTasks to DB (#8159)

* events: migrate system tasks to save in DB

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* prefill in app startup

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* cleanup api

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* update web

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* use string for status

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* fix enum

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* save start and end directly in timestamp from default_timer()

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* improve metrics

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* lint

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* fix tests

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* rename globally to system task

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* recreate migrations, better denote anonymous user

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* events: lookup actual django app instead of using module path, fallback to module path

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* fix logger call

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* fix

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

---------

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens L
2024-01-24 17:23:03 +01:00
committed by GitHub
parent c0562bf860
commit 96b2a1a9ba
65 changed files with 11564 additions and 12080 deletions

View File

@ -160,7 +160,7 @@
</trans-unit>
<trans-unit id="s14622ee6de586485">
<source>Attempted to log in as <x id="0" equiv-text="${this.event.context.username}"/></source>
<target>Attempted to log in as
<target>Attempted to log in as
<x id="0" equiv-text="${this.event.context.username}"/></target>
</trans-unit>
<trans-unit id="sb07bf992e3d00664">
@ -310,8 +310,8 @@
<trans-unit id="s04c5a637328c9b67">
<source><x id="0" equiv-text="${this.pages?.startIndex}"/> - <x id="1" equiv-text="${this.pages?.endIndex}"/> of <x id="2" equiv-text="${this.pages?.count}"/></source>
<target>
<x id="0" equiv-text="${this.pages?.startIndex}"/>-
<x id="1" equiv-text="${this.pages?.endIndex}"/>of
<x id="0" equiv-text="${this.pages?.startIndex}"/>-
<x id="1" equiv-text="${this.pages?.endIndex}"/>of
<x id="2" equiv-text="${this.pages?.count}"/></target>
</trans-unit>
<trans-unit id="s6a89bb10338369b4">
@ -363,9 +363,9 @@
<target>Recent events</target>
</trans-unit>
<trans-unit id="sc35581d9c1cd67ff">
<source>On behalf of <x id="0" equiv-text="${item.user.on_behalf_of.username}"/></source>
<target>On behalf of
<x id="0" equiv-text="${item.user.on_behalf_of.username}"/></target>
<source>On behalf of <x id="0" equiv-text="${event.user.on_behalf_of.username}"/></source>
<target>On behalf of
<x id="0" equiv-text="${event.user.on_behalf_of.username}"/></target>
</trans-unit>
<trans-unit id="saf63a04c86018698">
<source>-</source>
@ -409,7 +409,7 @@
</trans-unit>
<trans-unit id="scefe482c547fb3f3">
<source>Based on <x id="0" equiv-text="${value.versionCurrent}"/></source>
<target>Based on
<target>Based on
<x id="0" equiv-text="${value.versionCurrent}"/></target>
</trans-unit>
<trans-unit id="s68a50b1ee6efee7b">
@ -458,7 +458,7 @@
<trans-unit id="s0382d73823585617">
<source><x id="0" equiv-text="${this.errorMessage}"/>: <x id="1" equiv-text="${e.toString()}"/></source>
<target>
<x id="0" equiv-text="${this.errorMessage}"/>:
<x id="0" equiv-text="${this.errorMessage}"/>:
<x id="1" equiv-text="${e.toString()}"/></target>
</trans-unit>
<trans-unit id="s2ceb11be2290bb1b">
@ -491,7 +491,7 @@
</trans-unit>
<trans-unit id="saa0e2675da69651b">
<source>The URL "<x id="0" equiv-text="${this.url}"/>" was not found.</source>
<target>The URL "
<target>The URL "
<x id="0" equiv-text="${this.url}"/>" was not found.</target>
</trans-unit>
<trans-unit id="s58cd9c2fe836d9c6">
@ -504,7 +504,7 @@
</trans-unit>
<trans-unit id="s6dfd15978586d05f">
<source>Welcome, <x id="0" equiv-text="${name}"/>.</source>
<target>Welcome,
<target>Welcome,
<x id="0" equiv-text="${name}"/>.</target>
</trans-unit>
<trans-unit id="sc381422c585b867f">
@ -613,9 +613,9 @@
<target>Duration</target>
</trans-unit>
<trans-unit id="se7e1ababbc4868b8">
<source><x id="0" equiv-text="${item.taskDuration.toFixed(2)}"/> seconds</source>
<source><x id="0" equiv-text="${item.duration.toFixed(2)}"/> seconds</source>
<target>
<x id="0" equiv-text="${item.taskDuration.toFixed(2)}"/>seconds</target>
<x id="0" equiv-text="${item.duration.toFixed(2)}"/>seconds</target>
</trans-unit>
<trans-unit id="sc25edca57df81461">
<source>Authentication</source>
@ -1275,7 +1275,7 @@
</trans-unit>
<trans-unit id="s5d6af4c100ad321b">
<source>Create <x id="0" equiv-text="${type.name}"/></source>
<target>Create
<target>Create
<x id="0" equiv-text="${type.name}"/></target>
</trans-unit>
<trans-unit id="sb95baab425322600">
@ -1366,7 +1366,7 @@
<trans-unit id="s55fa598b754cc3cc">
<source><x id="0" equiv-text="${ub.name}"/> (<x id="1" equiv-text="${consequence}"/>)</source>
<target>
<x id="0" equiv-text="${ub.name}"/>(
<x id="0" equiv-text="${ub.name}"/>(
<x id="1" equiv-text="${consequence}"/>)</target>
</trans-unit>
<trans-unit id="s09240e07b5b8d640">
@ -1378,13 +1378,13 @@
</trans-unit>
<trans-unit id="sf6eb148db23d19de">
<source>Failed to delete <x id="0" equiv-text="${this.objectLabel}"/>: <x id="1" equiv-text="${e.toString()}"/></source>
<target>Failed to delete
<x id="0" equiv-text="${this.objectLabel}"/>:
<target>Failed to delete
<x id="0" equiv-text="${this.objectLabel}"/>:
<x id="1" equiv-text="${e.toString()}"/></target>
</trans-unit>
<trans-unit id="s039b6434e8a75560">
<source>Delete <x id="0" equiv-text="${this.objectLabel}"/></source>
<target>Delete
<target>Delete
<x id="0" equiv-text="${this.objectLabel}"/></target>
</trans-unit>
<trans-unit id="s5819a49638f6d7cb">
@ -1428,7 +1428,7 @@
</trans-unit>
<trans-unit id="sc9175cb129fdc306">
<source>Update <x id="0" equiv-text="${item.verboseName}"/></source>
<target>Update
<target>Update
<x id="0" equiv-text="${item.verboseName}"/></target>
</trans-unit>
<trans-unit id="s398f6ba74ba8943a">
@ -2173,17 +2173,17 @@ doesn't pass when either or both of the selected options are equal or above the
</trans-unit>
<trans-unit id="s030ac0829bb50a49">
<source>Policy <x id="0" equiv-text="${item.policyObj?.name}"/></source>
<target>Policy
<target>Policy
<x id="0" equiv-text="${item.policyObj?.name}"/></target>
</trans-unit>
<trans-unit id="s2a64d2dca3da9b0e">
<source>Group <x id="0" equiv-text="${item.groupObj?.name}"/></source>
<target>Group
<target>Group
<x id="0" equiv-text="${item.groupObj?.name}"/></target>
</trans-unit>
<trans-unit id="se5dc026819a32ff8">
<source>User <x id="0" equiv-text="${item.userObj?.name}"/></source>
<target>User
<target>User
<x id="0" equiv-text="${item.userObj?.name}"/></target>
</trans-unit>
<trans-unit id="s50c312bea93b6925">
@ -2675,13 +2675,13 @@ doesn't pass when either or both of the selected options are equal or above the
<target>Task finished with errors</target>
</trans-unit>
<trans-unit id="sbedb77365a066648">
<source>Last sync: <x id="0" equiv-text="${task.taskFinishTimestamp.toLocaleString()}"/></source>
<target>Last sync:
<x id="0" equiv-text="${task.taskFinishTimestamp.toLocaleString()}"/></target>
<source>Last sync: <x id="0" equiv-text="${task.finishTimestamp.toLocaleString()}"/></source>
<target>Last sync:
<x id="0" equiv-text="${task.finishTimestamp.toLocaleString()}"/></target>
</trans-unit>
<trans-unit id="sf3fec8353106ac2f">
<source>OAuth Source <x id="0" equiv-text="${this.source.name}"/></source>
<target>OAuth Source
<target>OAuth Source
<x id="0" equiv-text="${this.source.name}"/></target>
</trans-unit>
<trans-unit id="se09d055771f3a11d">
@ -3034,7 +3034,7 @@ doesn't pass when either or both of the selected options are equal or above the
</trans-unit>
<trans-unit id="se16ac750b81fa93d">
<source>Assigned to <x id="0" equiv-text="${item.boundTo}"/> object(s).</source>
<target>Assigned to
<target>Assigned to
<x id="0" equiv-text="${item.boundTo}"/>object(s).</target>
</trans-unit>
<trans-unit id="s5a48d5171e1a1522">
@ -3134,7 +3134,7 @@ doesn't pass when either or both of the selected options are equal or above the
</trans-unit>
<trans-unit id="s4414164d120de61a">
<source>The following objects use <x id="0" equiv-text="${objName}"/></source>
<target>The following objects use
<target>The following objects use
<x id="0" equiv-text="${objName}"/></target>
</trans-unit>
<trans-unit id="s92e241c9f3c101a2">
@ -3146,14 +3146,14 @@ doesn't pass when either or both of the selected options are equal or above the
</trans-unit>
<trans-unit id="s14401ff4a0cba208">
<source>Failed to update <x id="0" equiv-text="${this.objectLabel}"/>: <x id="1" equiv-text="${e.toString()}"/></source>
<target>Failed to update
<x id="0" equiv-text="${this.objectLabel}"/>:
<target>Failed to update
<x id="0" equiv-text="${this.objectLabel}"/>:
<x id="1" equiv-text="${e.toString()}"/></target>
</trans-unit>
<trans-unit id="sa95a538bfbb86111">
<source>Are you sure you want to update <x id="0" equiv-text="${this.objectLabel}"/> "<x id="1" equiv-text="${this.obj?.name}"/>"?</source>
<target>Are you sure you want to update
<x id="0" equiv-text="${this.objectLabel}"/>"
<target>Are you sure you want to update
<x id="0" equiv-text="${this.objectLabel}"/>"
<x id="1" equiv-text="${this.obj?.name}"/>"?</target>
</trans-unit>
<trans-unit id="sc92d7cfb6ee1fec6">
@ -3186,7 +3186,7 @@ doesn't pass when either or both of the selected options are equal or above the
</trans-unit>
<trans-unit id="s5d7748b1d2363478">
<source>Are you sure you want to remove the selected users from the group <x id="0" equiv-text="${this.targetGroup?.name}"/>?</source>
<target>Are you sure you want to remove the selected users from the group
<target>Are you sure you want to remove the selected users from the group
<x id="0" equiv-text="${this.targetGroup?.name}"/>?</target>
</trans-unit>
<trans-unit id="sea4f08110bb8f15d">
@ -3295,7 +3295,7 @@ doesn't pass when either or both of the selected options are equal or above the
</trans-unit>
<trans-unit id="s3616cc78631f5893">
<source>Warning: You're about to delete the user you're logged in as (<x id="0" equiv-text="${shouldShowWarning.username}"/>). Proceed at your own risk.</source>
<target>Warning: You're about to delete the user you're logged in as (
<target>Warning: You're about to delete the user you're logged in as (
<x id="0" equiv-text="${shouldShowWarning.username}"/>). Proceed at your own risk.</target>
</trans-unit>
<trans-unit id="s510c7add9e24c306">
@ -3320,7 +3320,7 @@ doesn't pass when either or both of the selected options are equal or above the
</trans-unit>
<trans-unit id="sb4c9ed2a487b238f">
<source>Are you sure you want to remove user <x id="0" equiv-text="${this.targetUser?.username}"/> from the following groups?</source>
<target>Are you sure you want to remove user
<target>Are you sure you want to remove user
<x id="0" equiv-text="${this.targetUser?.username}"/>from the following groups?</target>
</trans-unit>
<trans-unit id="s964f6725aeb7662f">
@ -4284,8 +4284,8 @@ doesn't pass when either or both of the selected options are equal or above the
<trans-unit id="s2d5f69929bb7221d">
<source><x id="0" equiv-text="${prompt.name}"/> ("<x id="1" equiv-text="${prompt.fieldKey}"/>", of type <x id="2" equiv-text="${prompt.type}"/>)</source>
<target>
<x id="0" equiv-text="${prompt.name}"/>("
<x id="1" equiv-text="${prompt.fieldKey}"/>", of type
<x id="0" equiv-text="${prompt.name}"/>("
<x id="1" equiv-text="${prompt.fieldKey}"/>", of type
<x id="2" equiv-text="${prompt.type}"/>)</target>
</trans-unit>
<trans-unit id="s3b7b519444181264">
@ -4417,7 +4417,7 @@ doesn't pass when either or both of the selected options are equal or above the
</trans-unit>
<trans-unit id="s77299a9d3dd932cd">
<source>Successfully imported <x id="0" equiv-text="${res.count}"/> devices.</source>
<target>Successfully imported
<target>Successfully imported
<x id="0" equiv-text="${res.count}"/>devices.</target>
</trans-unit>
<trans-unit id="s6a615f6165ef01c9">
@ -4678,7 +4678,7 @@ doesn't pass when either or both of the selected options are equal or above the
</trans-unit>
<trans-unit id="s65d67612999165e9">
<source>Event <x id="0" equiv-text="${this.event.pk}"/></source>
<target>Event
<target>Event
<x id="0" equiv-text="${this.event.pk}"/></target>
</trans-unit>
<trans-unit id="s455de2f740b073fd">
@ -4864,7 +4864,7 @@ Bindings to groups/users are checked against the user of the event.</source>
<trans-unit id="s1ac2653a6492b435">
<source><x id="0" equiv-text="${this.outpostHealth.version}"/>, should be <x id="1" equiv-text="${this.outpostHealth.versionShould}"/></source>
<target>
<x id="0" equiv-text="${this.outpostHealth.version}"/>, should be
<x id="0" equiv-text="${this.outpostHealth.version}"/>, should be
<x id="1" equiv-text="${this.outpostHealth.versionShould}"/></target>
</trans-unit>
<trans-unit id="s1e176e35c828318c">
@ -4877,7 +4877,7 @@ Bindings to groups/users are checked against the user of the event.</source>
</trans-unit>
<trans-unit id="s02b632a9ac24a824">
<source>Last seen: <x id="0" equiv-text="${this.outpostHealth.lastSeen?.toLocaleTimeString()}"/></source>
<target>Last seen:
<target>Last seen:
<x id="0" equiv-text="${this.outpostHealth.lastSeen?.toLocaleTimeString()}"/></target>
</trans-unit>
<trans-unit id="sa43153d53ae65063">
@ -4902,7 +4902,7 @@ Bindings to groups/users are checked against the user of the event.</source>
</trans-unit>
<trans-unit id="sbf5f4c5ba679e847">
<source>Logging in via <x id="0" equiv-text="${item.config.authentik_host}"/>.</source>
<target>Logging in via
<target>Logging in via
<x id="0" equiv-text="${item.config.authentik_host}"/>.</target>
</trans-unit>
<trans-unit id="s59b6028f19d15cda">
@ -5059,7 +5059,7 @@ Bindings to groups/users are checked against the user of the event.</source>
</trans-unit>
<trans-unit id="sef50d248448e0df1">
<source>Yes (<x id="0" equiv-text="${item.privateKeyType?.toUpperCase()}"/>)</source>
<target>Yes (
<target>Yes (
<x id="0" equiv-text="${item.privateKeyType?.toUpperCase()}"/>)</target>
</trans-unit>
<trans-unit id="s09205907b5b56cda">
@ -5201,7 +5201,7 @@ Bindings to groups/users are checked against the user of the event.</source>
</trans-unit>
<trans-unit id="s96b3cddf33e1c853">
<source>You're currently impersonating <x id="0" equiv-text="${this.impersonation}"/>. Click to stop.</source>
<target>You're currently impersonating
<target>You're currently impersonating
<x id="0" equiv-text="${this.impersonation}"/>. Click to stop.</target>
</trans-unit>
<trans-unit id="s7031e6928c44cedd">
@ -5302,7 +5302,7 @@ Bindings to groups/users are checked against the user of the event.</source>
</trans-unit>
<trans-unit id="s670ad066cc0e50a3">
<source>Login to continue to <x id="0" equiv-text="${this.challenge.applicationPre}"/>.</source>
<target>Login to continue to
<target>Login to continue to
<x id="0" equiv-text="${this.challenge.applicationPre}"/>.</target>
</trans-unit>
<trans-unit id="scf5ce91bfba10a61">
@ -5415,12 +5415,12 @@ Bindings to groups/users are checked against the user of the event.</source>
</trans-unit>
<trans-unit id="sbbb7318812d64e51">
<source>Error when creating credential: <x id="0" equiv-text="${err}"/></source>
<target>Error when creating credential:
<target>Error when creating credential:
<x id="0" equiv-text="${err}"/></target>
</trans-unit>
<trans-unit id="sfe199b2564b66054">
<source>Error when validating assertion on server: <x id="0" equiv-text="${err}"/></source>
<target>Error when validating assertion on server:
<target>Error when validating assertion on server:
<x id="0" equiv-text="${err}"/></target>
</trans-unit>
<trans-unit id="se409d01b52c4e12f">
@ -5561,12 +5561,12 @@ Bindings to groups/users are checked against the user of the event.</source>
</trans-unit>
<trans-unit id="s7fa4e5e409d43573">
<source>Error creating credential: <x id="0" equiv-text="${err}"/></source>
<target>Error creating credential:
<target>Error creating credential:
<x id="0" equiv-text="${err}"/></target>
</trans-unit>
<trans-unit id="s9d95f09deb601f34">
<source>Server validation of credential failed: <x id="0" equiv-text="${err}"/></source>
<target>Server validation of credential failed:
<target>Server validation of credential failed:
<x id="0" equiv-text="${err}"/></target>
</trans-unit>
<trans-unit id="s6c8f05e3be04f62a">
@ -5635,7 +5635,7 @@ Bindings to groups/users are checked against the user of the event.</source>
</trans-unit>
<trans-unit id="s67dedada007d4067">
<source>Failed to disconnected source: <x id="0" equiv-text="${exc}"/></source>
<target>Failed to disconnected source:
<target>Failed to disconnected source:
<x id="0" equiv-text="${exc}"/></target>
</trans-unit>
<trans-unit id="sd2208cd1a767644b">
@ -5648,7 +5648,7 @@ Bindings to groups/users are checked against the user of the event.</source>
</trans-unit>
<trans-unit id="sababff57115130a0">
<source>Error: unsupported source settings: <x id="0" equiv-text="${source.component}"/></source>
<target>Error: unsupported source settings:
<target>Error: unsupported source settings:
<x id="0" equiv-text="${source.component}"/></target>
</trans-unit>
<trans-unit id="sd1031bddc66dc495">
@ -6603,6 +6603,24 @@ Bindings to groups/users are checked against the user of the event.</source>
</trans-unit>
<trans-unit id="see1eb81c1f734079">
<source>System settings</source>
</trans-unit>
<trans-unit id="s47fb5504f693775b">
<source>Changes made:</source>
</trans-unit>
<trans-unit id="s506b6a19d12f414c">
<source>Key</source>
</trans-unit>
<trans-unit id="s4fc9dc73245eab09">
<source>Previous value</source>
</trans-unit>
<trans-unit id="scb3b0671d7b7f640">
<source>New value</source>
</trans-unit>
<trans-unit id="s4a642406b0745917">
<source>Raw event info</source>
</trans-unit>
<trans-unit id="sa65e7bc7ddd3484d">
<source>Anonymous user</source>
</trans-unit>
</body>
</file>