mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-06 17:15:38 -08:00
Report fix + plugin.sh work
This commit is contained in:
@@ -32,9 +32,9 @@
|
||||
|
||||
<?php
|
||||
// Check if the page exists
|
||||
if (file_exists("log/report_output.html")) {
|
||||
if (file_exists("api/notification_text.html")) {
|
||||
// Load the page
|
||||
include("log/report_output.html");
|
||||
include("api/notification_text.html");
|
||||
} else {
|
||||
// Display an error message
|
||||
echo "<h2>Error</h2>";
|
||||
|
||||
@@ -616,7 +616,7 @@ def process_plugin_events(db, plugin, pluginsState):
|
||||
""", objects_to_insert
|
||||
)
|
||||
|
||||
# Bulk insert events
|
||||
# Bulk insert events (insert only events if they are to be reported on)
|
||||
if events_to_insert:
|
||||
sql.executemany(
|
||||
"""
|
||||
@@ -628,9 +628,6 @@ def process_plugin_events(db, plugin, pluginsState):
|
||||
""", events_to_insert
|
||||
)
|
||||
|
||||
# Delete old events
|
||||
sql.execute('DELETE FROM Plugins_Events where Plugin = ?', (pluginPref,))
|
||||
|
||||
# Commit changes to the database
|
||||
db.commitDB()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user