fix: [UI inestigations] add objects link

This commit is contained in:
Terrtia 2022-03-08 10:44:41 +01:00
parent 2d09636fbe
commit bcac50dd7c
No known key found for this signature in database
GPG key ID: 1E1B1F50D84613D0
8 changed files with 12 additions and 2 deletions

View file

@ -11,6 +11,7 @@ sys.path.append(os.path.join(os.environ['AIL_BIN'], 'lib/'))
import ConfigLoader import ConfigLoader
from abstract_object import AbstractObject from abstract_object import AbstractObject
from flask import url_for
config_loader = ConfigLoader.ConfigLoader() config_loader = ConfigLoader.ConfigLoader()

View file

@ -11,6 +11,7 @@ sys.path.append(os.path.join(os.environ['AIL_BIN'], 'lib/'))
import ConfigLoader import ConfigLoader
from abstract_object import AbstractObject from abstract_object import AbstractObject
from flask import url_for
config_loader = ConfigLoader.ConfigLoader() config_loader = ConfigLoader.ConfigLoader()
r_serv_metadata = config_loader.get_redis_conn("ARDB_Metadata") r_serv_metadata = config_loader.get_redis_conn("ARDB_Metadata")

View file

@ -11,6 +11,7 @@ sys.path.append(os.path.join(os.environ['AIL_BIN'], 'lib/'))
import ConfigLoader import ConfigLoader
from abstract_object import AbstractObject from abstract_object import AbstractObject
from flask import url_for
config_loader = ConfigLoader.ConfigLoader() config_loader = ConfigLoader.ConfigLoader()

View file

@ -27,6 +27,7 @@ import Username
from abstract_object import AbstractObject from abstract_object import AbstractObject
from item_basic import * from item_basic import *
from flask import url_for
config_loader = ConfigLoader.ConfigLoader() config_loader = ConfigLoader.ConfigLoader()
# get and sanityze PASTE DIRECTORY # get and sanityze PASTE DIRECTORY

View file

@ -11,6 +11,7 @@ sys.path.append(os.path.join(os.environ['AIL_BIN'], 'lib/'))
import ConfigLoader import ConfigLoader
from abstract_object import AbstractObject from abstract_object import AbstractObject
from flask import url_for
config_loader = ConfigLoader.ConfigLoader() config_loader = ConfigLoader.ConfigLoader()

View file

@ -11,6 +11,7 @@ sys.path.append(os.path.join(os.environ['AIL_BIN'], 'lib/'))
import ConfigLoader import ConfigLoader
from abstract_object import AbstractObject from abstract_object import AbstractObject
from flask import url_for
config_loader = ConfigLoader.ConfigLoader() config_loader = ConfigLoader.ConfigLoader()

View file

@ -53,7 +53,7 @@ def show_investigation():
investigation_uuid = request.args.get("uuid") investigation_uuid = request.args.get("uuid")
investigation = Investigations.Investigation(investigation_uuid) investigation = Investigations.Investigation(investigation_uuid)
metadata = investigation.get_metadata(r_str=True) metadata = investigation.get_metadata(r_str=True)
objs = ail_objects.get_objects_meta(investigation.get_objects(), icon=True) objs = ail_objects.get_objects_meta(investigation.get_objects(), icon=True, url=True, flask_context=True)
return render_template("view_investigation.html", bootstrap_label=bootstrap_label, return render_template("view_investigation.html", bootstrap_label=bootstrap_label,
metadata=metadata, investigation_objs=objs) metadata=metadata, investigation_objs=objs)

View file

@ -138,7 +138,11 @@
{{ object['subtype']}} {{ object['subtype']}}
{% endif %} {% endif %}
</td> </td>
<td>{{ object['id']}}</td> <td>
<a href="{{ object['link'] }}">
{{ object['id']}}
</a>
</td>
<td> <td>
{% for tag in object['tags'] %} {% for tag in object['tags'] %}
<span class="badge badge-{{ bootstrap_label[loop.index0 % 5] }} pull-left">{{ tag }}</span> <span class="badge badge-{{ bootstrap_label[loop.index0 % 5] }} pull-left">{{ tag }}</span>