Skip to content

Commit

Permalink
Merge branch 'release/2.1.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed Oct 12, 2018
2 parents 2a980e9 + dc9bcc3 commit 154672e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
# Change Log

## [2.1.1](https://github.com/TheHive-Project/Cortex/tree/2.1.1) (2018-10-09)
## [2.1.2](https://github.com/TheHive-Project/Cortex/tree/2.1.2) (2018-10-12)
[Full Changelog](https://github.com/TheHive-Project/Cortex/compare/2.1.1...HEAD)

**Fixed bugs:**

- GUI Search Function is broken [\#145](https://github.com/TheHive-Project/Cortex/issues/145)
- findSimilarJob function broken [\#144](https://github.com/TheHive-Project/Cortex/issues/144)

## [2.1.1](https://github.com/TheHive-Project/Cortex/tree/2.1.1) (2018-10-09)
[Full Changelog](https://github.com/TheHive-Project/Cortex/compare/2.1.0...2.1.1)

**Implemented enhancements:**
Expand Down
6 changes: 3 additions & 3 deletions app/org/thp/cortex/services/JobSrv.scala
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class JobSrv(
findForUser(userId, and(
dataTypeFilter.map("dataType" like _).toList :::
dataFilter.map("data" like _).toList :::
analyzerFilter.map(af or("analyzerId" like af, "analyzerName" like af)).toList), range, Nil)
analyzerFilter.map(af or("workerId" like af, "workerName" like af)).toList), range, Nil)
}

def findArtifacts(userId: String, jobId: String, queryDef: QueryDef, range: Option[String], sortBy: Seq[String]): (Source[Artifact, NotUsed], Future[Long]) = {
Expand Down Expand Up @@ -310,7 +310,7 @@ class JobSrv(
import org.elastic4play.services.QueryDSL._
val now = new Date().getTime
logger.info(s"Checking rate limit on worker ${worker.name()} from ${new Date(now - rateUnit.id.toLong * 24 * 60 * 60 * 1000)}")
stats(and("createdAt" ~>= (now - rateUnit.id.toLong * 24 * 60 * 60 * 1000), "analyzerId" ~= worker.id), Seq(selectCount)).map { s
stats(and("createdAt" ~>= (now - rateUnit.id.toLong * 24 * 60 * 60 * 1000), "workerId" ~= worker.id), Seq(selectCount)).map { s
val count = (s \ "count").as[Long]
logger.info(s"$count analysis found (limit is $rate)")
count < rate
Expand All @@ -330,7 +330,7 @@ class JobSrv(
logger.info(s"Looking for similar job (worker=${worker.id}, dataType=$dataType, data=$dataAttachment, tlp=$tlp, parameters=$parameters")
val now = new Date().getTime
find(and(
"analyzerId" ~= worker.id,
"workerId" ~= worker.id,
"status" ~!= JobStatus.Failure,
"status" ~!= JobStatus.Deleted,
"startDate" ~>= (now - cache.toMillis),
Expand Down
2 changes: 1 addition & 1 deletion version.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version in ThisBuild := "2.1.1"
version in ThisBuild := "2.1.2"
2 changes: 1 addition & 1 deletion www/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cortex",
"version": "2.1.1",
"version": "2.1.2",
"description": "A powerfull observable analysis engine",
"license": "AGPL-v3",
"homepage": "https://github.com/TheHive-Project/Cortex",
Expand Down

0 comments on commit 154672e

Please sign in to comment.