Hotovo. Přidal jsem správu Alertingu do appfactory-portal bez ORM:

Nové SQL migrace pro alert_rules a alert_events v migrations.py (line 165).
Nová ruční DB vrstva v alerting.py (line 7).
Nové stránky a akce v routes/alerting.py (line 288):Alert pravidla, detail, vytvoření, úprava, smazání
povolit/zakázat pravidlo
Alert eventy a detail eventu s payload_json
odkazy z job_id na detail úlohy
detail pravidla s posledními eventy
admin-only editor .sh alert skriptů v /opt/appfactory/workspace/appfactory-tools/alerts
audit eventy podle zadání

Menu Provoz → Alerting v layout.py (line 23).
Router je zaregistrovaný v main.py (line 8).
This commit is contained in:
JiriUhlir
2026-06-08 06:57:12 +02:00
parent 64f8fe806d
commit 382825085f
5 changed files with 941 additions and 1 deletions
+2 -1
View File
@@ -5,7 +5,7 @@ from fastapi.staticfiles import StaticFiles
from starlette.middleware.sessions import SessionMiddleware
from .config import read_env_value
from .routes import apps, audit, auth, backups, deployments, health, incidents, jobs, operations, scheduled_scripts, workers
from .routes import alerting, apps, audit, auth, backups, deployments, health, incidents, jobs, operations, scheduled_scripts, workers
def create_app() -> FastAPI:
@@ -28,6 +28,7 @@ def create_app() -> FastAPI:
app.include_router(backups.router)
app.include_router(deployments.router)
app.include_router(incidents.router)
app.include_router(alerting.router)
app.include_router(operations.router)
app.include_router(scheduled_scripts.router)
app.include_router(jobs.router)