-
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.
#1579 WIP: Improve filter capabilities in alert similarity panel
- Loading branch information
Showing
7 changed files
with
246 additions
and
9 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
38 changes: 38 additions & 0 deletions
38
frontend/app/views/components/alert/similarity/filters.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,38 @@ | ||
<div class="row"> | ||
<div class="col-md-12 active-filters"> | ||
<h4>Filters</h4> | ||
<form ng-submit="$cmp.search()"> | ||
<div class="row mb-xxxs" ng-repeat="filter in $cmp.filtering.context.filters track by $index"> | ||
<div class="col-sm-4 col-md-4 col-lg-2"> | ||
<div class="input-group"> | ||
<span class="input-group-btn"> | ||
<button class="btn btn-default" type="button" ng-click="$cmp.removeFilter($index)"> | ||
<i class="fa fa-times text-danger"></i> | ||
</button> | ||
</span> | ||
<select class="form-control" ng-model="filter.field" | ||
ng-options="item.name as item.name for (key, item) in $cmp.filtering.attributes" | ||
ng-change="$cmp.filtering.setFilterField(filter, config.entity)"></select> | ||
</div> | ||
</div> | ||
<div class="col-sm-8 col-md-8 col-lg-6"> | ||
<filter-editor metadata="$cmp.filtering.metadata" filter="filter" entity="$cmp.filtering.entity"></filter-editor> | ||
</div> | ||
</div> | ||
<div class="mv-xs row"> | ||
<div class="col-sm-12 col-md-12 col-lg-8"> | ||
<a href class="btn btn-sm btn-link btn-clear" ng-click="$cmp.filtering.addFilter()"> | ||
<i class="fa fa-plus"></i> Add a filter | ||
</a> | ||
<a href class="btn btn-sm btn-danger" ng-click="$cmp.clearFilters()" ng-if="$cmp.filtering.context.filters.length > 0"> | ||
<i class="fa fa-times"></i> Clear | ||
</a> | ||
<button href class="btn btn-sm btn-primary pull-right" type="submit" ng-if="$cmp.filtering.context.filters.length > 0"> | ||
<i class="fa fa-search"></i> Search | ||
</button> | ||
</div> | ||
</div> | ||
</form> | ||
|
||
</div> | ||
</div> |
39 changes: 39 additions & 0 deletions
39
frontend/app/views/components/alert/similarity/toolbar.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,39 @@ | ||
<div class="row"> | ||
<div class="col-md-12"> | ||
<div class="btn-toolbar" role="toolbar"> | ||
|
||
<div class="btn-group" uib-dropdown> | ||
<button class="btn btn-primary btn-sm dropdown-toggle" uib-dropdown-toggle type="button"> | ||
<i class="fa fa-filter"></i> | ||
Quick Filters | ||
<span class="caret"></span> | ||
</button> | ||
<ul class="dropdown-menu" uib-dropdown-menu> | ||
<li> | ||
<a ng-click="$cmp.filterBy('status', 'Open')"><i class="fa fa-folder-open-o"></i> Open cases</a> | ||
</li> | ||
<li> | ||
<a ng-click="$cmp.filterBy('status', 'Resolved')"><i class="fa fa-folder-o"></i> Closed cases</a> | ||
</li> | ||
<li class="divider"></li> | ||
<li> | ||
<a ng-click="$cmp.filterBy('resolutionStatus', 'TruePositive')"><i class="fa fa-exclamation-circle"></i> Closed - True Positive</a> | ||
</li> | ||
<li> | ||
<a ng-click="$cmp.filterBy('resolutionStatus', 'Indeterminate')"><i class="fa fa-question-circle-o "></i> Closed - Indeterminate</a> | ||
</li> | ||
</ul> | ||
</div> | ||
|
||
<div class="btn-group pull-right" role="group"> | ||
<page-sizer collection="$cmp.list" sizes="[1, 2, 3, 10, 15, 30, 100]"></page-sizer> | ||
</div> | ||
|
||
<div class="btn-group pull-right" role="group"> | ||
<button class="btn btn-sm" ng-class="{true: 'btn-primary', false:'btn-default'}[$cmp.filtering.context.showFilters]" type="button" ng-click="$cmp.toggleFilters()"> | ||
<i class="fa fa-search"></i> Filters | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |