-
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.
#232 Add case similarity details in alert preview dialog
- Loading branch information
Showing
9 changed files
with
100 additions
and
5 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
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 @@ | ||
(function() { | ||
'use strict'; | ||
angular.module('theHiveFilters').filter('percentage', function($filter) { | ||
return function(input, decimals) { | ||
return $filter('number')(input * 100, decimals) + '%'; | ||
}; | ||
}); | ||
})(); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<div class="case-item"> | ||
<div class="case-details text-bold">Title</div> | ||
<div class="case-date text-bold">Date</div> | ||
<div class="case-similarity text-bold">Observables</div> | ||
<div class="case-similarity text-bold">IOCs</div> | ||
</div> | ||
|
||
<div class="case-collection" ng-repeat="item in dialog.event.similarCases | orderBy:['-similarIocCount','-similarArtifactCount', '-iocCount', '-startDate']"> | ||
<div class="case-item" > | ||
<!-- case severity --> | ||
<div class="case-tlp bg-tlp-{{item.tlp}}"></div> | ||
|
||
<!-- case title and main details --> | ||
<div class="case-details"> | ||
<div class="case-title"> | ||
<a ui-sref="app.case.details({caseId: item.id})">#{{item.caseId}} - {{item.title}}</a> | ||
</div> | ||
<div class="case-tags flexwrap mt-xxs"> | ||
<span class="mr-xxxs text-muted"><i class="fa fa-tags"></i></span> | ||
<strong class="text-muted mr-xxxs" ng-if="!item.tags || item.tags.length === 0">None</strong> | ||
<span ng-repeat="tag in item.tags track by $index" class="label label-primary mb-xxxs mr-xxxs pointer">{{tag}}</span> | ||
</div> | ||
<div class="text-success" ng-show="item.status !== 'Open'"> | ||
<small> | ||
(Closed at {{item.endDate | showDate}} as <strong>{{dialog.CaseResolutionStatus[item.resolutionStatus]}}</strong>) | ||
</small> | ||
</div> | ||
<div class="text-danger" ng-if="item.mergeFrom"> | ||
<small> | ||
Merged from <a href ui-sref="app.case.details({caseId: item.mergeFrom[0]})"> Case #{{item.stats.mergeFrom[0].caseId}}</a> and | ||
<a href ui-sref="app.case.details({caseId: item.mergeFrom[1]})"> Case #{{utem.stats.mergeFrom[1].caseId}}</a> | ||
</small> | ||
</div> | ||
</div> | ||
|
||
<div class="case-severity"> | ||
<div class="clickable"> | ||
<severity active="false" value="item.severity"></severity> | ||
</div> | ||
</div> | ||
|
||
<div class="case-date"> | ||
<span uib-tooltip="{{item.startDate | showDate}}" tooltip-popup-delay="500" tooltip-placement="bottom">{{item.startDate | shortDate}}</span> | ||
</div> | ||
|
||
<div class="case-similarity"> | ||
<div> | ||
<strong>{{item.similarArtifactCount}} / {{item.artifactCount}}</strong> | ||
<uib-progressbar class="progress" max="item.artifactCount" value="item.similarArtifactCount" type="primary"> | ||
<i>{{(item.similarArtifactCount / item.artifactCount) | percentage:0}}</i> | ||
</uib-progressbar> | ||
</div> | ||
</div> | ||
<div class="case-similarity"> | ||
<div ng-if="item.iocCount > 0"> | ||
<strong>{{item.similarIocCount}} / {{item.iocCount}}</strong> | ||
<uib-progressbar class="progress" max="item.iocCount" value="item.similarIocCount" type="danger"> | ||
<i>{{(item.similarIocCount / item.iocCount) | percentage:0}}</i> | ||
</uib-progressbar> | ||
</div> | ||
<div ng-if="item.iocCount === 0"> | ||
<em>N/A</em> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |