Ansible schedule form: structured playbook-variable fields + first-item dropdown defaults #2

Merged
bvandeusen merged 126 commits from dev into main 2026-06-30 23:44:04 -04:00
Showing only changes of commit 43a5325e69 - Show all commits
+7 -1
View File
@@ -32,7 +32,13 @@ class AlertRule(Base):
source_module: Mapped[str] = mapped_column(String(64), nullable=False)
resource_name: Mapped[str] = mapped_column(String(255), nullable=False)
metric_name: Mapped[str] = mapped_column(String(128), nullable=False)
operator: Mapped[AlertOperator] = mapped_column(Enum(AlertOperator), nullable=False)
# The DB enum (migration 0002) stores the operator VALUES (">", "<", …), so
# persist values rather than SQLAlchemy's default enum-member NAMES ("gt"…).
operator: Mapped[AlertOperator] = mapped_column(
Enum(AlertOperator, name="alertoperator",
values_callable=lambda e: [m.value for m in e]),
nullable=False,
)
threshold: Mapped[float] = mapped_column(Float, nullable=False)
consecutive_failures_required: Mapped[int] = mapped_column(Integer, nullable=False, default=1)
enabled: Mapped[bool] = mapped_column(Boolean, nullable=False, default=True)