-
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.
#1625 Redesign the observable flag info in the list view
- Loading branch information
Showing
5 changed files
with
76 additions
and
22 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
21 changes: 21 additions & 0 deletions
21
frontend/app/scripts/components/common/observable-flags.component.js
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,21 @@ | ||
(function() { | ||
'use strict'; | ||
|
||
angular.module('theHiveComponents') | ||
.component('observableFlags', { | ||
controller: function() { | ||
this.filterBy = function(fieldName, newValue) { | ||
this.onFilter({ | ||
fieldName: fieldName, | ||
value: newValue | ||
}); | ||
}; | ||
}, | ||
controllerAs: '$ctrl', | ||
templateUrl: 'views/components/common/observable-flags.component.html', | ||
bindings: { | ||
observable: '<', | ||
onFilter: '&' | ||
} | ||
}); | ||
})(); |
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
49 changes: 49 additions & 0 deletions
49
frontend/app/views/components/common/observable-flags.component.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<div class="observable-flags"> | ||
<!-- IOC flag --> | ||
<div ng-if="!!$ctrl.observable.ioc" class="observable-ioc clickable" uib-tooltip="is an IOC" tooltip-popup-delay="500" tooltip-placement="bottom" | ||
ng-click="$ctrl.filterBy('ioc', true)"> | ||
<i class="fa fa-star"></i> | ||
</div> | ||
<div ng-if="!!!$ctrl.observable.ioc" class="observable-ioc clickable" | ||
ng-click="$ctrl.filterBy('ioc', false)"> | ||
<i class="fa fa-star text-disabled"></i> | ||
</div> | ||
|
||
<!-- Sighted flag --> | ||
<div ng-if="!!$ctrl.observable.sighted" class="observable-ioc clickable" uib-tooltip="has been sighted" tooltip-popup-delay="500" tooltip-placement="bottom" | ||
ng-click="$ctrl.filterBy('sighted', true)"> | ||
<i class="fa fa-toggle-on"></i> | ||
</div> | ||
<div ng-if="!!!$ctrl.observable.sighted" class="observable-ioc clickable" | ||
ng-click="$ctrl.filterBy('sighted', false)"> | ||
<i class="fa fa-toggle-on text-disabled"></i> | ||
</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"> | ||
<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"> | ||
<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" | ||
ng-click="$ctrl.filterBy('ignoreSimilarity', true)"> | ||
<i class="fa fa-chain-broken"></i> | ||
</div> | ||
<div ng-if="!!!$ctrl.observable.ignoreSimilarity" class="observable-ioc clickable" | ||
ng-click="$ctrl.filterBy('ignoreSimilarity', false)"> | ||
<i class="fa fa-chain-broken text-disabled"></i> | ||
</div> | ||
|
||
|
||
|
||
<!-- <span | ||
uib-tooltip="{{artifact.extraData.seen.seen}} related artifact(s)" | ||
tooltip-placement="bottom" | ||
ng-if="artifact.extraData.seen.seen > 0" | ||
class="glyphicon glyphicon-eye-open" | ||
></span> --> | ||
|
||
</div> |
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