Skip to content

Commit

Permalink
analytics/jobs: includes, excludes list of fields
Browse files Browse the repository at this point in the history
  - /analytics/jobs?excludes=f1,f2\&includes=f3,f4

Change-Id: Iade8473526b8ab2930b9e35be8a8ce66cf9e644f
  • Loading branch information
ylamgarchal committed Oct 8, 2024
1 parent 4f8c89e commit 17b823b
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions dci/api/v1/analytics.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,19 @@ def tasks_jobs(user):
}
}

_source = {}
excludes = args.get("excludes")
if excludes:
excludes = excludes.split(",")
_source["excludes"] = excludes
includes = args.get("includes")
if includes:
includes = includes.split(",")
_source["includes"] = includes

if _source:
es_query["_source"] = _source

try:
res = requests.get(
"%s/analytics/jobs" % (CONFIG["ANALYTICS_URL"]),
Expand Down

0 comments on commit 17b823b

Please sign in to comment.