mirror of https://github.com/D4-project/d4-core
fix: [UI v0.3] convert epoch to date, fix #12
parent
10d29fff8c
commit
ea22b5677d
|
@ -231,6 +231,8 @@ def server_management():
|
||||||
last_updated = redis_server_metadata.hget('analyzer:{}'.format(analyzer_uuid), 'last_updated')
|
last_updated = redis_server_metadata.hget('analyzer:{}'.format(analyzer_uuid), 'last_updated')
|
||||||
if last_updated is None:
|
if last_updated is None:
|
||||||
last_updated = 'Never'
|
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))
|
len_queue = redis_server_analyzer.llen('analyzer:{}:{}'.format(type, analyzer_uuid))
|
||||||
if len_queue is None:
|
if len_queue is None:
|
||||||
len_queue = 0
|
len_queue = 0
|
||||||
|
|
|
@ -154,7 +154,7 @@ if __name__ == "__main__":
|
||||||
# get new save_path
|
# 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])
|
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])
|
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
|
# save start of new file
|
||||||
if start_new_file != b'':
|
if start_new_file != b'':
|
||||||
|
|
Loading…
Reference in New Issue