-
Notifications
You must be signed in to change notification settings - Fork 640
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop-th4' into feature-taxonomy
- Loading branch information
Showing
36 changed files
with
905 additions
and
296 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
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,48 @@ | ||
package org.thp.thehive.dto.v1 | ||
|
||
import org.thp.thehive.dto.v1.ObservablesFilter.ObservablesFilter | ||
import org.thp.thehive.dto.v1.TasksFilter.TasksFilter | ||
import play.api.libs.json.{Format, Json, Writes} | ||
|
||
import java.util.Date | ||
|
||
case class InputShare(organisationName: String, profile: String, tasks: TasksFilter, observables: ObservablesFilter) | ||
|
||
object TasksFilter extends Enumeration { | ||
type TasksFilter = Value | ||
|
||
val all: TasksFilter = Value("all") | ||
val none: TasksFilter = Value("none") | ||
|
||
implicit val format: Format[TasksFilter] = Json.formatEnum(TasksFilter) | ||
} | ||
|
||
object ObservablesFilter extends Enumeration { | ||
type ObservablesFilter = Value | ||
|
||
val all: ObservablesFilter = Value("all") | ||
val none: ObservablesFilter = Value("none") | ||
|
||
implicit val format: Format[ObservablesFilter] = Json.formatEnum(ObservablesFilter) | ||
} | ||
|
||
object InputShare { | ||
implicit val writes: Writes[InputShare] = Json.writes[InputShare] | ||
} | ||
|
||
case class OutputShare( | ||
_id: String, | ||
_type: String, | ||
_createdBy: String, | ||
_updatedBy: Option[String] = None, | ||
_createdAt: Date, | ||
_updatedAt: Option[Date] = None, | ||
caseId: String, | ||
profileName: String, | ||
organisationName: String, | ||
owner: Boolean | ||
) | ||
|
||
object OutputShare { | ||
implicit val format: Format[OutputShare] = Json.format[OutputShare] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
(function() { | ||
'use strict'; | ||
angular.module('theHiveDirectives').directive('alertDuration', function() { | ||
return { | ||
restrict: 'E', | ||
scope: { | ||
start: '=', | ||
end: '=', | ||
icon: '@', | ||
indicator: '=' | ||
}, | ||
templateUrl: 'views/directives/alert-duration.html' | ||
}; | ||
}); | ||
})(); |
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
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,8 @@ | ||
<span> | ||
<strong ng-if="end" class="text-success" uib-tooltip="Imported after"> | ||
<i class="fa" ng-class="icon"></i> {{indicator ? 'During ' : ''}}{{start | duration:end}} | ||
</strong> | ||
<strong ng-if="!end" class="text-danger" uib-tooltip="Created since"> | ||
<i class="fa" ng-class="icon"></i> {{start | duration}} {{indicator ? 'ago' : ''}} | ||
</strong> | ||
</span> |
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
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
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
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
Oops, something went wrong.