Files
patrickandClaude Sonnet 5.5 347f55cf7c
test / pytest (3.11) (push) Canceled after 0s
test / pytest (3.13) (push) Canceled after 0s
feat: Phase 6c baseline, ack, host alarms, outage notice, send limit, privacy mode, UI link
Includes atomic migrations, per-rule reminder semantics, first-run helper script
and the note on the undecided UI chat idea.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-06 03:06:23 +01:00

20 lines
721 B
Python

from ..constants import CONTENT_MODE_FULL, CONTENT_MODE_SHORT, CONTENT_MODES
from .sections import Field
CHOICES = (
(CONTENT_MODE_FULL, "Voll (mit Plugin-Output und KI-Analyse)"),
(CONTENT_MODE_SHORT, "Kurz (nur Host, Service, Status und Verlauf, ohne Output und KI-Text)"),
)
def content_mode_field(key: str, hint: str) -> Field:
return Field(key, "Inhalt der Alarmnachrichten", kind="select", default=CONTENT_MODE_FULL,
choices=CHOICES, hint=hint)
def validate_content_mode(values: dict, key: str) -> list[str]:
value = values.get(key, "")
if value and value not in CONTENT_MODES:
return ["Inhalt der Alarmnachrichten muss \"voll\" oder \"kurz\" sein."]
return []