From 5624401fcfc0b4be99799fc0125a8f29eefce213 Mon Sep 17 00:00:00 2001 From: Carlos V <76731844+cvc90@users.noreply.github.com> Date: Sat, 5 Aug 2023 18:51:45 +0200 Subject: [PATCH 1/6] Update report_template.html Modified creator banner url report_template.html --> report_template.html Modified the creators banner adding to cvc90 Removed several white spaces between banner and tag Changed the background color in the table (bgcolor=#00c0ef --> bgcolor=#4b99d3) Changed the color of the text to white in the table (bgcolor=#ffffff --> bgcolor=#4b99d3) Changed the background color in td (bgcolor=#F5F5F5 --> bgcolor=#F1F5F5) Changed the background color in the footer table (bgcolor=#46802e --> bgcolor=#3c8dbc) Added in the footer table the color of the text to white (color: white) Changed footer text --- back/report_template.html | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/back/report_template.html b/back/report_template.html index 4befe628..9ad05238 100755 --- a/back/report_template.html +++ b/back/report_template.html @@ -4,8 +4,11 @@ # # repot_template.html - Back module. Template to email reporting in HTML format #------------------------------------------------------------------------------- -# Puche 2021 GNU GPLv3 -#--------------------------------------------------------------------------- --> +// Puche 2021 pi.alert.application@gmail.com GNU GPLv3 +// jokob-sk 2022 jokob.sk@gmail.com GNU GPLv3 +// leiweibau 2022 https://github.com/leiweibau GNU GPLv3 +// cvc90 2023 https://github.com/cvc90 GNU GPLv3 +//--------------------------------------------------------------------------------> @@ -23,7 +26,7 @@ - +
Report Date:
@@ -31,7 +34,7 @@ - + @@ -39,14 +42,23 @@ + - +
- +
Pi.Alert - + Pi.Alert + () +
©2020 Puche (2022+ + jokob-sk) | Built on: | Version: | + + Docs + +
@@ -54,4 +66,4 @@ - \ No newline at end of file + From d096b36434eb78ec877073e5bf7895918e571bfc Mon Sep 17 00:00:00 2001 From: Carlos V <76731844+cvc90@users.noreply.github.com> Date: Sat, 5 Aug 2023 18:55:02 +0200 Subject: [PATCH 2/6] Update report_template.html Modified creator banner url report_template.html --> report_template.html --- back/report_template.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/back/report_template.html b/back/report_template.html index 9ad05238..d094944a 100755 --- a/back/report_template.html +++ b/back/report_template.html @@ -2,7 +2,7 @@ # Pi.Alert # Open Source Network Guard / WIFI & LAN intrusion detector # -# repot_template.html - Back module. Template to email reporting in HTML format +# report_template.html - Back module. Template to email reporting in HTML format #------------------------------------------------------------------------------- // Puche 2021 pi.alert.application@gmail.com GNU GPLv3 // jokob-sk 2022 jokob.sk@gmail.com GNU GPLv3 From d59eb03f405dea659d1970180843655c2f01c69f Mon Sep 17 00:00:00 2001 From: Carlos V <76731844+cvc90@users.noreply.github.com> Date: Sat, 5 Aug 2023 19:04:54 +0200 Subject: [PATCH 3/6] Update report_template_new_version.html Modified creator banner url report_template.html --> report_template.html Modified the creators banner adding to cvc90 Removed several white spaces between banner and tag Changed the background color in the table (bgcolor=#00c0ef --> bgcolor=#4b99d3) Changed the color of the text to white in the table ( bgcolor=#4b99d3 --> bgcolor=#ffffff) Changed the background color in td (bgcolor=#F5F5F5 --> bgcolor=#F1F5F5) Changed the background color in the footer table (bgcolor=#46802e --> bgcolor=#3c8dbc) Added in the footer table the color of the text to white (color: white) Changed footer text --- back/report_template_new_version.html | 29 ++++++++++++++++++--------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/back/report_template_new_version.html b/back/report_template_new_version.html index 958a6f25..c4669134 100755 --- a/back/report_template_new_version.html +++ b/back/report_template_new_version.html @@ -2,10 +2,13 @@ # Pi.Alert # Open Source Network Guard / WIFI & LAN intrusion detector # -# repot_template.html - Back module. Template to email reporting in HTML format +# report_template_new_version.html - Back module. Template to email reporting in HTML format #------------------------------------------------------------------------------- -# Puche 2021 GNU GPLv3 -#--------------------------------------------------------------------------- --> +// Puche 2021 pi.alert.application@gmail.com GNU GPLv3 +// jokob-sk 2022 jokob.sk@gmail.com GNU GPLv3 +// leiweibau 2022 https://github.com/leiweibau GNU GPLv3 +// cvc90 2023 https://github.com/cvc90 GNU GPLv3 +//--------------------------------------------------------------------------------> @@ -27,7 +30,7 @@ - +
Report Date:
@@ -35,7 +38,7 @@ - + @@ -46,16 +49,22 @@ - +
- +
Pi.Alert - + Pi.Alert + () +
©2020 Puche (2022+ + jokob-sk) | Built on: | Version: | + + Docs + +
- - - \ No newline at end of file + From dcd32b9162777d4f69fa9d09e23904e69579d699 Mon Sep 17 00:00:00 2001 From: Carlos V <76731844+cvc90@users.noreply.github.com> Date: Sat, 5 Aug 2023 19:14:17 +0200 Subject: [PATCH 4/6] Update reporting.py Added creator banner Added import const Changed color in headerProps variable (color:blue --> color:white) Modified bgcolor in headerProps variable (bgcolor=#909090 --> bgcolor=#64a0d6) Modified bgcolor in the thProps variable (bgcolor=#909090 --> bgcolor=#64a0d6) --- pialert/reporting.py | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/pialert/reporting.py b/pialert/reporting.py index c3f6abaa..b25c0ee6 100755 --- a/pialert/reporting.py +++ b/pialert/reporting.py @@ -1,4 +1,14 @@ - + import datetime import json @@ -11,6 +21,7 @@ from json2table import convert # pialert modules import conf +import const from const import pialertPath, logPath, apiPath from helper import noti_struc, generate_mac_links, removeDuplicateNewLines, timeNow, hide_email, updateState, get_file_content, write_file from logger import logResult, mylog, print_log @@ -46,8 +57,8 @@ def construct_notifications(db, sqlQuery, tableTitle, skipText = False, supplied return noti_struc("", "", "") table_attributes = {"style" : "border-collapse: collapse; font-size: 12px; color:#70707", "width" : "100%", "cellspacing" : 0, "cellpadding" : "3px", "bordercolor" : "#C0C0C0", "border":"1"} - headerProps = "width='120px' style='color:blue; font-size: 16px;' bgcolor='#909090' " - thProps = "width='120px' style='color:#F0F0F0' bgcolor='#909090' " + headerProps = "width='120px' style='color:white; font-size: 16px;' bgcolor='#64a0d6' " + thProps = "width='120px' style='color:#F0F0F0' bgcolor='#64a0d6' " build_direction = "TOP_TO_BOTTOM" text_line = '{}\t{}\n' @@ -522,4 +533,4 @@ def handle_test(testType): if testType == 'REPORT_PUSHSAFER': send_pushsafer (sample_msg) - mylog('info', ['[Test Publishers] END Test: ', testType]) \ No newline at end of file + mylog('info', ['[Test Publishers] END Test: ', testType]) From 82d87db7622b1d567d60e14cfa0ab94cedf024f9 Mon Sep 17 00:00:00 2001 From: Carlos V <76731844+cvc90@users.noreply.github.com> Date: Sat, 5 Aug 2023 23:16:22 +0200 Subject: [PATCH 5/6] Update report_template.html Modified the creators banner --- back/report_template.html | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/back/report_template.html b/back/report_template.html index d094944a..3328aec5 100755 --- a/back/report_template.html +++ b/back/report_template.html @@ -1,14 +1,14 @@ - +#---------------------------------------------------------------------------------# +# Pi.Alert # +# Open Source Network Guard / WIFI & LAN intrusion detector # +# # +# report_template.html - Back module. Template to email reporting in HTML format # +#---------------------------------------------------------------------------------# +# Puche 2021 pi.alert.application@gmail.com GNU GPLv3 # +# jokob-sk 2022 jokob.sk@gmail.com GNU GPLv3 # +# leiweibau 2022 https://github.com/leiweibau GNU GPLv3 # +# cvc90 2023 https://github.com/cvc90 GNU GPLv3 # +#---------------------------------------------------------------------------------# From 928ee52a7e252acb4b903f8a92d4da4ab1f93295 Mon Sep 17 00:00:00 2001 From: Carlos V <76731844+cvc90@users.noreply.github.com> Date: Sat, 5 Aug 2023 23:19:18 +0200 Subject: [PATCH 6/6] Update report_template_new_version.html Modified the creators banner --- back/report_template_new_version.html | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/back/report_template_new_version.html b/back/report_template_new_version.html index c4669134..eca948d8 100755 --- a/back/report_template_new_version.html +++ b/back/report_template_new_version.html @@ -1,14 +1,14 @@ - +#---------------------------------------------------------------------------------------------# +# Pi.Alert # +# Open Source Network Guard / WIFI & LAN intrusion detector # +# # +# report_template_new_version.html - Back module. Template to email reporting in HTML format # +#---------------------------------------------------------------------------------------------# +# Puche 2021 pi.alert.application@gmail.com GNU GPLv3 # +# jokob-sk 2022 jokob.sk@gmail.com GNU GPLv3 # +# leiweibau 2022 https://github.com/leiweibau GNU GPLv3 # +# cvc90 2023 https://github.com/cvc90 GNU GPLv3 # +#---------------------------------------------------------------------------------------------#