From c12f003d160011e8552edbd1c0d6586f7f871a91 Mon Sep 17 00:00:00 2001 From: Psych0meter <38450421+Psych0meter@users.noreply.github.com> Date: Wed, 14 Feb 2024 07:45:25 +0100 Subject: [PATCH 1/2] Sort bots alphabetically for side menu --- intelmq_manager/static/js/configs.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/intelmq_manager/static/js/configs.js b/intelmq_manager/static/js/configs.js index 8dd3b1e..f50c4ce 100644 --- a/intelmq_manager/static/js/configs.js +++ b/intelmq_manager/static/js/configs.js @@ -86,7 +86,15 @@ function load_bots(config) { let $bot_group = $("#templates > ul.side-menu > li").clone().prependTo("#side-menu").css("border-bottom-color", GROUP_COLORS[bot_group][0]); $bot_group.find("> a").prepend(bot_group); let group = config[bot_group]; - for (let bot_name in group) { + + // Sort bots alphabetically + const sortedGroupKeys = Object.keys(group).sort(); + const sortedGroup = {}; + sortedGroupKeys.forEach(key => { + sortedGroup[key] = group[key]; + }); + + for (let bot_name in sortedGroup) { let bot = group[bot_name]; let $bot = $bot_group.find("ul > li:first").clone().appendTo($("ul", $bot_group)) .attr("title", bot.description) From e21118570ff1363b37fbc3891ca2061589293618 Mon Sep 17 00:00:00 2001 From: Psych0meter <38450421+Psych0meter@users.noreply.github.com> Date: Wed, 14 Feb 2024 07:47:05 +0100 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7221ab5..911528d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ SPDX-License-Identifier: AGPL-3.0-or-later CHANGELOG ========= +Unreleased changes +------------------ + +### Configuration +- Sort bots alphabetically in side menu. + 3.2.0 (2023-07-19) ------------------