diff --git a/README.md b/README.md index 452d6326..27dd0147 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,17 @@ A web frontal that allows: | -------------------- | -------------------- | | ![Screen 3][screen3] | ![Screen 4][screen4] | +### Maintenance +With the work of [jokobsk/Pi.Alert](https://github.com/jokob-sk/Pi.Alert) and own extensions, various possibilities for +maintenance and settings are available on this page: + - DB Backup and Restore + - Theme Selection (blue, red, green, yellow, black, purple) + - Light/Dark-Mode Switch + - DB maintenance tools + +In addition, some information is available (active scans, database size, backup counter). + +![Maintain screen dark][maintain_dark] # Installation @@ -137,4 +148,5 @@ Linux distributions. [report1]: ./docs/img/4_report_1.jpg "Report sample 1" [report2]: ./docs/img/4_report_2.jpg "Report sample 2" [main_dark]: /docs/img/1_devices_dark.jpg "Main screen dark" +[maintain_dark]: /docs/img/5_maintain.jpg "Maintain screen dark" diff --git a/docs/img/5_maintain.jpg b/docs/img/5_maintain.jpg new file mode 100644 index 00000000..98ec38b9 Binary files /dev/null and b/docs/img/5_maintain.jpg differ diff --git a/front/css/pialert.css b/front/css/pialert.css index a56fae81..8b6bf4bf 100644 --- a/front/css/pialert.css +++ b/front/css/pialert.css @@ -119,6 +119,18 @@ margin-left: 0px; } + .fix_maintain_section { + min-height: 650px; + } + +} + + +@media (max-width: 520px) { + .fix_maintain_section { + min-height: 900px; + } + } .sidebar-open .content-wrapper, .sidebar-open .main-footer { @@ -453,7 +465,7 @@ } .dbtools-button { - margin: 5px; display: inline-block; width: 140px; height: 100px; white-space: normal; word-wrap: break-word; font-size: 16px; border-radius: 10px; + margin: 5px; display: inline-block; width: 140px; height: 100px; white-space: normal; word-wrap: break-word; font-size: 16px; border-radius: 10px; margin-bottom: 25px; } .db_info_table_cell:nth-child(1) {background: white} @@ -469,6 +481,7 @@ margin: auto; margin-top: 40px; margin-bottom: 40px; + border: solid 1px #ddd; } .db_info_table_row {display: table-row; padding: 3px; } .db_info_table_cell {display: table-cell; padding: 3px; padding-left: 10px;} diff --git a/front/img/manifest.json b/front/img/manifest.json index b9567963..0e0dfe2c 100644 --- a/front/img/manifest.json +++ b/front/img/manifest.json @@ -2,6 +2,13 @@ "name": "Pi-Alert Console", "short_name": "Pi-Alert", "display": "standalone", - "theme_color": "#367fa9", - "background_color": "#367fa9" + "icons": [ + { + "src": "", + "sizes": "180x180", + "type": "image/png" + } + ], + "theme_color": "#000", + "background_color": "#000" } diff --git a/front/maintenance.php b/front/maintenance.php index b26de1e2..a37f27a6 100644 --- a/front/maintenance.php +++ b/front/maintenance.php @@ -28,7 +28,7 @@ -
+
"); + } else { + $pia_skin_test = ''; + echo(""); + } + } +} ?>
@@ -88,10 +117,36 @@ $latestbackup_date = date ("Y-m-d H:i:s", filemtime($latestbackup));
+
+
+
+
+
Theme Selection:
+
+
+
+
+
+
+
-
+
- + diff --git a/front/php/server/devices.php b/front/php/server/devices.php index ef231d93..abee84d2 100644 --- a/front/php/server/devices.php +++ b/front/php/server/devices.php @@ -272,7 +272,7 @@ function PiaBackupDBtoArchive() { // copy files as a fast Backup if (!copy($file, $newfile)) { - echo "The Backup executed not successfully"; + echo "The original database could not be saved."; } else { // Create archive with actual date $Pia_Archive_Name = 'pialertdb_'.date("Ymd_His").'.zip'; @@ -282,8 +282,9 @@ function PiaBackupDBtoArchive() { if (file_exists($Pia_Archive_Path.$Pia_Archive_Name) && filesize($Pia_Archive_Path.$Pia_Archive_Name) > 0) { echo 'The backup executed successfully with the new archive: ('.$Pia_Archive_Name.')'; unlink($newfile); + echo(""); } else { - echo 'Test backup executed partially successfully. The archive could not be created or is empty. (pialert.db.latestbackup)'; + echo 'The backup executed partially successfully. The archive could not be created or is empty. (pialert.db.latestbackup)'; } } @@ -299,7 +300,7 @@ function PiaRestoreDBfromArchive() { // copy files as a fast Backup if (!copy($file, $oldfile)) { - echo "Test Function executed not successfully"; + echo 'The original database could not be saved.'; } else { // extract latest archive and overwrite the actual pialert.db $Pia_Archive_Path = '../../../db/'; @@ -308,6 +309,7 @@ function PiaRestoreDBfromArchive() { if (file_exists($file)) { echo 'Restore executed successfully'; unlink($oldfile); + echo(""); } else { echo 'Restore Failed. Please restore the backup manually.'; } diff --git a/front/php/templates/header.php b/front/php/templates/header.php index 8228f4fe..662ab471 100644 --- a/front/php/templates/header.php +++ b/front/php/templates/header.php @@ -8,9 +8,14 @@ #--------------------------------------------------------------------------- --> @@ -42,7 +47,7 @@ if (file_exists('../db/darkmode')) { - + @@ -61,7 +66,7 @@ if (file_exists('../db/darkmode')) { - + - onLoad="show_pia_servertime();" > + onLoad="show_pia_servertime();" >