mirror of https://github.com/CIRCL/AIL-framework
chg: [correlation] add an option to remove max number of nodes if max_node == 0
parent
e9539e640b
commit
84bc2c0669
|
@ -193,7 +193,7 @@ def _get_correlations_graph_node(links, nodes, obj_type, subtype, obj_id, level,
|
||||||
if obj2_str_id == previous_str_obj:
|
if obj2_str_id == previous_str_obj:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if len(nodes) > max_nodes:
|
if len(nodes) > max_nodes != 0:
|
||||||
break
|
break
|
||||||
nodes.add(obj2_str_id)
|
nodes.add(obj2_str_id)
|
||||||
links.add((obj_str_id, obj2_str_id))
|
links.add((obj_str_id, obj2_str_id))
|
||||||
|
|
|
@ -46,7 +46,7 @@ def sanitise_graph_mode(graph_mode):
|
||||||
def sanitise_nb_max_nodes(nb_max_nodes):
|
def sanitise_nb_max_nodes(nb_max_nodes):
|
||||||
try:
|
try:
|
||||||
nb_max_nodes = int(nb_max_nodes)
|
nb_max_nodes = int(nb_max_nodes)
|
||||||
if nb_max_nodes < 2:
|
if nb_max_nodes < 2 and nb_max_nodes != 0:
|
||||||
nb_max_nodes = 300
|
nb_max_nodes = 300
|
||||||
except (TypeError, ValueError):
|
except (TypeError, ValueError):
|
||||||
nb_max_nodes = 300
|
nb_max_nodes = 300
|
||||||
|
|
|
@ -256,7 +256,7 @@
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="max_nb_nodes_in">Max number of nodes:</label>
|
<label for="max_nb_nodes_in">Max number of nodes:</label>
|
||||||
<input class="form-control" type="number" value="{{dict_object["max_nodes"]}}" min="2" id="max_nb_nodes_in" name="max_nb_nodes_in">
|
<input class="form-control" type="number" value="{{dict_object["max_nodes"]}}" min="0" id="max_nb_nodes_in" name="max_nb_nodes_in">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
|
|
Loading…
Reference in New Issue