From 2bb5d332ff53a2b980fc4fca3d49d58b2add5217 Mon Sep 17 00:00:00 2001 From: jokob-sk <96159884+jokob-sk@users.noreply.github.com> Date: Sun, 6 Aug 2023 07:47:37 +1000 Subject: [PATCH] Revert "Modified the style of the reports" --- back/report_template.html | 38 +++++++++----------------- back/report_template_new_version.html | 39 +++++++++++---------------- pialert/reporting.py | 19 +++---------- 3 files changed, 32 insertions(+), 64 deletions(-) diff --git a/back/report_template.html b/back/report_template.html index 3328aec5..4befe628 100755 --- a/back/report_template.html +++ b/back/report_template.html @@ -1,14 +1,11 @@ -#---------------------------------------------------------------------------------# -# 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 # -#---------------------------------------------------------------------------------# + @@ -26,7 +23,7 @@ - +
Report Date:
@@ -34,7 +31,7 @@ - + @@ -42,23 +39,14 @@ - - +
- +
- Pi.Alert - () -
©2020 Puche (2022+ - jokob-sk) | Built on: | Version: | - - Docs - -
Pi.Alert -
@@ -66,4 +54,4 @@ - + \ No newline at end of file diff --git a/back/report_template_new_version.html b/back/report_template_new_version.html index eca948d8..958a6f25 100755 --- a/back/report_template_new_version.html +++ b/back/report_template_new_version.html @@ -1,14 +1,11 @@ -#---------------------------------------------------------------------------------------------# -# 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 # -#---------------------------------------------------------------------------------------------# + @@ -30,7 +27,7 @@ - +
Report Date:
@@ -38,7 +35,7 @@ - + @@ -49,22 +46,16 @@ - +
- +
- Pi.Alert - () -
©2020 Puche (2022+ - jokob-sk) | Built on: | Version: | - - Docs - -
Pi.Alert -
+ + - + \ No newline at end of file diff --git a/pialert/reporting.py b/pialert/reporting.py index b25c0ee6..c3f6abaa 100755 --- a/pialert/reporting.py +++ b/pialert/reporting.py @@ -1,14 +1,4 @@ - + import datetime import json @@ -21,7 +11,6 @@ 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 @@ -57,8 +46,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:white; font-size: 16px;' bgcolor='#64a0d6' " - thProps = "width='120px' style='color:#F0F0F0' bgcolor='#64a0d6' " + headerProps = "width='120px' style='color:blue; font-size: 16px;' bgcolor='#909090' " + thProps = "width='120px' style='color:#F0F0F0' bgcolor='#909090' " build_direction = "TOP_TO_BOTTOM" text_line = '{}\t{}\n' @@ -533,4 +522,4 @@ def handle_test(testType): if testType == 'REPORT_PUSHSAFER': send_pushsafer (sample_msg) - mylog('info', ['[Test Publishers] END Test: ', testType]) + mylog('info', ['[Test Publishers] END Test: ', testType]) \ No newline at end of file