diff --git a/dockerfiles/README.md b/dockerfiles/README.md index 5e37bff57..61310a2f7 100755 --- a/dockerfiles/README.md +++ b/dockerfiles/README.md @@ -50,7 +50,7 @@ docker run -d --rm --network=host \ | ✅ | `:/home/pi/pialert/config` | Folder which will contain the `pialert.conf` file (see below for details) | | ✅ | `:/home/pi/pialert/db` | Folder which will contain the `pialert.db` file | | | `:/home/pi/pialert/front/log` | Logs folder useful for debugging if you have issues setting up the container | -| | `:/etc/pihole/pihole-FTL.db` | PiHole's `pihole-FTL.db` database file. Required if you want to use PiHole | +| | `:/etc/pihole/pihole-FTL.db` | PiHole's `pihole-FTL.db` database file. Required if you want to use PiHole DB mapping. | | | `:/etc/pihole/dhcp.leases` | PiHole's `dhcp.leases` file. Required if you want to use PiHole `dhcp.leases` file. This has to be matched with a corresponding `DHCPLSS_paths_to_check` setting entry (the path in the container must contain `pihole`)| | | `:/home/pi/pialert/front/api` | A simple [API endpoint](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/API.md) containing static (but regularly updated) json and other files. | | | `:/home/pi/pialert/front/plugins//ignore_plugin` | Map a file `ignore_plugin` to ignore a plugin. Plugins can be soft-disabled via settings. More in the [Plugin docs](https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/README.md). | @@ -90,7 +90,7 @@ There are 2 approaches how to get PiHole devices imported. Via the PiHole import #### 🧭 Community guides -> Use the official installation guides at first and use community content as suplementary material. Open an issue if you'd like to add your link to the list 🙏 +Use the official installation guides at first and use community content as suplementary material. Open an issue if you'd like to add your link to the list 🙏 - 📄 [How to Install Pi.Alert on Your Synology NAS - Marius hosting (English)](https://mariushosting.com/how-to-install-pi-alert-on-your-synology-nas/) (Updated frequently) - 📄 [Using the PiAlert Network Security Scanner on a Raspberry Pi - PiMyLifeUp (English)](https://pimylifeup.com/raspberry-pi-pialert/) diff --git a/docs/REVERSE_DNS.md b/docs/REVERSE_DNS.md index 390f0e483..1d03b1a0c 100755 --- a/docs/REVERSE_DNS.md +++ b/docs/REVERSE_DNS.md @@ -1,6 +1,7 @@ ## Setting up better name discovery with Reverse DNS -If you are running a DNS server, such as AdGuard, set up **Private reverse DNS servers** for a better name resolution on your network. Enabling this setting will enable PiAlert to execute dig and nslookup comamnds to automatically resolve device names based on their IP addresses. +If you are running a DNS server, such as **AdGuard**, set up **Private reverse DNS servers** for a better name resolution on your network. Enabling this setting will enable PiAlert to execute dig and nslookup commands to automatically resolve device names based on their IP addresses. + > Example 1: Reverse DNS `disabled` > @@ -28,7 +29,7 @@ If you are running a DNS server, such as AdGuard, set up **Private reverse DNS s ### Using a custom resolv.conf file -You can configure a custom **/etc/resolv.conf** file in **docker-compose.yml** and set the nameserver to your LAN DNS server (e.g.: Pi-Hole). +You can configure a custom **/etc/resolv.conf** file in **docker-compose.yml** and set the nameserver to your LAN DNS server (e.g.: Pi-Hole). See the relevant [resolv.conf man](https://www.man7.org/linux/man-pages/man5/resolv.conf.5.html) entry for details. #### docker-compose.yml: @@ -43,7 +44,7 @@ services: - ./config/pialert.conf:/home/pi/pialert/config/pialert.conf - ./pialert_db:/home/pi/pialert/db - ./log:/home/pi/pialert/front/log - - ./config/resolv.conf:/etc/resolv.conf + - ./config/resolv.conf:/etc/resolv.conf # Mapping the /resolv.conf file for better name resolution environment: - TZ=Europe/Berlin - PORT=20211 @@ -56,6 +57,8 @@ services: #### ./config/resolv.conf: +The most important below is the `nameserver` entry (you can add multiple): + ``` nameserver 192.168.178.11 options edns0 trust-ad diff --git a/front/deviceDetails.php b/front/deviceDetails.php index 4adbc431c..81fd73e4c 100755 --- a/front/deviceDetails.php +++ b/front/deviceDetails.php @@ -842,6 +842,8 @@ function initializeCombo (dropdownId, queryAction, txtDataField, useCache) { { // get data from server $.get('php/server/devices.php?action='+queryAction, function(data) { + + console.log(data) var listData = JSON.parse(data); var order = 1; diff --git a/front/php/server/devices.php b/front/php/server/devices.php index c9674e17a..2b34469e0 100755 --- a/front/php/server/devices.php +++ b/front/php/server/devices.php @@ -541,11 +541,11 @@ function getDevicesTotals() { } else { global $db; -f + // combined query $result = $db->query( 'SELECT - (SELECT COUNT(*) FROM Devices '. getDeviceCondition ('all').') as devices, + (SELECT COUNT(*) FROM Devices '. getDeviceCondition ('my').') as devices, (SELECT COUNT(*) FROM Devices '. getDeviceCondition ('connected').') as connected, (SELECT COUNT(*) FROM Devices '. getDeviceCondition ('favorites').') as favorites, (SELECT COUNT(*) FROM Devices '. getDeviceCondition ('new').') as new, @@ -1133,7 +1133,7 @@ function copyFromDevice() { //------------------------------------------------------------------------------ function getDeviceCondition ($deviceStatus) { switch ($deviceStatus) { - case 'all': return 'WHERE dev_Archived=0'; break; + case 'my': return 'WHERE dev_Archived=0'; break; case 'connected': return 'WHERE dev_Archived=0 AND dev_PresentLastScan=1'; break; case 'favorites': return 'WHERE dev_Archived=0 AND dev_Favorite=1'; break; case 'new': return 'WHERE dev_Archived=0 AND dev_NewDevice=1'; break; diff --git a/front/php/templates/language/en_us.json b/front/php/templates/language/en_us.json index 5bf94eb83..316acdd31 100755 --- a/front/php/templates/language/en_us.json +++ b/front/php/templates/language/en_us.json @@ -597,7 +597,7 @@ "UI_LANG_name": "UI Language", "UI_PRESENCE_description": "Select what statuses should be shown in the Device presence chart in the Devices page. (CTRL + Click to select/deselect)", "UI_PRESENCE_name": "Show in presence chart", - "UI_MY_DEVICES_description": "Devices of which statuses should be shown in the default My Devices view. (CTRL + Click to select/deselect)", + "UI_MY_DEVICES_description": "Devices of which statuses should be shown in the default My Devices view. (CTRL + Click to select/deselect)", "UI_MY_DEVICES_name": "Show in My Devices view", "devices_old": "Refreshing...", "general_event_description": "The event you have triggered might take a while until background processes finish. The execution ended once the below execution queue empties (Check the error log if you encounter issues).

Execution queue:",