Commit Graph
609 Commits
Author SHA1 Message Date
Jokob @NetAlertX 14a34dfd51 Merge pull request #1748 from netalertx/main
sync
2026-08-17 07:44:34 +10:00
Aditya Raj Singh 5c6faaba2a Document the new ntfy settings and stop leaking the custom header value
Adds README examples for the custom header and URL query string settings,
and handles requests' InvalidHeader separately: its message embeds the
offending header value, so logging it leaked NTFY_CUSTOMHEADER_VALUE into
the plugin result file and the UI.
2026-08-17 01:24:33 +05:30
Aditya Raj Singh a297bf18c6 Add custom header and URL query string options to the ntfy publisher
Lets users authenticate ntfy notifications through a reverse proxy or tunnel
(Pangolin, Tailscale, ...) in front of the ntfy instance. Adds three optional,
backward-compatible settings that default to empty and are no-ops when unset:

- NTFY_URL_QUERY_STRING: appended to the request URL (e.g. p_token=...). A
  leading '?' is tolerated, and the value is redacted from error logs / the
  plugin result file since the request URL can carry a secret token.
- NTFY_CUSTOMHEADER_NAME / NTFY_CUSTOMHEADER_VALUE: a custom request header,
  skipped with a warning if it would clobber a built-in header (e.g.
  Authorization) so ntfy's own auth stays intact.

Secret-bearing fields are password-masked in the UI. Addresses #1663.
2026-08-17 01:24:33 +05:30
jokob-sk 2ec90334d5 PLG:ADGUARDIMP add static_leases #1746 #1742 2026-08-16 08:31:01 +10:00
jokob-sk 85918cc4e0 PLG:ADGUARDIMP add static_leases #1746 #1742 2026-08-15 12:48:08 +10:00
jokob-sk 383ab12eb1 PLG: UNIFIAPI devVlan, devSite import #1741 2026-08-15 12:31:11 +10:00
jokob-sk 9adb39e0b3 Merge branch 'next_release' of github.com:netalertx/NetAlertX into next_release 2026-08-15 12:21:24 +10:00
jokob-sk f33800f2d6 PLG: UNIFIAPI devVlan, devSite import #1741 2026-08-15 12:21:01 +10:00
Jokob @NetAlertX 3196b8088a Merge pull request #1744 from netalertx/copilot/fix-devcomments-xml-issue
Escape notification HTML device fields and fall back on indent errors
2026-08-15 10:15:38 +10:00
copilot-swe-agent[bot]andjokob-sk 13da2ddbf1 fix: use valid notification fallback log level
Co-authored-by: jokob-sk <96159884+jokob-sk@users.noreply.github.com>
2026-08-14 23:51:15 +00:00
copilot-swe-agent[bot]andjokob-sk 44ed53cb69 test: cover escaped notification html fallback
Co-authored-by: jokob-sk <96159884+jokob-sk@users.noreply.github.com>
2026-08-14 15:34:07 +00:00
copilot-swe-agent[bot]andjokob-sk 0197e7c2cf fix: escape notification HTML device fields
Co-authored-by: jokob-sk <96159884+jokob-sk@users.noreply.github.com>
2026-08-14 15:29:44 +00:00
Jokob @NetAlertX f14364335b Merge pull request #1739 from netalertx/copilot/fix-nic-child-relationship-issue
Fix: NIC child presence no longer forces a directly-detected parent offline (#1736)
2026-08-13 19:20:28 +10:00
copilot-swe-agent[bot]andjokob-sk f52cc50705 fix: address review feedback on NIC presence logic and tests
- Replace max() with explicit if/else for readability
- Use db_test_helpers (make_db, make_device_dict, insert_device_from_dict,
  DummyDB) instead of local mock DB objects in test_nic_presence.py
- Lowercase all MAC addresses in tests

Co-authored-by: jokob-sk <96159884+jokob-sk@users.noreply.github.com>
2026-08-13 08:52:43 +00:00
copilot-swe-agent[bot]andjokob-sk 283bea21c9 fix: NIC child presence no longer forces a directly-detected parent offline
When a parent device has NIC children, update_devPresentLastScan_based_on_nics
previously replaced the parent's devPresentLastScan unconditionally with the
NIC-derived value. This discarded any genuine direct detection of the parent:
if the parent was found by ARP/save_own_device (present=1) but its NIC child
was absent (present=0), the NIC step forced the parent back to 0. The next
scan re-detected the parent → Connected event → NIC forced it down again,
producing an endless one-directional Connected event stream.

Fix: use max(original, nic_derived) so NIC children can only raise a parent's
presence (bring an undetected parent online), never lower it when the parent
itself was directly detected this cycle.

Adds test/scan/test_nic_presence.py covering the exact regression scenario
and surrounding cases (raise, no-NIC unchanged, req_all modes).

Fixes #1736

Co-authored-by: jokob-sk <96159884+jokob-sk@users.noreply.github.com>
2026-08-13 08:44:00 +00:00
copilot-swe-agent[bot]andjokob-sk 2dc2207228 fix: remove localtime modifier from skip_repeated_notifications cooldown comparison; add UTC regression tests
Co-authored-by: jokob-sk <96159884+jokob-sk@users.noreply.github.com>
2026-08-13 06:23:09 +00:00
Jokob @NetAlertX a06dc259a8 Refactor plugin paths in scripts and tests to ensure consistent directory structure 2026-08-10 03:51:23 +00:00
Jokob @NetAlertX 9e38cfd8b4 Add website monitoring plugin and update workflows configuration
- Introduced a new plugin for monitoring website health, including functionality to check URLs and log results.
- Created README and configuration files for the workflows plugin, detailing its purpose and settings.
- Updated import paths in various test files to reflect the new directory structure.
- Ensured compatibility of test cases with the updated plugin architecture.
2026-08-10 02:32:49 +00:00
jokob-sk 1aea4e8216 DOCS: email 2026-07-25 10:25:33 +10:00
jokob-sk 02987fa558 BE+FE: NOTI TEXT template -> textarea 2026-07-25 09:58:15 +10:00
jokob-sk 2396bb610a DOCS: email update 2026-07-25 08:11:08 +10:00
jokob-sk 056f5ed2a4 PLG+BE: more notification fields + RSTIMP devVlan in SET_ALWAYS #1719 2026-07-24 08:19:37 +10:00
jokob-sk 62bcb077d7 BE: preheader + typo 2026-07-13 19:52:04 +10:00
jokob-sk e294a1833d BE: review fixes 2026-07-12 10:39:07 +10:00
jokob-sk 1636d155c7 BE+FE: report findinfg fixes + css 2026-07-12 10:26:53 +10:00
jokob-sk 7f4c7907be BE: better notification preview 2026-07-10 12:06:45 +10:00
jokob-sk 2658d5703e BE+FE: less logging bloat + better notification preview + skeletons 2026-07-09 13:34:54 +10:00
jokob-sk 7e6189cbd4 BE+FE: change log 2026-07-06 15:00:41 +10:00
jokob-sk e0449bed8e BE+FE: change log 2026-07-05 22:38:29 +10:00
Jokob @NetAlertX 18ec0ce96c feat: Implement DevicesHistory feature with triggers and history tracking
- Added db_history.py to manage DevicesHistory table and triggers for INSERT and UPDATE operations.
- Created device_history_instance.py for querying and grouping DevicesHistory records.
- Developed change_history.php for displaying device change history with filtering and pagination.
- Introduced skel_device_details_tab_history.php for skeleton loading state in device details tab.
- Added unit tests in test_device_history.py to validate trigger functionality and history management.
- Implemented filter population and pagination in the change history UI.
2026-07-04 23:34:52 +00:00
jokob-sk 351b6a7d28 BE: unable to exclude loacl_MAC entries #1700 2026-07-04 09:36:24 +10:00
jokob-sk 9b297b218f Merge branch 'next_release' of github.com:netalertx/NetAlertX into next_release 2026-07-02 08:08:46 +10:00
jokob-sk 2eb3f88426 BE: clearer setings initializing message #1696 2026-07-02 08:08:31 +10:00
Jokob @NetAlertX 636b0d9ca7 Add 'not_equals' and 'not_contains' operators; enhance workflow examples and tests 2026-07-01 08:14:00 +00:00
Jokob @NetAlertX f52e303c19 FE: add 'Wait for settings reload' option to UI settings 2026-06-21 01:08:56 +00:00
Jokob @NetAlertX 102a62c8b7 FE: enhance settings save functionality with reload wait detection and background processing 2026-06-21 00:57:17 +00:00
Jokob @NetAlertX 4075aa469b Merge pull request #1675 from netalertx/next_release
Next release
2026-06-17 15:37:23 +10:00
Jokob @NetAlertX 26b337d6a7 feat(workflows): Enhance device management with query capabilities and conflict resolution
- Added `queryByConditions` method to `DeviceInstance` for flexible device querying based on dynamic conditions.
- Introduced `interpolate_tokens` function to replace placeholders in action values with actual device data.
- Updated `UpdateFieldAction` to handle cross-device updates and archive conflicting MAC addresses.
- Implemented cascade prevention in `WorkflowManager` to avoid processing events for devices modified in the same batch.
- Added unit tests for new functionalities, including token interpolation, condition querying, and action execution.
- Created constants for device column validation to enhance security and maintainability.
- Established a structured research skill specification to guide development practices.
2026-06-16 11:40:28 +00:00
Jokob @NetAlertX 62c4833d0f Merge pull request #1672 from netalertx/next_release
BE: Removal of stdout.log
2026-06-14 10:58:09 +10:00
jokob-sk 76e7cc7b3d BE: Removal of stdout.log 2026-06-14 10:35:08 +10:00
Arvuno 6819f14448 feat(server): optional default for get_setting_value
get_setting_value returns an empty string when a key is not found,
which forces every call site to remember to treat '' as a sentinel
and provide its own fallback. The fallback is sometimes a hard-coded
default and sometimes a different code path entirely, leading to
inconsistent handling across the codebase.

Add an optional  argument that defaults to '' (preserves
the existing behaviour for every call site) and is returned when
the key is not present. New call sites can opt into a more
meaningful default without changing the function's signature for
existing callers.

Refs #1626.
2026-06-03 19:54:35 +00:00
Jokob @NetAlertX fb054e9144 merge 2026-05-24 22:08:06 +00:00
Jokob @NetAlertX c20891d176 Refactor storage path initialization in sync endpoint to use environment variable 2026-05-24 21:28:29 +00:00
jokob-sk c933376deb BE: SYNC API logging 2026-05-24 22:09:09 +10:00
Jokob @NetAlertX 5910a7c2a1 BE: Refactor sync endpoint to accept JSON payloads and update related tests #1652 2026-05-24 01:11:00 +00:00
Jokob @NetAlertX 0cb7ad6332 BE:Fix push mode for plugins #1652 2026-05-24 00:36:23 +00:00
Jokob @NetAlertX 87a89f3a28 Add active_labels parameter to resolve_devices for selective strategy execution 2026-05-22 23:00:25 +00:00
Jokob @NetAlertX 88231d97c8 Enhance documentation and implement SET_ALWAYS functionality for device name resolution #1650 2026-05-22 22:50:33 +00:00
jokob-sk 292223e062 BE+FE: timestamps for sessions and emails corrected #1639 2026-05-16 14:21:39 +10:00
jokob-sk bf4e0b4a7c BE+FE: timestamps for sessions and emails corrected #1639 2026-05-16 14:13:59 +10:00