Skip to content

Commit

Permalink
#1625 Display ignoreSimilarity in case and alert observables list
Browse files Browse the repository at this point in the history
  • Loading branch information
nadouani committed Nov 7, 2020
1 parent c7170e3 commit 5c3a9f1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<thead>
<tr>
<th style="width: 10px;" class="p-0"></th>
<th style="width:40px;"></th>
<th style="width:50px;"></th>
<th style="width:100px;">Type</th>
<th>Data</th>
<th style="width: 120px">Date Added</th>
Expand All @@ -36,6 +36,7 @@
<span ng-if="observable.ioc" class="mr-xxs fa fa-star" uib-tooltip="is an IOC" tooltip-popup-delay="500" tooltip-placement="bottom"></span>
<span ng-if="observable.sighted" class="mr-xxs fa fa-toggle-on" uib-tooltip="has been sighted" tooltip-popup-delay="500" tooltip-placement="bottom"></span>
<span ng-if="observable.extraData.seen.seen > 0" class="mr-xxs glyphicon glyphicon-eye-open" ng-class="{'text-danger': observable.extraData.seen.ioc}" uib-tooltip="Seen on {{observable.seen}} existing case(s)" tooltip-popup-delay="500" tooltip-placement="bottom"></span>
<span ng-if="observable.ignoreSimilarity" class="mr-xxs fa fa-chain-broken" uib-tooltip="Ignored for similarity" tooltip-popup-delay="500" tooltip-placement="bottom"></span>
</td>
<td>
<a href ng-click="$cmp.filterBy('dataType', observable.dataType)">{{observable.dataType}}</a>
Expand Down
4 changes: 4 additions & 0 deletions frontend/app/views/partials/observables/list/observables.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ <h4>
<th style="width: 15px"></th>
<th style="width: 15px"></th>
<th style="width: 15px"></th>
<th style="width: 15px"></th>
<th style="width: 100px">
<a href class="text-default" ng-click="sortByField('dataType')">
Type
Expand Down Expand Up @@ -71,6 +72,9 @@ <h4>
<td>
<span ng-click="addFilterValue('sighted', artifact.sighted)" ng-if="artifact.sighted" class="clickable fa fa-toggle-on" uib-tooltip="has been sighted" tooltip-popup-delay="500" tooltip-placement="bottom"></span>
</td>
<td>
<span ng-if="artifact.ignoreSimilarity" class="fa fa-chain-broken" uib-tooltip="ignored from similarity" tooltip-popup-delay="500" tooltip-placement="bottom"></span>
</td>
<td>
<span
uib-tooltip="{{artifact.extraData.seen.seen}} related artifact(s)"
Expand Down
2 changes: 1 addition & 1 deletion thehive/app/org/thp/thehive/services/AlertSrv.scala
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ object AlertOps {
_.selectKeys
.project(
_.by(_.richCaseWithoutPerms)
.by((_: Traversal.V[Case]).observables.groupCount(_.byValue(_.ioc)))
.by((_: Traversal.V[Case]).observables.hasNot(_.ignoreSimilarity, true).groupCount(_.byValue(_.ioc)))
)
)
.by(
Expand Down

0 comments on commit 5c3a9f1

Please sign in to comment.