mirror of https://github.com/CIRCL/AIL-framework
chg: [UI subtype objs] get obj by subtype + name
parent
c2281828d1
commit
1edcb47151
|
@ -261,3 +261,12 @@ def graph_node_json():
|
|||
|
||||
res = Correlate_object.get_graph_node_object_correlation(object_type, correlation_id, mode, correlation_names, correlation_objects, requested_correl_type=type_id, max_nodes=max_nodes)
|
||||
return jsonify(res)
|
||||
|
||||
@correlation.route('/correlation/subtype_search', methods=['POST'])
|
||||
@login_required
|
||||
@login_read_only
|
||||
def subtype_search():
|
||||
obj_type = request.form.get('object_type')
|
||||
obj_subtype = request.form.get('object_subtype')
|
||||
obj_id = request.form.get('object_id')
|
||||
return redirect(url_for('correlation.show_correlation', object_type=obj_type, type_id=obj_subtype, correlation_id=obj_id))
|
||||
|
|
|
@ -75,8 +75,34 @@
|
|||
<div class="col-xl-10">
|
||||
<div class="mt-1" id="barchart_type">
|
||||
</div>
|
||||
|
||||
<div class="card border-secondary my-2">
|
||||
<div class="card-body text-dark">
|
||||
<h5 class="card-title">Search {{correlation_type}} by name:</h5>
|
||||
|
||||
<form action="{{ url_for('correlation.subtype_search') }}" id="search_subtype_onj" method='post'>
|
||||
|
||||
<div class="input-group mb-1">
|
||||
<input type="text" class="form-control" name="object_type" value="{{correlation_type}}" hidden>
|
||||
<select class="custom-select col-2" name="object_subtype" value="{{obj_type}}" required>
|
||||
<option value="">{{correlation_type}} Type...</option>
|
||||
{% for typ in l_type %}
|
||||
<option value="{{typ}}">{{typ}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
|
||||
<input type="text" class="form-control col-8" name="object_id" value="" placeholder="{{correlation_type}} ID" required>
|
||||
<button class="btn btn-primary input-group-addon search-obj col-2"><i class="fas fa-search"></i></button>
|
||||
</div>
|
||||
|
||||
<form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-xl-2">
|
||||
|
||||
<div class="card mb-3 mt-2" style="background-color:#d9edf7;">
|
||||
|
|
Loading…
Reference in New Issue