mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-10 00:28:22 +00:00
chg: [correlation] add an option to remove max number of nodes if max_node == 0
This commit is contained in:
parent
e9539e640b
commit
84bc2c0669
3 changed files with 3 additions and 3 deletions
|
@ -193,7 +193,7 @@ def _get_correlations_graph_node(links, nodes, obj_type, subtype, obj_id, level,
|
|||
if obj2_str_id == previous_str_obj:
|
||||
continue
|
||||
|
||||
if len(nodes) > max_nodes:
|
||||
if len(nodes) > max_nodes != 0:
|
||||
break
|
||||
nodes.add(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):
|
||||
try:
|
||||
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
|
||||
except (TypeError, ValueError):
|
||||
nb_max_nodes = 300
|
||||
|
|
|
@ -256,7 +256,7 @@
|
|||
|
||||
<div class="form-group">
|
||||
<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 class="text-center">
|
||||
|
|
Loading…
Reference in a new issue