fix(ume): global clear-push setting, schema migration, and help hints

Make forward-on-clear a global monitor toggle, run key-alert DDL in an
isolated startup transaction, and fix HelpHint popovers plus API errors
when the server returns non-JSON responses.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-06-22 17:26:49 +08:00
parent 34db62c8d2
commit b54a6e5ad4
12 changed files with 266 additions and 68 deletions

View file

@ -201,6 +201,16 @@ class UmeAlarmHistory(Base):
raw_json: Mapped[str] = mapped_column(Text, default="{}")
class UmeKeyAlertMonitorConfig(Base):
"""Global monitor options for key alert forwarding (singleton row id=1)."""
__tablename__ = "ume_key_alert_monitor_config"
id: Mapped[int] = mapped_column(Integer, primary_key=True)
forward_on_clear: Mapped[int] = mapped_column(Integer, default=0)
updated_at: Mapped[datetime] = mapped_column(DateTime, default=datetime.utcnow, index=True)
class UmeKeyAlertRule(Base):
"""Key alert rule matched by UME notificationId or alarm description keyword."""