From b855fca9be0346a3f6d497cab2a33226f029b97e Mon Sep 17 00:00:00 2001 From: leiweibau <105860611+leiweibau@users.noreply.github.com> Date: Thu, 21 Jul 2022 22:31:46 +0200 Subject: [PATCH] improve pushsafer support - merged commit https://github.com/leiweibau/Pi.Alert/commit/7beec7f584600f13506f21d59154b3205e8b4551 - merged parts of commit https://github.com/Final-Hawk/Pi.Alert/commit/70b6ccc52382e18ac593b36cbfba92c2ce2486a8 - add headline/titel in pushsafer notification --- back/pialert.py | 2 +- back/report_template.html | 38 ++++++++++++++++++-------------------- back/report_template.txt | 20 +++++++------------- 3 files changed, 26 insertions(+), 34 deletions(-) diff --git a/back/pialert.py b/back/pialert.py index 150d340b..ebb1dcc5 100644 --- a/back/pialert.py +++ b/back/pialert.py @@ -1388,7 +1388,7 @@ def email_reporting (): def send_pushsafer (_Text): url = 'https://www.pushsafer.com/api' post_fields = { -# "t" : 'Pi.Alert Message', + "t" : 'Pi.Alert Message', "m" : _Text, "s" : 11, "v" : 3, diff --git a/back/report_template.html b/back/report_template.html index 0bc0ecc0..e6b340ad 100644 --- a/back/report_template.html +++ b/back/report_template.html @@ -14,20 +14,19 @@ - +
- @@ -36,9 +35,9 @@
+ Pi.Alert Report
- - - - - +
Report Date: Scan Cycle: Server:
+ + +
Report Date: Scan Cycle:
-

Internet:

+

Internet:

- +
@@ -53,11 +52,11 @@ -

New Devices:

+

New Devices:

-
Event Type Datetime
+
- + @@ -71,9 +70,9 @@ -

Devices Down:

+

Devices Down:

-
MAC MAC Datetime IP Device Name
+
@@ -88,9 +87,9 @@ -

Events:

+

Events:

-
MAC Datetime
+
@@ -108,11 +107,10 @@ @@ -120,4 +118,4 @@
MAC Datetime
- +
- + -
© Puche Pi.Alert - Pi.Alert     () GNU GPLv3
- + \ No newline at end of file diff --git a/back/report_template.txt b/back/report_template.txt index 0d777f57..9a2d72e3 100644 --- a/back/report_template.txt +++ b/back/report_template.txt @@ -1,27 +1,21 @@ -======================================== - Pi.Alert Report -======================================== - - Report Date: - Scan Cycle: - Server: +Report Date: +Scan Cycle: +Server: Internet ----------------------------------------------------------------------- +---------------------- New Devices ----------------------------------------------------------------------- +---------------------- Devices Down ----------------------------------------------------------------------- +---------------------- Events ----------------------------------------------------------------------- +---------------------- ----------------------------------------------------------------------- -(?) Puche Pi.Alert () GNU GPLv3