Skip to content

Commit

Permalink
Remove obsolete audit rules filter classes
Browse files Browse the repository at this point in the history
  • Loading branch information
Dostonbek1 committed Dec 17, 2024
1 parent 9e9ec74 commit f1a6f72
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 45 deletions.
10 changes: 1 addition & 9 deletions src/aap_eda/api/filters/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,7 @@
from .event_stream import EventStreamFilter
from .organization import OrganizationFilter
from .project import ProjectFilter
from .rulebook import (
AuditRuleActionFilter,
AuditRuleEventFilter,
AuditRuleFilter,
RulebookFilter,
)
from .rulebook import RulebookFilter
from .team import OrganizationTeamFilter, TeamFilter
from .user import UserFilter

Expand All @@ -37,9 +32,6 @@
"ProjectFilter",
# rulebook
"RulebookFilter",
"AuditRuleFilter",
"AuditRuleActionFilter",
"AuditRuleEventFilter",
# credential type
"CredentialTypeFilter",
"EdaCredentialFilter",
Expand Down
36 changes: 0 additions & 36 deletions src/aap_eda/api/filters/rulebook.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,39 +33,3 @@ class RulebookFilter(django_filters.FilterSet):
class Meta:
model = models.Rulebook
fields = ["name", "project_id"]


class AuditRuleFilter(django_filters.FilterSet):
name = django_filters.CharFilter(
field_name="name",
lookup_expr="istartswith",
label="Filter by rule audit name.",
)

class Meta:
model = models.AuditRule
fields = ["name"]


class AuditRuleActionFilter(django_filters.FilterSet):
name = django_filters.CharFilter(
field_name="name",
lookup_expr="istartswith",
label="Filter by rule audit action name.",
)

class Meta:
model = models.AuditAction
fields = ["name"]


class AuditRuleEventFilter(django_filters.FilterSet):
source_name = django_filters.CharFilter(
field_name="source_name",
lookup_expr="istartswith",
label="Filter by rule audit event source name.",
)

class Meta:
model = models.AuditEvent
fields = ["source_name"]

0 comments on commit f1a6f72

Please sign in to comment.