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
1313 * Improve the error popup window to make its contents more readable (PR #304 by Radek Vyhnal).
1414 * Tests: Update/Fix Debian package build scripts (PR #305 by Sebastian Wagner).
1515
16+ ### Configuration
17+ - Sort bots alphabetically in side menu (PR #298 by Psych0meter).
18+
16193.3.0 (2024-03-01)
1720------------------
1821
Original file line number Diff line number Diff line change @@ -86,7 +86,15 @@ function load_bots(config) {
8686 let $bot_group = $ ( "#templates > ul.side-menu > li" ) . clone ( ) . prependTo ( "#side-menu" ) . css ( "border-bottom-color" , GROUP_COLORS [ bot_group ] [ 0 ] ) ;
8787 $bot_group . find ( "> a" ) . prepend ( bot_group ) ;
8888 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 ) {
9098 let bot = group [ bot_name ] ;
9199 let $bot = $bot_group . find ( "ul > li:first" ) . clone ( ) . appendTo ( $ ( "ul" , $bot_group ) )
92100 . attr ( "title" , bot . description )
You can’t perform that action at this time.
0 commit comments