Commit 36d0297 1 parent fe71d1a commit 36d0297 Copy full SHA for 36d0297
File tree 4 files changed +39
-10
lines changed
4 files changed +39
-10
lines changed Original file line number Diff line number Diff line change 9
9
self . menu = {
10
10
follow : false ,
11
11
unfollow : false ,
12
+ markAsRead : false ,
12
13
selectAll : false
13
14
} ;
14
15
self . filtering = new FilteringSrv ( 'misp-section' , {
218
219
219
220
self . menu . unfollow = temp . length === 1 && temp [ 0 ] === true ;
220
221
self . menu . follow = temp . length === 1 && temp [ 0 ] === false ;
222
+
223
+
224
+ temp = _ . uniq ( _ . pluck ( self . selection , 'eventStatus' ) ) ;
225
+
226
+ self . menu . markAsRead = temp . indexOf ( 'Ignore' ) === - 1 ;
221
227
} ;
222
228
223
229
self . select = function ( event ) {
325
331
this . filter ( ) ;
326
332
} ;
327
333
334
+ this . filterByStatus = function ( status ) {
335
+ self . filtering . clearFilters ( )
336
+ . then ( function ( ) {
337
+ self . addFilterValue ( 'eventStatus' , status ) ;
338
+ } ) ;
339
+ } ;
340
+
328
341
this . sortBy = function ( sort ) {
329
342
self . list . sort = sort ;
330
343
self . list . update ( ) ;
331
344
self . filtering . setSort ( sort ) ;
332
345
} ;
333
346
334
347
this . getStatuses = function ( query ) {
335
- return MispSrv . statuses ( query ) ;
348
+ return MispSrv . statuses ( query ) ;
336
349
} ;
337
350
338
351
this . getSources = function ( query ) {
Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ <h4>List of MISP events ({{misp.list.total || 0}} of {{mispEvents.count}})</h4>
120
120
< td class ="text-center "> {{::event.attributeCount}}</ td >
121
121
< td > < a href ng-click ="misp.addFilterValue('publishDate', event.publishDate) "> {{event.publishDate | showDate}}</ a > </ td >
122
122
< td class ="clearfix ">
123
- < div class ="pull-right ">
123
+ < div class ="pull-left ">
124
124
< a class ="btn btn-xs btn-icon btn-clear " href ng-click ="misp.import(event) " uib-tooltip ="Preview and Import " ng-if ="!event.case ">
125
125
< i class ="text-info text-20 fa fa-file-text-o "> </ i >
126
126
</ a >
@@ -130,7 +130,7 @@ <h4>List of MISP events ({{misp.list.total || 0}} of {{mispEvents.count}})</h4>
130
130
< a class ="btn btn-xs btn-icon btn-clear " href ng-click ="misp.follow(event) " uib-tooltip ="{{event.follow ? 'Ignore new updates' : 'Track new updates'}} ">
131
131
< i class ="text-info text-20 fa " ng-class ="{'fa-eye': event.follow, 'fa-eye-slash': !event.follow} "> </ i >
132
132
</ a >
133
- < a class ="btn btn-xs btn-icon btn-clear " href ng-click ="misp.ignore(event) " uib-tooltip ="Mark as read ">
133
+ < a class ="btn btn-xs btn-icon btn-clear " href ng-click ="misp.ignore(event) " uib-tooltip ="Mark as unread " ng-if =" event.eventStatus !== 'Ignore' && !event.case ">
134
134
< i class ="text-info text-20 fa fa-check "> </ i >
135
135
</ a >
136
136
</ div >
Original file line number Diff line number Diff line change 13
13
<a ng-click="misp.bulkImport()">Import</a>
14
14
</li>
15
15
-->
16
- < li ng-show ="misp.menu.follow " ng-click =" misp.bulkFollow(true) " >
17
- < a > Track new updates</ a >
16
+ < li ng-show ="misp.menu.follow ">
17
+ < a href ng-click =" misp.bulkFollow(true) " > Track new updates</ a >
18
18
</ li >
19
- < li ng-show ="misp.menu.unfollow " ng-click =" misp.bulkFollow(false) " >
20
- < a > Ignore new updates</ a >
19
+ < li ng-show ="misp.menu.unfollow ">
20
+ < a href ng-click =" misp.bulkFollow(false) " > Ignore new updates</ a >
21
21
</ li >
22
- < li class ="text-danger ">
23
- < a ng-click ="misp.bulkIgnore() "> Mark as read</ a >
22
+ < li ng-show ="misp.menu.markAsRead ">
23
+ < a href ng-click ="misp.bulkIgnore() "> Mark as read</ a >
24
+ </ li >
25
+ </ ul >
26
+ </ div >
27
+
28
+ < div class ="btn-group " uib-dropdown >
29
+ < button class ="btn btn-primary dropdown-toggle " uib-dropdown-toggle type ="button ">
30
+ < i class ="fa fa-filter "> </ i >
31
+ Quick Filters
32
+ < span class ="caret "> </ span >
33
+ </ button >
34
+ < ul class ="dropdown-menu " uib-dropdown-menu >
35
+ < li >
36
+ < a ng-click ="misp.filterByStatus('New') "> New events ({{mispEvents.New.count || 0}})</ a >
37
+ </ li >
38
+ < li >
39
+ < a ng-click ="misp.filterByStatus('Update') "> Updated events({{mispEvents.Update.count || 0}})</ a >
24
40
</ li >
25
41
</ ul >
26
42
</ div >
Original file line number Diff line number Diff line change 19
19
"bootstrap" : " ~3.3.7" ,
20
20
"bootstrap-sass-official" : " ~3.3.7" ,
21
21
"dropzone" : " ~4.3.0" ,
22
- "font-awesome" : " fontawesome#~4.4 .0" ,
22
+ "font-awesome" : " fontawesome#^4.7 .0" ,
23
23
"jquery" : " ~3.1.0" ,
24
24
"moment" : " ~2.14.1" ,
25
25
"ng-csv" : " ~0.3.6" ,
You can’t perform that action at this time.
0 commit comments