diff --git a/authentik/outposts/tasks.py b/authentik/outposts/tasks.py index f92dc45ed3..569197a9dd 100644 --- a/authentik/outposts/tasks.py +++ b/authentik/outposts/tasks.py @@ -84,7 +84,7 @@ def controller_for_outpost(outpost: Outpost) -> type[BaseController] | None: return None -@actor(description=_("Update cached state of a service connection.")) +@actor(description=_("Update cached state of service connection.")) def outpost_service_connection_monitor(connection_pk: Any): """Update cached state of a service connection""" connection: OutpostServiceConnection = ( diff --git a/authentik/tasks/schedules/models.py b/authentik/tasks/schedules/models.py index 740efc9bd0..7889ae2789 100644 --- a/authentik/tasks/schedules/models.py +++ b/authentik/tasks/schedules/models.py @@ -6,6 +6,7 @@ from django.utils.translation import gettext_lazy as _ from django_dramatiq_postgres.models import ScheduleBase from authentik.lib.models import SerializerModel +from authentik.tasks.models import TasksModel from authentik.tasks.schedules.lib import ScheduleSpec @@ -36,7 +37,7 @@ class Schedule(SerializerModel, ScheduleBase): return ScheduleSerializer -class ScheduledModel(models.Model): +class ScheduledModel(TasksModel, models.Model): schedules = GenericRelation( Schedule, content_type_field="rel_obj_content_type", object_id_field="rel_obj_id" ) @@ -51,7 +52,11 @@ class ScheduledModel(models.Model): return True return any(is_scheduled_model(klass) for klass in klass.__bases__) - return [model for model in apps.get_models() if is_scheduled_model(model)] + return [ + model + for model in apps.get_models() + if is_scheduled_model(model) and not model.__subclasses__() + ] @property def schedule_specs(self) -> list[ScheduleSpec]: diff --git a/web/src/admin/outposts/ServiceConnectionListPage.ts b/web/src/admin/outposts/ServiceConnectionListPage.ts index d922fa22f3..3532f1bbdd 100644 --- a/web/src/admin/outposts/ServiceConnectionListPage.ts +++ b/web/src/admin/outposts/ServiceConnectionListPage.ts @@ -3,9 +3,12 @@ import "@goauthentik/admin/outposts/ServiceConnectionDockerForm"; import "@goauthentik/admin/outposts/ServiceConnectionKubernetesForm"; import "@goauthentik/admin/outposts/ServiceConnectionWizard"; import "@goauthentik/admin/rbac/ObjectPermissionModal"; +import "@goauthentik/admin/system-tasks/ScheduleList"; +import "@goauthentik/admin/system-tasks/TaskList"; import { DEFAULT_CONFIG } from "@goauthentik/common/api/config"; import "@goauthentik/components/ak-status-label"; import { PFColor } from "@goauthentik/elements/Label"; +import "@goauthentik/elements/Tabs"; import "@goauthentik/elements/buttons/SpinnerButton"; import "@goauthentik/elements/forms/DeleteBulkForm"; import "@goauthentik/elements/forms/ModalForm"; @@ -40,6 +43,7 @@ export class OutpostServiceConnectionListPage extends TablePage> { @@ -109,6 +113,52 @@ export class OutpostServiceConnectionListPage extends TablePage +
+
+ +
+
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+ `; + } + renderToolbarSelected(): TemplateResult { const disabled = this.selectedElements.length < 1; return html`