diff --git a/back/pialert.py b/back/pialert.py index a90b7414..ae705f33 100755 --- a/back/pialert.py +++ b/back/pialert.py @@ -1125,6 +1125,10 @@ def scan_network (): # Sessions snapshot file_print(' Creating sessions snapshot') create_sessions_snapshot () + + # Sessions snapshot + file_print(' Inserting scan results into Online_History') + insertOnlineHistory() # Skip repeated notifications file_print(' Skipping repeated notifications') @@ -1391,6 +1395,8 @@ def print_scan_stats (): (cycle,)) file_print(' IP Changes.........: ' + str ( sql.fetchone()[0]) ) +#------------------------------------------------------------------------------- +def insertOnlineHistory(): # Add to History sql.execute("SELECT * FROM Devices") History_All = sql.fetchall() diff --git a/front/php/templates/graph.php b/front/php/templates/graph.php index a273e26f..a398f909 100755 --- a/front/php/templates/graph.php +++ b/front/php/templates/graph.php @@ -10,7 +10,6 @@ $Pia_Graph_Device_Online = array(); $Pia_Graph_Device_Down = array(); $Pia_Graph_Device_Arch = array(); -//$db = new SQLite3('../db/pialert.db'); $results = $db->query('SELECT * FROM Online_History ORDER BY Scan_Date DESC LIMIT 144'); while ($row = $results->fetchArray()) { $time_raw = explode(' ', $row['Scan_Date']);