mirror of https://github.com/D4-project/d4-core
chg: [server_management UI v0.3] add analyzer description, fix #11, description can be updated by adding the same uuid
parent
01c9d99273
commit
a0857974ba
|
@ -256,10 +256,13 @@ def server_management():
|
|||
last_updated = 'Never'
|
||||
else:
|
||||
last_updated = datetime.datetime.fromtimestamp(float(last_updated)).strftime('%Y-%m-%d %H:%M:%S')
|
||||
description_analyzer = redis_server_metadata.hget('analyzer:{}'.format(analyzer_uuid), 'description')
|
||||
if description_analyzer is None:
|
||||
description_analyzer = ''
|
||||
len_queue = redis_server_analyzer.llen('analyzer:{}:{}'.format(extended_type, analyzer_uuid))
|
||||
if len_queue is None:
|
||||
len_queue = 0
|
||||
list_analyzer_uuid.append({'uuid': analyzer_uuid, 'size_limit': size_limit,'last_updated': last_updated, 'length': len_queue})
|
||||
list_analyzer_uuid.append({'uuid': analyzer_uuid, 'description': description_analyzer, 'size_limit': size_limit,'last_updated': last_updated, 'length': len_queue})
|
||||
|
||||
list_accepted_extended_types.append({"name": extended_type, 'list_analyzer_uuid': list_analyzer_uuid})
|
||||
|
||||
|
|
|
@ -253,7 +253,7 @@
|
|||
</a>
|
||||
</div>
|
||||
{%if analyzer['description']%}
|
||||
<div class="text-info mt-0"><small>{{analyzer['description']}}</small></div>
|
||||
<div class="text-info"><small>{{analyzer['description']}}</small></div>
|
||||
{%endif%}
|
||||
</td>
|
||||
<td>{{analyzer['last_updated']}}</td>
|
||||
|
@ -297,9 +297,12 @@
|
|||
<div class="d-flex">
|
||||
{{analyzer['uuid']}}
|
||||
<a href="{{ url_for('remove_analyzer') }}?redirect=1&type=254&metatype_name={{type['name']}}&analyzer_uuid={{analyzer['uuid']}}" class="ml-auto">
|
||||
<button type="button" class="btn btn-outline-danger"><i class="fa fa-trash"></i></button>
|
||||
<button type="button" class="btn btn-outline-danger px-2 py-0"><i class="fa fa-trash"></i></button>
|
||||
</a>
|
||||
</div>
|
||||
{%if analyzer['description']%}
|
||||
<div class="text-info"><small>{{analyzer['description']}}</small></div>
|
||||
{%endif%}
|
||||
</td>
|
||||
<td>{{analyzer['last_updated']}}</td>
|
||||
<td>
|
||||
|
|
Loading…
Reference in New Issue