File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
intelmq_manager/static/js Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,9 @@ CHANGELOG
13
13
* Improve the error popup window to make its contents more readable (PR #304 by Radek Vyhnal).
14
14
* Tests: Update/Fix Debian package build scripts (PR #305 by Sebastian Wagner).
15
15
16
+ ### Configuration
17
+ - Sort bots alphabetically in side menu (PR #298 by Psych0meter).
18
+
16
19
3.3.0 (2024-03-01)
17
20
------------------
18
21
Original file line number Diff line number Diff line change @@ -86,7 +86,15 @@ function load_bots(config) {
86
86
let $bot_group = $ ( "#templates > ul.side-menu > li" ) . clone ( ) . prependTo ( "#side-menu" ) . css ( "border-bottom-color" , GROUP_COLORS [ bot_group ] [ 0 ] ) ;
87
87
$bot_group . find ( "> a" ) . prepend ( bot_group ) ;
88
88
let group = config [ bot_group ] ;
89
- for ( let bot_name in group ) {
89
+
90
+ // Sort bots alphabetically
91
+ const sortedGroupKeys = Object . keys ( group ) . sort ( ) ;
92
+ const sortedGroup = { } ;
93
+ sortedGroupKeys . forEach ( key => {
94
+ sortedGroup [ key ] = group [ key ] ;
95
+ } ) ;
96
+
97
+ for ( let bot_name in sortedGroup ) {
90
98
let bot = group [ bot_name ] ;
91
99
let $bot = $bot_group . find ( "ul > li:first" ) . clone ( ) . appendTo ( $ ( "ul" , $bot_group ) )
92
100
. attr ( "title" , bot . description )
You can’t perform that action at this time.
0 commit comments