diff --git a/dci/api/v1/analytics.py b/dci/api/v1/analytics.py index aa9510d25..33e39e03c 100644 --- a/dci/api/v1/analytics.py +++ b/dci/api/v1/analytics.py @@ -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"]),