-
Notifications
You must be signed in to change notification settings - Fork 625
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
93 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
...onnector/src/main/scala/org/thp/thehive/connector/cortex/controllers/v0/JobRenderer.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package org.thp.thehive.connector.cortex.controllers.v0 | ||
|
||
import org.thp.scalligraph.auth.AuthContext | ||
import org.thp.scalligraph.steps.StepsOps._ | ||
import org.thp.scalligraph.steps.Traversal | ||
import org.thp.thehive.connector.cortex.services.JobSteps | ||
import org.thp.thehive.models.{RichCase, RichObservable} | ||
|
||
trait JobRenderer { | ||
def jobParents( | ||
jobSteps: JobSteps | ||
)(implicit authContext: AuthContext): Traversal[Option[(RichObservable, RichCase)], Option[(RichObservable, RichCase)]] = | ||
jobSteps.observable.project(_.by(_.richObservable).by(_.`case`.richCase)).map(Some(_)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters