Merge branch 'main' into application-wizard-2-with-api-and-tests
* main: enterprise: bump license usage task frequency (#7215) web: bump the storybook group in /web with 5 updates (#7212) web: bump the sentry group in /web with 2 updates (#7211) Revert "web: Updates to the Context and Tasks libraries from lit. (#7168)" web: bump @types/codemirror from 5.60.10 to 5.60.11 in /web (#7209) web: bump @types/chart.js from 2.9.38 to 2.9.39 in /web (#7206) web: bump pyright from 1.1.331 to 1.1.332 in /web (#7208) web: bump @types/grecaptcha from 3.0.5 to 3.0.6 in /web (#7207)
This commit is contained in:
commit
5e1854f74e
5
.github/dependabot.yml
vendored
5
.github/dependabot.yml
vendored
|
@ -51,11 +51,6 @@ updates:
|
||||||
esbuild:
|
esbuild:
|
||||||
patterns:
|
patterns:
|
||||||
- "@esbuild/*"
|
- "@esbuild/*"
|
||||||
rollup:
|
|
||||||
patterns:
|
|
||||||
- "@rollup/*"
|
|
||||||
- "rollup"
|
|
||||||
- "rollup-*"
|
|
||||||
- package-ecosystem: npm
|
- package-ecosystem: npm
|
||||||
directory: "/tests/wdio"
|
directory: "/tests/wdio"
|
||||||
schedule:
|
schedule:
|
||||||
|
|
|
@ -136,6 +136,9 @@ class LicenseKey:
|
||||||
|
|
||||||
def record_usage(self):
|
def record_usage(self):
|
||||||
"""Capture the current validity status and metrics and save them"""
|
"""Capture the current validity status and metrics and save them"""
|
||||||
|
threshold = now() - timedelta(hours=8)
|
||||||
|
if LicenseUsage.objects.filter(record_date__gte=threshold).exists():
|
||||||
|
return
|
||||||
LicenseUsage.objects.create(
|
LicenseUsage.objects.create(
|
||||||
user_count=self.get_default_user_count(),
|
user_count=self.get_default_user_count(),
|
||||||
external_user_count=self.get_external_user_count(),
|
external_user_count=self.get_external_user_count(),
|
||||||
|
|
|
@ -6,7 +6,7 @@ from authentik.lib.utils.time import fqdn_rand
|
||||||
CELERY_BEAT_SCHEDULE = {
|
CELERY_BEAT_SCHEDULE = {
|
||||||
"enterprise_calculate_license": {
|
"enterprise_calculate_license": {
|
||||||
"task": "authentik.enterprise.tasks.calculate_license",
|
"task": "authentik.enterprise.tasks.calculate_license",
|
||||||
"schedule": crontab(minute=fqdn_rand("calculate_license"), hour="*/8"),
|
"schedule": crontab(minute=fqdn_rand("calculate_license"), hour="*/2"),
|
||||||
"options": {"queue": "authentik_scheduled"},
|
"options": {"queue": "authentik_scheduled"},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,5 +6,4 @@ from authentik.root.celery import CELERY_APP
|
||||||
@CELERY_APP.task()
|
@CELERY_APP.task()
|
||||||
def calculate_license():
|
def calculate_license():
|
||||||
"""Calculate licensing status"""
|
"""Calculate licensing status"""
|
||||||
total = LicenseKey.get_total()
|
LicenseKey.get_total().record_usage()
|
||||||
total.record_usage()
|
|
||||||
|
|
5026
web/package-lock.json
generated
5026
web/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -39,14 +39,14 @@
|
||||||
"@formatjs/intl-listformat": "^7.5.0",
|
"@formatjs/intl-listformat": "^7.5.0",
|
||||||
"@fortawesome/fontawesome-free": "^6.4.2",
|
"@fortawesome/fontawesome-free": "^6.4.2",
|
||||||
"@goauthentik/api": "^2023.8.3-1697470337",
|
"@goauthentik/api": "^2023.8.3-1697470337",
|
||||||
"@lit/context": "^1.0.0",
|
"@lit-labs/context": "^0.4.1",
|
||||||
|
"@lit-labs/task": "^3.1.0",
|
||||||
"@lit/localize": "^0.11.4",
|
"@lit/localize": "^0.11.4",
|
||||||
"@lit/task": "^1.0.0",
|
|
||||||
"@open-wc/lit-helpers": "^0.6.0",
|
"@open-wc/lit-helpers": "^0.6.0",
|
||||||
"@patternfly/elements": "^2.4.0",
|
"@patternfly/elements": "^2.4.0",
|
||||||
"@patternfly/patternfly": "^4.224.2",
|
"@patternfly/patternfly": "^4.224.2",
|
||||||
"@sentry/browser": "^7.74.0",
|
"@sentry/browser": "^7.74.1",
|
||||||
"@sentry/tracing": "^7.74.0",
|
"@sentry/tracing": "^7.74.1",
|
||||||
"@webcomponents/webcomponentsjs": "^2.8.0",
|
"@webcomponents/webcomponentsjs": "^2.8.0",
|
||||||
"base64-js": "^1.5.1",
|
"base64-js": "^1.5.1",
|
||||||
"chart.js": "^4.4.0",
|
"chart.js": "^4.4.0",
|
||||||
|
@ -82,15 +82,15 @@
|
||||||
"@rollup/plugin-replace": "^5.0.4",
|
"@rollup/plugin-replace": "^5.0.4",
|
||||||
"@rollup/plugin-terser": "^0.4.4",
|
"@rollup/plugin-terser": "^0.4.4",
|
||||||
"@rollup/plugin-typescript": "^11.1.5",
|
"@rollup/plugin-typescript": "^11.1.5",
|
||||||
"@storybook/addon-essentials": "^7.4.6",
|
"@storybook/addon-essentials": "^7.5.0",
|
||||||
"@storybook/addon-links": "^7.4.6",
|
"@storybook/addon-links": "^7.5.0",
|
||||||
"@storybook/blocks": "^7.1.1",
|
"@storybook/blocks": "^7.1.1",
|
||||||
"@storybook/web-components": "^7.4.6",
|
"@storybook/web-components": "^7.5.0",
|
||||||
"@storybook/web-components-vite": "^7.4.6",
|
"@storybook/web-components-vite": "^7.5.0",
|
||||||
"@trivago/prettier-plugin-sort-imports": "^4.2.0",
|
"@trivago/prettier-plugin-sort-imports": "^4.2.0",
|
||||||
"@types/chart.js": "^2.9.38",
|
"@types/chart.js": "^2.9.39",
|
||||||
"@types/codemirror": "5.60.10",
|
"@types/codemirror": "5.60.11",
|
||||||
"@types/grecaptcha": "^3.0.5",
|
"@types/grecaptcha": "^3.0.6",
|
||||||
"@typescript-eslint/eslint-plugin": "^6.8.0",
|
"@typescript-eslint/eslint-plugin": "^6.8.0",
|
||||||
"@typescript-eslint/parser": "^6.8.0",
|
"@typescript-eslint/parser": "^6.8.0",
|
||||||
"babel-plugin-macros": "^3.1.0",
|
"babel-plugin-macros": "^3.1.0",
|
||||||
|
@ -106,14 +106,14 @@
|
||||||
"npm-run-all": "^4.1.5",
|
"npm-run-all": "^4.1.5",
|
||||||
"prettier": "^3.0.3",
|
"prettier": "^3.0.3",
|
||||||
"pseudolocale": "^2.0.0",
|
"pseudolocale": "^2.0.0",
|
||||||
"pyright": "^1.1.331",
|
"pyright": "^1.1.332",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
"rollup": "^4.1.4",
|
"rollup": "^4.1.4",
|
||||||
"rollup-plugin-copy": "^3.5.0",
|
"rollup-plugin-copy": "^3.5.0",
|
||||||
"rollup-plugin-cssimport": "^1.0.3",
|
"rollup-plugin-cssimport": "^1.0.3",
|
||||||
"rollup-plugin-postcss-lit": "^2.1.0",
|
"rollup-plugin-postcss-lit": "^2.1.0",
|
||||||
"storybook": "^7.4.6",
|
"storybook": "^7.5.0",
|
||||||
"storybook-addon-mock": "^4.3.0",
|
"storybook-addon-mock": "^4.3.0",
|
||||||
"ts-lit-plugin": "^1.2.1",
|
"ts-lit-plugin": "^1.2.1",
|
||||||
"tslib": "^2.6.2",
|
"tslib": "^2.6.2",
|
||||||
|
@ -124,9 +124,6 @@
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"@esbuild/darwin-arm64": "^0.19.5",
|
"@esbuild/darwin-arm64": "^0.19.5",
|
||||||
"@esbuild/linux-amd64": "^0.18.11",
|
"@esbuild/linux-amd64": "^0.18.11",
|
||||||
"@esbuild/linux-arm64": "^0.19.5",
|
"@esbuild/linux-arm64": "^0.19.5"
|
||||||
"@rollup/rollup-darwin-arm64": "4.1.4",
|
|
||||||
"@rollup/rollup-linux-x64-gnu": "4.1.4",
|
|
||||||
"@rollup/rollup-linux-arm64-gnu": "4.1.4"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
4
web/src/elements/ak-locale-context/context.ts
Normal file
4
web/src/elements/ak-locale-context/context.ts
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
import { createContext } from "@lit-labs/context";
|
||||||
|
|
||||||
|
export const localeContext = createContext<string>("locale");
|
||||||
|
export default localeContext;
|
|
@ -3,7 +3,7 @@ import { AKElement } from "@goauthentik/elements/Base";
|
||||||
import { PFSize } from "@goauthentik/elements/Spinner";
|
import { PFSize } from "@goauthentik/elements/Spinner";
|
||||||
import { CustomEmitterElement } from "@goauthentik/elements/utils/eventEmitter";
|
import { CustomEmitterElement } from "@goauthentik/elements/utils/eventEmitter";
|
||||||
|
|
||||||
import { Task, TaskStatus } from "@lit/task";
|
import { Task, TaskStatus } from "@lit-labs/task";
|
||||||
import { css, html } from "lit";
|
import { css, html } from "lit";
|
||||||
|
|
||||||
import PFButton from "@patternfly/patternfly/components/Button/button.css";
|
import PFButton from "@patternfly/patternfly/components/Button/button.css";
|
||||||
|
|
Reference in a new issue