|
@@ -241,26 +241,6 @@ class AlertRuleManager(BaseManager["AlertRule"]):
|
|
|
return []
|
|
|
|
|
|
|
|
|
-@region_silo_model
|
|
|
-class AlertRuleExcludedProjects(Model):
|
|
|
- """
|
|
|
- Excludes a specific project from an AlertRule
|
|
|
-
|
|
|
- NOTE: This feature is not currently utilized.
|
|
|
- """
|
|
|
-
|
|
|
- __relocation_scope__ = RelocationScope.Organization
|
|
|
-
|
|
|
- alert_rule = FlexibleForeignKey("sentry.AlertRule", db_index=False, db_constraint=False)
|
|
|
- project = FlexibleForeignKey("sentry.Project", db_constraint=False)
|
|
|
- date_added = models.DateTimeField(default=timezone.now)
|
|
|
-
|
|
|
- class Meta:
|
|
|
- app_label = "sentry"
|
|
|
- db_table = "sentry_alertruleexcludedprojects"
|
|
|
- unique_together = (("alert_rule", "project"),)
|
|
|
-
|
|
|
-
|
|
|
@region_silo_model
|
|
|
class AlertRuleProjects(Model):
|
|
|
"""
|
|
@@ -473,26 +453,6 @@ class AlertRuleTrigger(Model):
|
|
|
unique_together = (("alert_rule", "label"),)
|
|
|
|
|
|
|
|
|
-@region_silo_model
|
|
|
-class AlertRuleTriggerExclusion(Model):
|
|
|
- """
|
|
|
- Allows us to define a specific trigger to be excluded from a query subscription
|
|
|
- """
|
|
|
-
|
|
|
- __relocation_scope__ = RelocationScope.Organization
|
|
|
-
|
|
|
- alert_rule_trigger = FlexibleForeignKey(
|
|
|
- "sentry.AlertRuleTrigger", related_name="exclusions", db_constraint=False
|
|
|
- )
|
|
|
- query_subscription = FlexibleForeignKey("sentry.QuerySubscription", db_constraint=False)
|
|
|
- date_added = models.DateTimeField(default=timezone.now)
|
|
|
-
|
|
|
- class Meta:
|
|
|
- app_label = "sentry"
|
|
|
- db_table = "sentry_alertruletriggerexclusion"
|
|
|
- unique_together = (("alert_rule_trigger", "query_subscription"),)
|
|
|
-
|
|
|
-
|
|
|
class AlertRuleTriggerActionMethod(StrEnum):
|
|
|
FIRE = "fire"
|
|
|
RESOLVE = "resolve"
|