From 4c117db4635fcac91ecf634db4464617a9a22b19 Mon Sep 17 00:00:00 2001 From: sebingel Date: Fri, 3 Apr 2026 18:28:48 +0000 Subject: [PATCH 1/2] Fix elementOptions: rename typo 'ordeable' to 'orderable' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The key 'ordeable' in elementOptions was a long-standing typo for the correct English word 'orderable'. Since the JS check in settings_utils.js used the same misspelled key, the feature appeared to work — but it was relying on the consistent propagation of a typo across the entire codebase. Two pre-existing entries in front/plugins/ui_settings/config.json already used the correct spelling 'orderable', but these had no effect because the JavaScript check (option.ordeable === 'true') never matched them. As a result, orderable behavior was silently disabled for those two settings. Changes: - front/js/settings_utils.js: renamed option.ordeable → option.orderable and isOrdeable → isOrderable (6 occurrences, lines 792/823/824/880/1079/ 1192/1228). The JS key check is the authoritative definition of the elementOptions property name, so this must change atomically with all config files. - server/initialise.py:245: renamed "ordeable" → "orderable" in the hardcoded JSON string for LOADED_PLUGINS setting. This string is the source-of-truth for that setting's elementOptions and is not auto- generated from the plugin config files. - front/plugins/*/config.json (33 files, 90 occurrences): renamed all "ordeable": "true" entries to "orderable": "true" via sed. All plugins used the typo consistently; they must be updated in the same commit to avoid a broken intermediate state. The two formerly broken 'orderable' entries in ui_settings/config.json are now matched by the corrected JS check and work as intended. Fixes netalertx/NetAlertX#1584 Co-Authored-By: Claude Opus 4.6 --- front/js/settings_utils.js | 14 +++++++------- front/plugins/__template/config.json | 4 ++-- front/plugins/adguard_import/config.json | 4 ++-- front/plugins/arp_scan/config.json | 8 ++++---- front/plugins/asuswrt_import/config.json | 4 ++-- front/plugins/avahi_scan/config.json | 4 ++-- front/plugins/ddns_update/config.json | 4 ++-- front/plugins/dhcp_leases/config.json | 8 ++++---- front/plugins/dhcp_servers/config.json | 4 ++-- front/plugins/dig_scan/config.json | 4 ++-- front/plugins/freebox/config.json | 4 ++-- front/plugins/icmp_scan/config.json | 4 ++-- front/plugins/internet_ip/config.json | 8 ++++---- front/plugins/internet_speedtest/config.json | 4 ++-- front/plugins/ipneigh/config.json | 4 ++-- front/plugins/luci_import/config.json | 4 ++-- front/plugins/mikrotik_scan/config.json | 4 ++-- front/plugins/nbtscan_scan/config.json | 4 ++-- front/plugins/newdev_template/config.json | 6 +++--- front/plugins/nmap_dev_scan/config.json | 4 ++-- front/plugins/nmap_scan/config.json | 4 ++-- front/plugins/notification_processing/config.json | 2 +- front/plugins/nslookup_scan/config.json | 4 ++-- front/plugins/omada_sdn_imp/config.json | 8 ++++---- front/plugins/omada_sdn_openapi/config.json | 8 ++++---- front/plugins/pihole_api_scan/config.json | 4 ++-- front/plugins/pihole_scan/config.json | 8 ++++---- front/plugins/snmp_discovery/config.json | 8 ++++---- front/plugins/sync/config.json | 6 +++--- front/plugins/ui_settings/config.json | 14 +++++++------- front/plugins/unifi_api_import/config.json | 4 ++-- front/plugins/unifi_import/config.json | 8 ++++---- front/plugins/vendor_update/config.json | 8 ++++---- front/plugins/website_monitor/config.json | 4 ++-- server/initialise.py | 2 +- 35 files changed, 98 insertions(+), 98 deletions(-) diff --git a/front/js/settings_utils.js b/front/js/settings_utils.js index dfafde44..2c64e92a 100755 --- a/front/js/settings_utils.js +++ b/front/js/settings_utils.js @@ -789,7 +789,7 @@ const handleElementOptions = (setKey, elementOptions, transformers, val) => { let inputType = "text"; let readOnly = ""; let isMultiSelect = false; - let isOrdeable = false; + let isOrderable = false; let cssClasses = ""; let placeholder = ""; let suffix = ""; @@ -820,8 +820,8 @@ const handleElementOptions = (setKey, elementOptions, transformers, val) => { if (option.multiple === "true") { isMultiSelect = true; } - if (option.ordeable === "true") { - isOrdeable = true; + if (option.orderable === "true") { + isOrderable = true; } if (option.editable === "true") { editable = true; @@ -877,7 +877,7 @@ const handleElementOptions = (setKey, elementOptions, transformers, val) => { inputType, readOnly, isMultiSelect, - isOrdeable, + isOrderable, cssClasses, placeholder, suffix, @@ -1076,7 +1076,7 @@ function collectSetting(prefix, setCodeName, setType, settingsArray) { }, array: () => { let temps = []; - if (opts.isOrdeable) { + if (opts.isOrderable) { temps = $(`#${setCodeName}`).val(); } else { const sel = $(`#${setCodeName}`).attr("my-editable") === "true" ? "" : ":selected"; @@ -1189,7 +1189,7 @@ function generateFormHtml(settingsData, set, overrideValue, overrideOptions, ori inputType, readOnly, isMultiSelect, - isOrdeable, + isOrderable, cssClasses, placeholder, suffix, @@ -1225,7 +1225,7 @@ function generateFormHtml(settingsData, set, overrideValue, overrideOptions, ori switch (elementType) { case 'select': const multi = isMultiSelect ? "multiple" : ""; - const addCss = isOrdeable ? "select2 select2-hidden-accessible" : ""; + const addCss = isOrderable ? "select2 select2-hidden-accessible" : ""; inputHtml += `