##// END OF EJS Templates
logs: fix for common values
ergo -
Show More
@@ -198,14 +198,17 b' def common_values(request):'
198 filter_settings = build_filter_settings_from_query_dict(request, config)
198 filter_settings = build_filter_settings_from_query_dict(request, config)
199 resources = list(filter_settings["resource"])
199 resources = list(filter_settings["resource"])
200 tag_name = filter_settings["tags"][0]["value"][0]
200 tag_name = filter_settings["tags"][0]["value"][0]
201
202 and_part = [
203 {"terms": {"resource_id": list(resources)}},
204 ]
205 if filter_settings["namespace"]:
206 and_part.append({"terms": {"namespace": filter_settings["namespace"]}})
201 query = {
207 query = {
202 "query": {
208 "query": {
203 "filtered": {
209 "filtered": {
204 "filter": {
210 "filter": {
205 "and": [
211 "and": and_part
206 {"terms": {"resource_id": list(resources)}},
207 {"terms": {"namespace": filter_settings["namespace"]}},
208 ]
209 }
212 }
210 }
213 }
211 }
214 }
General Comments 0
You need to be logged in to leave comments. Login now