fix: [UI v0.3] convert epoch to date, fix #12

pull/23/head
Terrtia 2019-04-01 10:31:10 +02:00
parent 10d29fff8c
commit ea22b5677d
No known key found for this signature in database
GPG Key ID: 1E1B1F50D84613D0
2 changed files with 3 additions and 1 deletions

View File

@ -231,6 +231,8 @@ def server_management():
last_updated = redis_server_metadata.hget('analyzer:{}'.format(analyzer_uuid), 'last_updated')
if last_updated is None:
last_updated = 'Never'
else:
last_updated = datetime.datetime.fromtimestamp(float(last_updated)).strftime('%Y-%m-%d %H:%M:%S')
len_queue = redis_server_analyzer.llen('analyzer:{}:{}'.format(type, analyzer_uuid))
if len_queue is None:
len_queue = 0

View File

@ -154,7 +154,7 @@ if __name__ == "__main__":
# get new save_path
dir_full_path = get_save_dir(dir_data_uuid, date_file[0:4], date_file[4:6], date_file[6:8])
filename = '{}-{}-{}-{}-{}.passivedns.txt'.format(uuid, date_file[0:4], date_file[4:6], date_file[6:8], date_file[8:14])
save_path = os.path.join([dir_full_path, filename])
save_path = os.path.join(dir_full_path, filename)
# save start of new file
if start_new_file != b'':