feat(dashboard_api): GET /webhook/inc-filter-options (explorer pulldowns)
Passthrough over reporting.fn_inc_filter_options (fleettickets migration 14): engineers, clusters, open ticket ids for the ticket-explorer dropdowns. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
e27933b1cb
commit
048d1a3173
1 changed files with 14 additions and 0 deletions
|
|
@ -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) ───────────────────────────────────────────────────────
|
# ── Fleet trips (#002) ───────────────────────────────────────────────────────
|
||||||
|
|
||||||
_FILTER_OPTIONS_SQL = """
|
_FILTER_OPTIONS_SQL = """
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue