Staging environment + FleetOps split #17

Open
kianiadee wants to merge 23 commits from feat/staging-fleetops-architecture into main
Showing only changes of commit 048d1a3173 - Show all commits

View file

@ -425,6 +425,20 @@ def inc_search(
)
@app.get("/webhook/inc-filter-options")
def inc_filter_options():
# Dropdown options for the ticket explorer (engineers, clusters, open ticket ids).
try:
with get_conn() as conn:
with conn.cursor() as cur:
cur.execute("SELECT reporting.fn_inc_filter_options()")
payload = cur.fetchone()[0] or {}
return JSONResponse(payload)
except Exception:
log.exception("inc-filter-options failed")
return JSONResponse({"owners": [], "clusters": [], "open_ticket_ids": []})
# ── Fleet trips (#002) ───────────────────────────────────────────────────────
_FILTER_OPTIONS_SQL = """