From b422527b02b0970ec047ac962b2ed12ec318d0a6 Mon Sep 17 00:00:00 2001 From: To-om Date: Thu, 23 Jul 2020 18:10:29 +0200 Subject: [PATCH] #1449 Add filter in aggregation --- ScalliGraph | 2 +- thehive/app/org/thp/thehive/controllers/v0/QueryCtrl.scala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ScalliGraph b/ScalliGraph index 05d6e508d4..36b47d6920 160000 --- a/ScalliGraph +++ b/ScalliGraph @@ -1 +1 @@ -Subproject commit 05d6e508d4a81368105ed3806a69d81bc1c1ce68 +Subproject commit 36b47d6920d09ceeb721b36e3c6e907b3a293578 diff --git a/thehive/app/org/thp/thehive/controllers/v0/QueryCtrl.scala b/thehive/app/org/thp/thehive/controllers/v0/QueryCtrl.scala index 5d4cbf16dd..76883d0a71 100644 --- a/thehive/app/org/thp/thehive/controllers/v0/QueryCtrl.scala +++ b/thehive/app/org/thp/thehive/controllers/v0/QueryCtrl.scala @@ -95,7 +95,7 @@ class QueryCtrl(entrypoint: Entrypoint, @Named("with-thehive-schema") db: Databa .map(inputFilter => filterQuery.toQuery(inputFilter)) .fold(ctrl.initialQuery)(ctrl.initialQuery.andThen) groupAggs <- aggregationParser.sequence(field.get("stats")) - } yield groupAggs.map(a => filteredQuery andThen new AggregationQuery(publicProperties).toQuery(a)) + } yield groupAggs.map(a => filteredQuery andThen new AggregationQuery(db, publicProperties, queryExecutor.filterQuery).toQuery(a)) } val searchParser: FieldsParser[Query] = FieldsParser[Query]("search") {