mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-04-03 16:51:24 -07:00
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 <noreply@anthropic.com>
Overview
The plugin uses the MikroTik API to discover devices by retrieving DHCP lease information.
Prerequisites
- API must be enabled in
API > Interfaceson your MikroTik router. - A user must be created in
System > Userson your MikroTik router. Read-only permissions are recommended for security.
Usage
It is recommended to use this plugin in scheduled mode for continuous device discovery and monitoring.
In the Settings section of NetAlertX, provide the following parameters:
- MTSCAN_MT_HOST: IP address of the MikroTik router (default:
192.168.88.1). - MTSCAN_MT_PORT: Port for the MikroTik API (default:
8728). - MTSCAN_MT_USER: Username for the MikroTik router.
- MTSCAN_MT_PASS: Password for the MikroTik router.
Device name resolution order
To assign a meaningful device name, the plugin resolves it in the following order:
- Comment: The
commentfield in the MikroTik router's DHCP lease configuration. This is useful for naming static leases of known devies. - Hostname: The hostname provided by the device during DHCP negotiation.
- "(unknown)": as the fallback name, allowing other plugins to resolve the device name later.
Other info
- Version: 1.0
- Author: lookflying
- Maintainer(s): elraro, kamil-olszewski-devskiller
- Release Date: 12-Sep-2024