sync - #1792
Merged
Merged
sync#1792
Conversation
Next release
DOCS: tree docs
Currently translated at 100.0% (836 of 836 strings) Translation: NetAlertX/core Translate-URL: https://hosted.weblate.org/projects/pialert/core/ru/
Signed-off-by: Hsukqi Lee <team@tsinbei.com>
fix(front): make notifications page span full width
BE+PLG: mac case sensitivity causing double detection #1775
DOCS: plugins
FE: Easier icon add in Settings #1773
Next release
Next release
BE: SQL refactor presence
Next release
Next release
Currently translated at 100.0% (838 of 838 strings) Translation: NetAlertX/core Translate-URL: https://hosted.weblate.org/projects/pialert/core/it/
…ainers Read-only enrichment plugin, not an import/discovery plugin. For each configured Docker host (via Docker Socket Proxy, never /var/run/docker.sock directly), lists that host's containers under the host device's own Device Details -> Plugins -> DOCKERDISC tab. - Never creates a device, for either a host or a container - matches against hosts already discovered the normal way (ARP/Nmap). - Every container is listed (bridge/overlay included), not only macvlan/ipvlan ones - a container only gets its own MAC/IP shown when it has a macvlan/ipvlan network. - Host MAC auto-detected via the Socket Proxy's /info -> Devices.devName match, with a manual fallback.
…ambiguous devName, README fix - DockerHost now takes a shared run deadline instead of a per-request timeout duration - every _get() call is capped by whatever's left of that budget (and REQUEST_TIMEOUT_DEFAULT as an upper bound), so one slow/hanging host can't burn the whole RUN_TIMEOUT and starve every other configured host. config.json's hosts param now also sets timeoutMultiplier, scaling the outer kill-timeout by host count. - _get() validates the parsed response's shape (dict for /info, list for /containers/json and /networks) before returning it, rejecting a malformed/unexpected payload the same as a network failure instead of letting a caller crash on it further down. - resolve_host_mac()'s hostname match now detects more than one device sharing that name and treats it as ambiguous (falls back to manual), instead of silently picking an arbitrary one via LIMIT 1. - README: the Socket Proxy is only reachable at 127.0.0.1:2375 under the network_mode: host case described above it, not under normal compose networking - fixed the doc to not imply either URL works there.
Next release
Ensure legacy column references are renamed only if the config file has changed. Fix unnecessary config scan in importConfigs, was causing the container to run at over 80% CPU. QA tested locally, all test passed!
… entity/partial translations/dead spec-file reference - resolve_host_mac()/lookup_device_mac() now use the new DeviceInstance.getAllByName()/getByMac() core methods instead of querying Devices directly - no more direct SQL access from the plugin. - config.json: removed the → HTML entity from a description (plain ASCII ->, matching e.g. pihole_monitor's convention), and dropped the partial es_es/de_de translations scattered through settings/columns (English only now, matching e.g. rest_import) instead of leaving some strings translated and others not. - script.py: removed the two remaining references to PLUGIN_DOCKERDISC_SPEC.md, a file that was never included in this PR.
…on date Per jokob-sk's review - unnecessary details belongs in the PR/commit history, not the docstring (matches CLAUDE.md's own convention: a docstring describes current behavior, not a changelog of why).
CodeRabbit flagged a possible case-sensitivity gap in getByMac() usage. No functional change needed - Devices.devMac is COLLATE NOCASE at the schema level, so getByMac()'s plain equality lookup is already case-insensitive (that's exactly why getAllByName() has to apply it explicitly and getByMac() doesn't - devName has no column collation). This test guards that lookup_device_mac() doesn't do anything of its own that would undo that.
resolve_host_mac() returns the manually configured MAC immediately, with no Socket Proxy /info call at all - the config.json text still described it as a fallback used only when auto-detection fails. Reworded both the setting's own description and the parent "Docker hosts" description to match actual behavior. The case-insensitivity regression test for lookup_device_mac() stubbed DeviceInstance.getByMac() to return a fixed row regardless of input, so it passed even without exercising real collation - functionally a duplicate of test_lookup_device_mac_found. Replaced it with a delegation check, and added real SQLite-backed coverage for DeviceInstance.getByMac()'s case-insensitivity in test/backend/test_device_instance.py. That surfaced a gap in the shared db_test_helpers.py fixture: its Devices.devMac column was missing the COLLATE NOCASE that the real schema declares, so it could not have exercised this behavior. Fixed the fixture to match. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011meLPKCzVpdZyAUfv5U6mm
Currently translated at 100.0% (838 of 838 strings) Translation: NetAlertX/core Translate-URL: https://hosted.weblate.org/projects/pialert/core/fr/
Add DOCKERDISC plugin: enrich existing devices with their Docker containers
Refactor config import logic for legacy column references
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.