fix: [UI] screenshot url

This commit is contained in:
Terrtia 2020-01-14 16:46:53 +01:00
parent 83ae6a0a6c
commit a77d16f6d7
No known key found for this signature in database
GPG key ID: 1E1B1F50D84613D0
2 changed files with 5 additions and 3 deletions

View file

@ -181,9 +181,7 @@ def get_item_url(correlation_name, value, correlation_type=None):
elif correlation_name == 'decoded': elif correlation_name == 'decoded':
endpoint = 'correlation.show_correlation' endpoint = 'correlation.show_correlation'
url = url_for(endpoint, object_type="decoded", correlation_id=value) url = url_for(endpoint, object_type="decoded", correlation_id=value)
elif correlation_name == 'screenshot': ### # TODO: remove me elif correlation_name == 'screenshot' or correlation_name == 'image': ### # TODO: rename me
endpoint = 'correlation.show_correlation'
elif correlation_name == 'image':
endpoint = 'correlation.show_correlation' endpoint = 'correlation.show_correlation'
url = url_for(endpoint, object_type="screenshot", correlation_id=value) url = url_for(endpoint, object_type="screenshot", correlation_id=value)
elif correlation_name == 'domain': elif correlation_name == 'domain':

View file

@ -245,6 +245,10 @@ def graph_node_json():
correlation_names = sanitise_correlation_names(request.args.get('correlation_names')) correlation_names = sanitise_correlation_names(request.args.get('correlation_names'))
correlation_objects = sanitise_correlation_objects(request.args.get('correlation_objects')) correlation_objects = sanitise_correlation_objects(request.args.get('correlation_objects'))
# # TODO: remove me, rename screenshot to image
if object_type == 'image':
object_type == 'screenshot'
mode = sanitise_graph_mode(request.args.get('mode')) mode = sanitise_graph_mode(request.args.get('mode'))
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) 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)