mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 01:26:11 -08:00
docs
This commit is contained in:
@@ -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.
|
4. Make sure you have **Use private reverse DNS resolvers** ticked.
|
||||||
5. Click **Apply** to save your settings.
|
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
|
||||||
|
```
|
||||||
@@ -357,35 +357,20 @@ function filterDataByStatus(data, status) {
|
|||||||
return data.filter(function(item) {
|
return data.filter(function(item) {
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case 'my':
|
case 'my':
|
||||||
to_display = getSetting('UI_MY_DEVICES')
|
to_display = getSetting('UI_MY_DEVICES');
|
||||||
|
|
||||||
console.log(to_display)
|
|
||||||
|
|
||||||
result = false;
|
|
||||||
|
|
||||||
if (to_display.includes('online') && item.dev_PresentLastScan === 1)
|
|
||||||
{
|
|
||||||
result = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (to_display.includes('offline') && item.dev_PresentLastScan === 0)
|
let result = false;
|
||||||
{
|
|
||||||
result = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (to_display.includes('archived') && item.dev_Archived === 1)
|
if (to_display.includes('online') && item.dev_PresentLastScan === 1) {
|
||||||
{
|
result = true;
|
||||||
result = true;
|
} else if (to_display.includes('offline') && item.dev_PresentLastScan === 0) {
|
||||||
}
|
result = true;
|
||||||
|
} else if (to_display.includes('archived') && item.dev_Archived === 1) {
|
||||||
if (to_display.includes('new') && item.dev_NewDevice === 1)
|
result = true;
|
||||||
{
|
} else if (to_display.includes('new') && item.dev_NewDevice === 1) {
|
||||||
result = true;
|
result = true;
|
||||||
}
|
} else if (to_display.includes('down') && item.dev_PresentLastScan === 0 && item.dev_AlertDeviceDown !== 0) {
|
||||||
|
result = true;
|
||||||
if (to_display.includes('down') && item.dev_PresentLastScan === 0 && item.dev_AlertDeviceDown !== 0)
|
|
||||||
{
|
|
||||||
result = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return result; // Include all items for 'my' status
|
return result; // Include all items for 'my' status
|
||||||
|
|||||||
Reference in New Issue
Block a user