More logging od CurrentScan/Device tables + cleanup

This commit is contained in:
jokob-sk
2024-07-14 10:54:48 +10:00
parent 7e554242c2
commit 1aeed6b433
4 changed files with 28 additions and 28 deletions

View File

@@ -424,7 +424,7 @@ $db->close();
</div> </div>
<div class="col-sm-8"> <div class="col-sm-8">
<div class="form-inline toggle"> <div class="form-inline toggle">
<input class="form-control" type="text" id="logsFilter" onchange="toggleFilter()" oninput="applyFilter()" placeholder="Filter lines with text..." /> <input class="form-control" type="text" id="logsFilter" oninput="applyFilter()" placeholder="Filter lines with text..." />
</div> </div>
</div> </div>
</div> </div>

0
front/php/templates/language/es_es.json Normal file → Executable file
View File

0
front/php/templates/language/ru_ru.json Normal file → Executable file
View File

View File

@@ -95,34 +95,34 @@ def print_scan_stats(db):
mylog('verbose', f'[Scan Stats] Disconnections.........: {stats[0]["disconnections"]}') mylog('verbose', f'[Scan Stats] Disconnections.........: {stats[0]["disconnections"]}')
mylog('verbose', f'[Scan Stats] IP Changes.............: {stats[0]["ip_changes"]}') mylog('verbose', f'[Scan Stats] IP Changes.............: {stats[0]["ip_changes"]}')
if str(stats[0]["new_devices"]) != '0': # if str(stats[0]["new_devices"]) != '0':
mylog('debug', f' ================ DEVICES table content ================') mylog('debug', f' ================ DEVICES table content ================')
sql.execute('select * from Devices') sql.execute('select * from Devices')
rows = sql.fetchall() rows = sql.fetchall()
for row in rows: for row in rows:
row_dict = dict(row) row_dict = dict(row)
mylog('debug', f' {row_dict}') mylog('debug', f' {row_dict}')
mylog('debug', f' ================ CurrentScan table content ================') mylog('debug', f' ================ CurrentScan table content ================')
sql.execute('select * from CurrentScan') sql.execute('select * from CurrentScan')
rows = sql.fetchall() rows = sql.fetchall()
for row in rows: for row in rows:
row_dict = dict(row) row_dict = dict(row)
mylog('debug', f' {row_dict}') mylog('debug', f' {row_dict}')
mylog('debug', f' ================ Events table content where eve_PendingAlertEmail = 1 ================') mylog('debug', f' ================ Events table content where eve_PendingAlertEmail = 1 ================')
sql.execute('select * from Events where eve_PendingAlertEmail = 1') sql.execute('select * from Events where eve_PendingAlertEmail = 1')
rows = sql.fetchall() rows = sql.fetchall()
for row in rows: for row in rows:
row_dict = dict(row) row_dict = dict(row)
mylog('debug', f' {row_dict}') mylog('debug', f' {row_dict}')
mylog('debug', f' ================ Events table COUNT ================') mylog('debug', f' ================ Events table COUNT ================')
sql.execute('select count(*) from Events') sql.execute('select count(*) from Events')
rows = sql.fetchall() rows = sql.fetchall()
for row in rows: for row in rows:
row_dict = dict(row) row_dict = dict(row)
mylog('debug', f' {row_dict}') mylog('debug', f' {row_dict}')
mylog('verbose', '[Scan Stats] Scan Method Statistics:') mylog('verbose', '[Scan Stats] Scan Method Statistics:')