NetAlertX
NetAlertX copied to clipboard
cleanDeviceName rewritten to remove all _ labels and remove search list and local domain
This change introduces a new dependency to dnspython.
It removes all labels starting with an underscore.
It does not remove specific domain names like lan, home, ... Instead it removes the domain of the local network and even the search list of the local network.
I have not seen test cases for domain names. It would be really helpfull to collect names and how the users want them to change. For that even the local DNS config would be needed (domain and search list from /etc/resolv.conf)
This is potentially a big change. How can we test this?
I tried to do these changes in my instance, but how can I access the newdev settings?
And how do I enable debug logging?
You can access the setting via get_setting_value("NEWDEV_CLEAN_NAME"). To enable debug logging see this doc: https://github.com/jokob-sk/NetAlertX/blob/main/docs/DEBUG_TIPS.md
Can I access the config through the web ui?
yes, once you define it in teh aforementioned config.json, it will automatically show in the settings > newdev section
My instance doesn't show me that configuration. I am running the docker container jokobsk/netalertx:latest
hummm, can you show me how you defined the new setting in the config.json
: https://github.com/jokob-sk/NetAlertX/blob/main/front/plugins/newdev_template/config.json
I do not have a newdev section at all. In the setting menu I have only the following sections Enabled settings Core System Device scanners Other scanners Publishers
Ah I see, it's here, under System:
OK, this did work for me. Thanks for all the hand holding!
Thanks a lot for the submission and glad to hear it's almost done :) I left a couple of comments to keep the code somewhat consistent. Thanks for the help!