diff --git a/dockerfiles/README.md b/dockerfiles/README.md index 985abe0e..3bfd3046 100755 --- a/dockerfiles/README.md +++ b/dockerfiles/README.md @@ -18,7 +18,8 @@ ## 📕 Basic Usage -- You will have to run the container on the `host` network, e.g: +> [!WARNING] +> You will have to run the container on the `host` network. ```yaml docker run -d --rm --network=host \ @@ -63,26 +64,16 @@ docker run -d --rm --network=host \ - You can modify [app.conf](https://github.com/jokob-sk/NetAlertX/tree/main/config) directly, if needed. - If unavailable, the app generates a default `app.conf` and `app.db` file on the first run. -#### Important settings +### ⚙ Important settings -These are the most important settings to get at least some output in your Devices screen. Usually, only one approach is used, but you should be able to combine these approaches. +These are the most important settings to get at least some output in your Devices screen. Usually, only one approach is used, but you can combine these approaches. -##### For arp-scan: ARPSCAN_RUN, SCAN_SUBNETS +| Scan method | Setting | Description | +| :------------- | :------------- | :-------------| +| arp-scan, nmap-scan | `SCAN_SUBNETS` | See the documentation on how [to setup SUBNETS, VLANs & limitations](https://github.com/jokob-sk/NetAlertX/blob/main/docs/SUBNETS.md) | +| PiHole | `PIHOLE_RUN` | There are 2 approaches how to get PiHole devices imported. Via the PiHole import (`PIHOLE`) plugin or DHCP leases (`DHCPLSS`) plugin. The `PIHOLE` plugin requires you to map the PiHole database, as mentioned above. | +| dhcp.leases | `DHCPLSS_RUN` | You need to map `:/etc/pihole/dhcp.leases` in the `docker-compose.yml` file if you enable this setting. This path has to be matched with a corresponding `DHCPLSS_paths_to_check` setting entry (If using a PiHole dhcp.leases file the path in the container must contain `pihole` as PiHole uses a different format of the `dhcp.leases` file). | -- ❗ To use the arp-scan method, you need to set the `SCAN_SUBNETS` variable. See the documentation on how [to setup SUBNETS, VLANs & limitations](https://github.com/jokob-sk/NetAlertX/blob/main/docs/SUBNETS.md) - -##### For pihole: PIHOLE_RUN, DHCPLSS_RUN - -There are 2 approaches how to get PiHole devices imported. Via the PiHole import (PIHOLE) plugin or DHCP leases (DHCPLSS) plugin. - -**PiHole (Device sync)** - -* `PIHOLE_RUN`: You need to map `:/etc/pihole/pihole-FTL.db` in the `docker-compose.yml` file if you enable this setting. - -**DHCP Leases (Device import)** - -* `DHCPLSS_RUN`: You need to map `:/etc/pihole/dhcp.leases` in the `docker-compose.yml` file if you enable this setting. -* The above setting has to be matched with a corresponding `DHCPLSS_paths_to_check` setting entry (the path in the container must contain `pihole` as PiHole uses a different format of the `dhcp.leases` file). > [!NOTE] > It's recommended to use the same schedule interval for all plugins responsible for discovering new devices. diff --git a/front/css/app.css b/front/css/app.css index 349f5a86..2d9af0cd 100755 --- a/front/css/app.css +++ b/front/css/app.css @@ -891,12 +891,12 @@ input[readonly] { .interactable-option::before { content: '1x 📝 | 2x 🚮'; - position: absolute; - right: 0; + position: sticky; + right: 0px; top: 0; color: white; + float: right; background-color: rgb(0, 0, 0); - padding: 3px; transition: opacity 0.5s; opacity: 0.1; border-radius: 3px; diff --git a/front/deviceDetails.php b/front/deviceDetails.php index c1c9cb59..7608c181 100755 --- a/front/deviceDetails.php +++ b/front/deviceDetails.php @@ -627,8 +627,8 @@ - - + + diff --git a/front/devices.php b/front/devices.php index 29685d4e..e00bed5c 100755 --- a/front/devices.php +++ b/front/devices.php @@ -25,7 +25,7 @@ checkPermissions([$dbPath, $confPath]); ?> - +
@@ -127,7 +127,7 @@
- +
diff --git a/front/js/common.js b/front/js/common.js index 40277d6c..c7a2e1ba 100755 --- a/front/js/common.js +++ b/front/js/common.js @@ -230,7 +230,7 @@ function cacheStrings() // Get translated language string function getString (key) { - // handle initial laod to make sure everything is set-up and cached + // handle initial load to make sure everything is set-up and cached handleFirstLoad(getString) UI_LANG = getSetting("UI_LANG"); @@ -864,6 +864,15 @@ function getGuid() { // ----------------------------------------------------------------------------- function showSpinner(stringKey='Loading') { + + if(stringKey == "") + { + text = '' + } else + { + text = getString(stringKey) + } + if($("#loadingSpinner").length) { $("#loadingSpinner").show(); @@ -875,7 +884,7 @@ function showSpinner(stringKey='Loading')
- +
${getString(stringKey)}${text}
@@ -1109,9 +1118,9 @@ function isAppInitialized() // Define a function that will execute the code only once function executeOnce() { - if ( !isAppInitialized()) { + showSpinner('') - showSpinner() + if ( !isAppInitialized()) { // Use cache to keep track of completed AJAX calls var tmp_completedCalls = getCache("completedCalls") diff --git a/front/js/settings_utils.js b/front/js/settings_utils.js index 82f1c3d5..3e5cc81e 100755 --- a/front/js/settings_utils.js +++ b/front/js/settings_utils.js @@ -227,6 +227,8 @@ function initListInteractionOptions(selectorId) { $options.on('click', function() { const $option = $(this); + console.log('aaa'); + // Increment click counter clickCounter++; diff --git a/front/multiEditCore.php b/front/multiEditCore.php index 947f57a6..b47a32b2 100755 --- a/front/multiEditCore.php +++ b/front/multiEditCore.php @@ -325,8 +325,8 @@ getData(); - - + + diff --git a/front/php/templates/header.php b/front/php/templates/header.php index dd195f63..7b64220c 100755 --- a/front/php/templates/header.php +++ b/front/php/templates/header.php @@ -30,8 +30,8 @@ require dirname(__FILE__).'/security.php'; - - + + diff --git a/front/php/templates/language/pl_pl.json b/front/php/templates/language/pl_pl.json old mode 100644 new mode 100755 diff --git a/front/php/templates/version.php b/front/php/templates/version.php index f383264e..bb6aed1c 100755 --- a/front/php/templates/version.php +++ b/front/php/templates/version.php @@ -16,6 +16,6 @@ echo file_get_contents($filename); } else{ - echo "File not found"; + echo date('Y-m-d H:i:s') . " - N/A"; } ?> diff --git a/front/plugins/newdev_template/config.json b/front/plugins/newdev_template/config.json index 89ea701f..cca8c6a3 100755 --- a/front/plugins/newdev_template/config.json +++ b/front/plugins/newdev_template/config.json @@ -606,7 +606,7 @@ } ] }, - { + { "function": "LESS_NAME_CLEANUP", "type": "integer.checkbox", "default_value": 0, diff --git a/front/settings.php b/front/settings.php index 02e7242b..5a87c2b6 100755 --- a/front/settings.php +++ b/front/settings.php @@ -53,9 +53,9 @@ while ($row = $result -> fetchArray (SQLITE3_ASSOC)) { - - - + + + @@ -63,7 +63,7 @@ while ($row = $result -> fetchArray (SQLITE3_ASSOC)) {
- +
@@ -487,7 +487,7 @@ while ($row = $result -> fetchArray (SQLITE3_ASSOC)) { options = createArray(val); options.forEach(option => { - inputHtml += ``; + inputHtml += ``; }); @@ -522,7 +522,7 @@ while ($row = $result -> fetchArray (SQLITE3_ASSOC)) { options.forEach(option => { - inputHtml += ``; + inputHtml += ``; }); inputHtml += '
' + @@ -568,7 +568,7 @@ while ($row = $result -> fetchArray (SQLITE3_ASSOC)) { // generate settings in the correct group section $(`#${group} .panel-body`).append(setHtml); - // init remove list item buttons + // init remove and edit listitem click gestures if(['subnets', 'list' ].includes(setType)) { initListInteractionOptions(codeName) diff --git a/server/helper.py b/server/helper.py index ca8f36d1..a526f3d0 100755 --- a/server/helper.py +++ b/server/helper.py @@ -573,8 +573,11 @@ def resolve_device_name_pholus (pMAC, pIP, allRes, nameNotFound, match_IP = Fals import dns.resolver def cleanDeviceName(str, match_IP): + + mylog('debug', ["[Name cleanup] NEWDEV_LESS_NAME_CLEANUP Setting:" + get_setting_value('NEWDEV_LESS_NAME_CLEANUP')]) + if get_setting_value('NEWDEV_LESS_NAME_CLEANUP'): - mylog('debug', ["Using new cleanDeviceName(" + str + ")"]) + mylog('debug', ["[Name cleanup] Using new cleanDeviceName(" + str + ")"]) # replace all labels starting with underscore str = re.sub(r'^_[^\.]*\.', '', str) # leading label @@ -605,13 +608,13 @@ def cleanDeviceName(str, match_IP): str = str + " (IP match)" # done - mylog('debug', ["cleanDeviceName = " + str]) + mylog('debug', ["[Name cleanup] cleanDeviceName = " + str]) return str ################################ # # OLD cleanDeviceName - mylog('debug', ["Using old cleanDeviceName(" + str + ")"]) + mylog('debug', ["[Name cleanup] Using old cleanDeviceName(" + str + ")"]) # alternative str.split('.')[0] str = str.replace("._airplay", "")