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