This commit is contained in:
Jokob-sk
2024-02-12 23:13:31 +11:00
parent 42594c0602
commit e99d26b044
2 changed files with 48 additions and 27 deletions

View File

@@ -25,3 +25,39 @@ If you are running a DNS server, such as AdGuard, set up **Private reverse DNS s
4. Make sure you have **Use private reverse DNS resolvers** ticked.
5. Click **Apply** to save your settings.
### Using a custom resolv.conf file
You can configure a custom /etc/resolv.conf file in the docker-compose.yml and set the DNS server of your LAN DNS server (e.g.: Pi-Hole) as the nameserver.
#### docker-compose.yml:
```yaml
version: "3"
services:
pialert:
container_name: pialert
image: "jokobsk/pi.alert:latest"
restart: unless-stopped
volumes:
- ./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
environment:
- TZ=Europe/Berlin
- PORT=20211
- HOST_USER_ID=1000
- HOST_USER_GID=1000
ports:
- "20211:20211"
network_mode: host
```
#### ./config/resolv.conf:
```
nameserver 192.168.178.11
options edns0 trust-ad
search example.com
```

View File

@@ -357,35 +357,20 @@ function filterDataByStatus(data, status) {
return data.filter(function(item) {
switch (status) {
case 'my':
to_display = getSetting('UI_MY_DEVICES')
console.log(to_display)
result = false;
if (to_display.includes('online') && item.dev_PresentLastScan === 1)
{
result = true;
}
to_display = getSetting('UI_MY_DEVICES');
if (to_display.includes('offline') && item.dev_PresentLastScan === 0)
{
result = true;
}
let result = false;
if (to_display.includes('archived') && item.dev_Archived === 1)
{
result = true;
}
if (to_display.includes('new') && item.dev_NewDevice === 1)
{
result = true;
}
if (to_display.includes('down') && item.dev_PresentLastScan === 0 && item.dev_AlertDeviceDown !== 0)
{
result = true;
if (to_display.includes('online') && item.dev_PresentLastScan === 1) {
result = true;
} else if (to_display.includes('offline') && item.dev_PresentLastScan === 0) {
result = true;
} else if (to_display.includes('archived') && item.dev_Archived === 1) {
result = true;
} else if (to_display.includes('new') && item.dev_NewDevice === 1) {
result = true;
} else if (to_display.includes('down') && item.dev_PresentLastScan === 0 && item.dev_AlertDeviceDown !== 0) {
result = true;
}
return result; // Include all items for 'my' status