mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
online history - fix negative
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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']);
|
||||
|
||||
Reference in New Issue
Block a user