Update report

This commit is contained in:
2023-06-13 20:18:34 +02:00
parent b0d1df83e3
commit b3654d50c8
4 changed files with 42 additions and 28 deletions
-1
View File
@@ -45,7 +45,6 @@ def main():
if args.audit == "application":
pass
print(report)
generateHtmlReport(report)
@Dispatcher.register_plugins
+11 -2
View File
@@ -25,6 +25,17 @@ def generateHtmlReport(data):
print(plugin)
dataJinja2['plugins'].append(f"{plugin}.html.j2")
if 'postfix' in dataJinja2['plugins']:
pass
if 'sysctl' in data['system']:
dataJinja2['sysctl'] = dict()
for sysctl in data['system']['sysctl']['file']:
print(data['system']['sysctl']['file'][sysctl])
dataJinja2['year'] = '2023'
rdr = tmplIndex.render(data=dataJinja2)
@@ -49,9 +60,7 @@ def generateHtmlReport(data):
# body += f"Description: {result['description']}<br /><br />"
#body += f"</p>"
html += body
#print(body)
html += "</body></html>"
with open(f"reports/reports_{today}.html", "w") as f:
f.write(rdr)