mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-30 01:37:17 +00:00
fix: [objects] show/add subtype objects tags
This commit is contained in:
parent
3ab8cb79c0
commit
ccf935700a
6 changed files with 74 additions and 13 deletions
|
@ -158,7 +158,6 @@ def get_object_card_meta(obj_type, subtype, id, related_btc=False):
|
||||||
meta["vt"] = obj.get_meta_vt()
|
meta["vt"] = obj.get_meta_vt()
|
||||||
meta["vt"]["status"] = obj.is_vt_enabled()
|
meta["vt"]["status"] = obj.is_vt_enabled()
|
||||||
# TAGS MODAL
|
# TAGS MODAL
|
||||||
if obj.get_type() == 'screenshot' or obj.get_type() == 'decoded' or obj.get_type() == 'cve':
|
|
||||||
meta["add_tags_modal"] = Tag.get_modal_add_tags(obj.id, obj.get_type(), obj.get_subtype(r_str=True))
|
meta["add_tags_modal"] = Tag.get_modal_add_tags(obj.id, obj.get_type(), obj.get_subtype(r_str=True))
|
||||||
return meta
|
return meta
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,12 @@
|
||||||
|
<link href="{{ url_for('static', filename='css/tags.css') }}" rel="stylesheet" type="text/css" />
|
||||||
|
<script src="{{ url_for('static', filename='js/tags.js') }}"></script>
|
||||||
|
|
||||||
|
{% with modal_add_tags=dict_object['metadata_card']['add_tags_modal']%}
|
||||||
|
{% include 'modals/add_tags.html' %}
|
||||||
|
{% endwith %}
|
||||||
|
|
||||||
|
{% include 'modals/edit_tag.html' %}
|
||||||
|
|
||||||
<div class="card my-3">
|
<div class="card my-3">
|
||||||
<div class="card-header" style="background-color:#d9edf7;font-size: 15px">
|
<div class="card-header" style="background-color:#d9edf7;font-size: 15px">
|
||||||
<h4 class="text-secondary">{{ dict_object["correlation_id"] }} :</h4>
|
<h4 class="text-secondary">{{ dict_object["correlation_id"] }} :</h4>
|
||||||
|
@ -39,6 +48,21 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
<li class="list-group-item py-0">
|
||||||
|
<br>
|
||||||
|
<div class="mb-3">
|
||||||
|
Tags:
|
||||||
|
{% for tag in dict_object["metadata"]['tags'] %}
|
||||||
|
<button class="btn btn-{{ bootstrap_label[loop.index0 % 5] }}" data-toggle="modal" data-target="#edit_tags_modal"
|
||||||
|
data-tagid="{{ tag }}" data-objtype="decoded" data-objsubtype="" data-objid="{{ dict_object["correlation_id"] }}">
|
||||||
|
{{ tag }}
|
||||||
|
</button>
|
||||||
|
{% endfor %}
|
||||||
|
<button type="button" class="btn btn-light" data-toggle="modal" data-target="#add_tags_modal">
|
||||||
|
<i class="far fa-plus-square"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
{% if dict_object["metadata"]["type_id"] == "bitcoin" %}
|
{% if dict_object["metadata"]["type_id"] == "bitcoin" %}
|
||||||
{% if "related_btc" in dict_object["metadata_card"] %}
|
{% if "related_btc" in dict_object["metadata_card"] %}
|
||||||
|
|
|
@ -1,3 +1,12 @@
|
||||||
|
<link href="{{ url_for('static', filename='css/tags.css') }}" rel="stylesheet" type="text/css" />
|
||||||
|
<script src="{{ url_for('static', filename='js/tags.js') }}"></script>
|
||||||
|
|
||||||
|
{% with modal_add_tags=dict_object['metadata_card']['add_tags_modal']%}
|
||||||
|
{% include 'modals/add_tags.html' %}
|
||||||
|
{% endwith %}
|
||||||
|
|
||||||
|
{% include 'modals/edit_tag.html' %}
|
||||||
|
|
||||||
<div class="card my-3">
|
<div class="card my-3">
|
||||||
<div class="card-header" style="background-color:#d9edf7;font-size: 15px">
|
<div class="card-header" style="background-color:#d9edf7;font-size: 15px">
|
||||||
<h4 class="text-secondary">{{ dict_object["correlation_id"] }} :</h4>
|
<h4 class="text-secondary">{{ dict_object["correlation_id"] }} :</h4>
|
||||||
|
@ -39,16 +48,21 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
{% if dict_object["metadata"]['tags'] %}
|
|
||||||
<li class="list-group-item py-0">
|
<li class="list-group-item py-0">
|
||||||
<div class="my-3">
|
<br>
|
||||||
<b>Tags:</b>
|
<div class="mb-3">
|
||||||
|
Tags:
|
||||||
{% for tag in dict_object["metadata"]['tags'] %}
|
{% for tag in dict_object["metadata"]['tags'] %}
|
||||||
<span class="badge badge-{{ bootstrap_label[loop.index0 % 5] }}">{{ tag }}</span>
|
<button class="btn btn-{{ bootstrap_label[loop.index0 % 5] }}" data-toggle="modal" data-target="#edit_tags_modal"
|
||||||
|
data-tagid="{{ tag }}" data-objtype="decoded" data-objsubtype="" data-objid="{{ dict_object["correlation_id"] }}">
|
||||||
|
{{ tag }}
|
||||||
|
</button>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
<button type="button" class="btn btn-light" data-toggle="modal" data-target="#add_tags_modal">
|
||||||
|
<i class="far fa-plus-square"></i>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
{% with obj_type='pgp', obj_id=dict_object['correlation_id'], obj_subtype=dict_object["metadata"]["type_id"] %}
|
{% with obj_type='pgp', obj_id=dict_object['correlation_id'], obj_subtype=dict_object["metadata"]["type_id"] %}
|
||||||
|
|
|
@ -1,3 +1,12 @@
|
||||||
|
<link href="{{ url_for('static', filename='css/tags.css') }}" rel="stylesheet" type="text/css" />
|
||||||
|
<script src="{{ url_for('static', filename='js/tags.js') }}"></script>
|
||||||
|
|
||||||
|
{% with modal_add_tags=dict_object['metadata_card']['add_tags_modal']%}
|
||||||
|
{% include 'modals/add_tags.html' %}
|
||||||
|
{% endwith %}
|
||||||
|
|
||||||
|
{% include 'modals/edit_tag.html' %}
|
||||||
|
|
||||||
<div class="card my-3">
|
<div class="card my-3">
|
||||||
<div class="card-header" style="background-color:#d9edf7;font-size: 15px">
|
<div class="card-header" style="background-color:#d9edf7;font-size: 15px">
|
||||||
<h4 class="text-secondary">{{ dict_object["correlation_id"] }} :</h4>
|
<h4 class="text-secondary">{{ dict_object["correlation_id"] }} :</h4>
|
||||||
|
@ -39,6 +48,21 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
<li class="list-group-item py-0">
|
||||||
|
<br>
|
||||||
|
<div class="mb-3">
|
||||||
|
Tags:
|
||||||
|
{% for tag in dict_object["metadata"]['tags'] %}
|
||||||
|
<button class="btn btn-{{ bootstrap_label[loop.index0 % 5] }}" data-toggle="modal" data-target="#edit_tags_modal"
|
||||||
|
data-tagid="{{ tag }}" data-objtype="decoded" data-objsubtype="" data-objid="{{ dict_object["correlation_id"] }}">
|
||||||
|
{{ tag }}
|
||||||
|
</button>
|
||||||
|
{% endfor %}
|
||||||
|
<button type="button" class="btn btn-light" data-toggle="modal" data-target="#add_tags_modal">
|
||||||
|
<i class="far fa-plus-square"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
{% with obj_type='username', obj_id=dict_object['correlation_id'], obj_subtype=dict_object["metadata"]["type_id"] %}
|
{% with obj_type='username', obj_id=dict_object['correlation_id'], obj_subtype=dict_object["metadata"]["type_id"] %}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<title>Decoded - AIL</title>
|
<title>CVEs - AIL</title>
|
||||||
<link rel="icon" href="{{ url_for('static', filename='image/ail-icon.png') }}">
|
<link rel="icon" href="{{ url_for('static', filename='image/ail-icon.png') }}">
|
||||||
|
|
||||||
<!-- Core CSS -->
|
<!-- Core CSS -->
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<title>Decoded - AIL</title>
|
<title>{{ obj_type }} - AIL</title>
|
||||||
<link rel="icon" href="{{ url_for('static', filename='image/ail-icon.png') }}">
|
<link rel="icon" href="{{ url_for('static', filename='image/ail-icon.png') }}">
|
||||||
|
|
||||||
<!-- Core CSS -->
|
<!-- Core CSS -->
|
||||||
|
|
Loading…
Reference in a new issue