Skip to content

Commit

Permalink
#1625 Use observable-flags component in case links table
Browse files Browse the repository at this point in the history
  • Loading branch information
nadouani committed Nov 9, 2020
1 parent 92fec30 commit 67f5ac7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
bindings: {
observable: '<',
inline: '<',
hideSimilarity: '<',
hideSeen: '<',
onFilter: '&'
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@
</div>

<!-- Seen flag -->
<div ng-if="$ctrl.observable.extraData.seen.seen > 0" class="observable-seen" uib-tooltip="{{$ctrl.observable.extraData.seen.seen}} related artifact(s)" tooltip-popup-delay="500" tooltip-placement="bottom">
<div ng-if="!!!$ctrl.hideSeen && $ctrl.observable.extraData.seen.seen > 0" class="observable-seen" uib-tooltip="{{$ctrl.observable.extraData.seen.seen}} related artifact(s)" tooltip-popup-delay="500" tooltip-placement="bottom">
<i ng-class="{'text-danger': $ctrl.observable.extraData.seen.ioc}" class="fa fa-eye"></i>
</div>
<div ng-if="!($ctrl.observable.extraData.seen.seen > 0)" class="observable-seen">
<div ng-if="!!!$ctrl.hideSeen && !($ctrl.observable.extraData.seen.seen > 0)" class="observable-seen">
<i class="fa fa-eye-slash text-disabled"></i>
</div>

<!-- Ignore Similarity flag -->
<div ng-if="!!$ctrl.observable.ignoreSimilarity" class="observable-ioc clickable" uib-tooltip="ignored for similarity" tooltip-popup-delay="500" tooltip-placement="bottom"
<div ng-if="!!!$ctrl.hideSimilarity && !!$ctrl.observable.ignoreSimilarity" class="observable-ioc clickable" uib-tooltip="ignored for similarity" tooltip-popup-delay="500" tooltip-placement="bottom"
ng-click="$ctrl.filterBy('ignoreSimilarity', true)">
<i class="fa fa-chain-broken"></i>
</div>
<div ng-if="!!!$ctrl.observable.ignoreSimilarity" class="observable-ioc clickable"
<div ng-if="!!!$ctrl.hideSimilarity && !!!$ctrl.observable.ignoreSimilarity" class="observable-ioc clickable"
ng-click="$ctrl.filterBy('ignoreSimilarity', false)">
<i class="fa fa-chain-broken text-disabled"></i>
</div>
Expand Down
3 changes: 2 additions & 1 deletion frontend/app/views/partials/case/case.links.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@

<div class="case-observables-list">
<div ng-repeat="observable in item.linkedWith | limitTo:displayOptions[item.id]" class="wrap">
<i class="fa fa-star" ng-if="observable.ioc"></i>
<observable-flags observable="observable" inline="true" hide-seen="true" hide-similarity="true"></observable-flags>

<a href ui-sref="app.case.observables-item({caseId: item.id, itemId: observable.id})">
<strong>[{{observable.dataType}}]</strong>:
<span ng-if="observable.attachment"></span>{{observable.attachment.name}}
Expand Down

0 comments on commit 67f5ac7

Please sign in to comment.