diff --git a/bin/lib/objects/ail_objects.py b/bin/lib/objects/ail_objects.py index d52a0bbd..6886d6fc 100755 --- a/bin/lib/objects/ail_objects.py +++ b/bin/lib/objects/ail_objects.py @@ -356,6 +356,10 @@ def obj_correlations_objs_add_tags(obj_type, subtype, obj_id, tags, filter_types add_obj_tags(obj1_type, subtype1, id1, tags) return objs +def get_obj_nb_correlations(obj_type, subtype, obj_id, filter_types=[]): + obj = get_object(obj_type, subtype, obj_id) + return obj.get_nb_correlations(filter_types=filter_types) + ################################################################################ ################################################################################ TODO ################################################################################ diff --git a/var/www/blueprints/correlation.py b/var/www/blueprints/correlation.py index 35263974..e0eed996 100644 --- a/var/www/blueprints/correlation.py +++ b/var/www/blueprints/correlation.py @@ -125,7 +125,8 @@ def show_correlation(): "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, - options={'tags'}, flask_context=True) + options={'tags'}, flask_context=True), + "nb_correl": ail_objects.get_obj_nb_correlations(obj_type, subtype, obj_id) } if subtype: dict_object["metadata"]['type_id'] = subtype diff --git a/var/www/templates/correlation/show_correlation.html b/var/www/templates/correlation/show_correlation.html index 8342e8b6..1329e2a5 100644 --- a/var/www/templates/correlation/show_correlation.html +++ b/var/www/templates/correlation/show_correlation.html @@ -262,6 +262,21 @@

+