online history - fix negative

This commit is contained in:
Jokob-sk
2023-01-01 13:17:50 +11:00
parent f487dc83c4
commit 9cc4513ba1
2 changed files with 6 additions and 1 deletions

View File

@@ -1126,6 +1126,10 @@ def scan_network ():
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')
skip_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()

View File

@@ -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']);