diff --git a/bin/lib/objects/ail_objects.py b/bin/lib/objects/ail_objects.py index 8040b721..8eaf84d8 100755 --- a/bin/lib/objects/ail_objects.py +++ b/bin/lib/objects/ail_objects.py @@ -158,7 +158,7 @@ def get_object_card_meta(obj_type, subtype, id, related_btc=False): meta["vt"] = obj.get_meta_vt() meta["vt"]["status"] = obj.is_vt_enabled() # TAGS MODAL - if obj.get_type() == 'screenshot' or obj.get_type() == 'decoded': + if obj.get_type() == 'screenshot' or obj.get_type() == 'decoded' or obj.get_type() == 'cve': meta["add_tags_modal"] = Tag.get_modal_add_tags(obj.id, obj.get_type(), obj.get_subtype(r_str=True)) return meta diff --git a/var/www/blueprints/correlation.py b/var/www/blueprints/correlation.py index bde820ad..48388995 100644 --- a/var/www/blueprints/correlation.py +++ b/var/www/blueprints/correlation.py @@ -124,7 +124,8 @@ def show_correlation(): "correlation_id": obj_id, "max_nodes": max_nodes, "mode": mode, "filter": filter_types, "filter_str": ",".join(filter_types), - "metadata": ail_objects.get_object_meta(obj_type, subtype, obj_id, flask_context=True) + "metadata": ail_objects.get_object_meta(obj_type, subtype, obj_id, + options={'tags'}, flask_context=True) } if subtype: dict_object["metadata"]['type_id'] = subtype @@ -156,7 +157,9 @@ def get_description(): return Response(json.dumps({"status": "error", "reason": "404 Not Found"}, indent=2, sort_keys=True), mimetype='application/json'), 404 # object exist else: - res = ail_objects.get_object_meta(object_type, type_id, correlation_id, flask_context=True) + res = ail_objects.get_object_meta(object_type, type_id, correlation_id, options={'tags'}, flask_context=True) + if 'tags' in res: + res['tags'] = list(res['tags']) return jsonify(res) @correlation.route('/correlation/graph_node_json') diff --git a/var/www/templates/correlation/metadata_card_cve.html b/var/www/templates/correlation/metadata_card_cve.html index 1abd1a84..1e64008c 100644 --- a/var/www/templates/correlation/metadata_card_cve.html +++ b/var/www/templates/correlation/metadata_card_cve.html @@ -1,9 +1,9 @@ -{#{% with modal_add_tags=dict_object['metadata_card']['add_tags_modal']%}#} -{# {% include 'modals/add_tags.html' %}#} -{#{% endwith %}#} +{% with modal_add_tags=dict_object['metadata_card']['add_tags_modal']%} + {% include 'modals/add_tags.html' %} +{% endwith %} {% include 'modals/edit_tag.html' %} @@ -99,21 +99,21 @@ {% endif %} {% endif %} -{#