From 7424cf4645459a1a47bde1bb30d1a46f0c670021 Mon Sep 17 00:00:00 2001 From: Jokob-sk Date: Sun, 18 Feb 2024 08:28:08 +1100 Subject: [PATCH] =?UTF-8?q?docs=20=F0=9F=93=9A=20+=20work=20on=20#569?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- docs/BACKUPS.md | 4 ++-- docs/README.md | 1 + front/devices.php | 24 ++++++++++++------------ front/plugins/csv_backup/README.md | 2 +- 5 files changed, 17 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 6914da84..02d44964 100755 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Get visibility of what's going on on your WIFI/LAN network. Scan for devices, po [![GitHub Committed](https://img.shields.io/github/last-commit/jokob-sk/Pi.Alert?color=40ba12&label=Committed&logo=GitHub&logoColor=fff)](https://github.com/jokob-sk/Pi.Alert) [![Docker Size](https://img.shields.io/docker/image-size/jokobsk/pi.alert?label=Size&logo=Docker&color=0aa8d2&logoColor=fff)](https://hub.docker.com/r/jokobsk/pi.alert) [![Docker Pulls](https://img.shields.io/docker/pulls/jokobsk/pi.alert?label=Pulls&logo=docker&color=0aa8d2&logoColor=fff)](https://hub.docker.com/r/jokobsk/pi.alert) -![GitHub Release](https://img.shields.io/github/v/release/jokob-sk/Pi.Alert?color=0aa8d2&logoColor=fff&logo=GitHub) +[![GitHub Release](https://img.shields.io/github/v/release/jokob-sk/Pi.Alert?color=0aa8d2&logoColor=fff&logo=GitHub)](https://github.com/jokob-sk/Pi.Alert/releases) [![GitHub Sponsors](https://img.shields.io/github/sponsors/jokob-sk?style=social)](https://github.com/sponsors/jokob-sk) | 🐳 [Docker hub](https://registry.hub.docker.com/r/jokobsk/pi.alert) | 📑 [Docker guide](https://github.com/jokob-sk/Pi.Alert/blob/main/dockerfiles/README.md) |🆕 [Release notes](https://github.com/jokob-sk/Pi.Alert/releases) | 📚 [All Docs](https://github.com/jokob-sk/Pi.Alert/tree/main/docs) | diff --git a/docs/BACKUPS.md b/docs/BACKUPS.md index b4809f38..01247d5a 100755 --- a/docs/BACKUPS.md +++ b/docs/BACKUPS.md @@ -44,7 +44,7 @@ Historical data is stored in the `pialert.db` database (See [Database overview]( ## 🧭 Backup strategies -The safest approach to backups is to backup all of the above with, by taking regular file system backups (I use [Kopia](https://github.com/kopia/kopia)). +The safest approach to backups is to backup all of the above, by taking regular file system backups (I use [Kopia](https://github.com/kopia/kopia)). Arguably, the most time is spent setting up the device list, so if only one file is kept I'd recommend to have a latest backup of the `devices_.csv` file, followed by the `pialert.conf` file. @@ -64,7 +64,7 @@ To restore the application map the above files as described in the [Setup docume ### Scenario 2: Corrupted database -End-result: Partial restore (historical data & Configuration from the Maintenance section will be missing) +End-result: Partial restore (historical data & configurations from the Maintenance section will be missing) #### Source artifacts: diff --git a/docs/README.md b/docs/README.md index e4643380..68878d68 100755 --- a/docs/README.md +++ b/docs/README.md @@ -32,6 +32,7 @@ There is also an in-app Help / FAQ section that should be answering frequently a - [Custom Icon configuration and support](/docs/ICONS.md) - [Better name resolution with Reverse DNS](/docs/REVERSE_DNS.md) - [Network treemap configuration](/docs/NETWORK_TREE.md) +- [Backups](/docs/BACKUPS.md) #### 🐛 Debugging help & tips diff --git a/front/devices.php b/front/devices.php index 9245e2f3..a56b29b1 100755 --- a/front/devices.php +++ b/front/devices.php @@ -359,19 +359,19 @@ function filterDataByStatus(data, status) { case 'my': to_display = getSetting('UI_MY_DEVICES'); - let result = false; + let 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; - } + if (!to_display.includes('down') && item.dev_PresentLastScan === 0 && item.dev_AlertDeviceDown !== 0) { + result = false; + } else if (!to_display.includes('new') && item.dev_NewDevice === 1) { + result = false; + } else if (!to_display.includes('archived') && item.dev_Archived === 1) { + result = false; + } else if (!to_display.includes('offline') && item.dev_PresentLastScan === 0) { + result = false; + } else if (!to_display.includes('online') && item.dev_PresentLastScan === 1) { + result = false; + } return result; // Include all items for 'my' status case 'connected': diff --git a/front/plugins/csv_backup/README.md b/front/plugins/csv_backup/README.md index ef2dc287..13ba21b6 100755 --- a/front/plugins/csv_backup/README.md +++ b/front/plugins/csv_backup/README.md @@ -12,7 +12,7 @@ ## Overview -Plugin generating CSV backups of your Devices database table, including the network mappings. Can be used for importing your setup via the Maintenance > Backup / Restore > CSV Import feature. +Plugin generating CSV backups of your Devices database table, including the network mappings. Can be used for importing your setup via the Maintenance > Backup / Restore > CSV Import feature (See also: [Devices Bulk Editing](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/DEVICES_BULK_EDITING.md)). ### Usage