mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-25 23:37:16 +00:00
chg: [tags search] search qrcode by tags
This commit is contained in:
parent
483d49fecf
commit
6f2a59ccc0
3 changed files with 38 additions and 2 deletions
|
@ -309,6 +309,14 @@ def tags_search_ocrs():
|
|||
dict_tagged = {"object_type": object_type, "object_name": object_type.title() + "s"}
|
||||
return render_template("tags/search_obj_by_tags.html", bootstrap_label=bootstrap_label, dict_tagged=dict_tagged)
|
||||
|
||||
@tags_ui.route('/tag/search/qrcode')
|
||||
@login_required
|
||||
@login_read_only
|
||||
def tags_search_qrcodes():
|
||||
object_type = 'qrcode'
|
||||
dict_tagged = {"object_type": object_type, "object_name": object_type.title() + "s"}
|
||||
return render_template("tags/search_obj_by_tags.html", bootstrap_label=bootstrap_label, dict_tagged=dict_tagged)
|
||||
|
||||
@tags_ui.route('/tag/search/domain')
|
||||
@login_required
|
||||
@login_read_only
|
||||
|
|
|
@ -29,11 +29,17 @@
|
|||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{ url_for('tags_ui.tags_search_ocrs') }}" id="nav_tags_search_message">
|
||||
<a class="nav-link" href="{{ url_for('tags_ui.tags_search_ocrs') }}" id="nav_tags_search_ocr">
|
||||
<i class="fas fa-expand"></i>
|
||||
Search Ocrs by Tags
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{ url_for('tags_ui.tags_search_qrcodes') }}" id="nav_tags_search_qrcode">
|
||||
<i class="fas fa-qrcode"></i>
|
||||
Search Qrcodes by Tags
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{ url_for('tags_ui.tags_search_domains') }}" id="nav_tags_search_domain">
|
||||
<i class="fab fa-html5"></i>
|
||||
|
|
|
@ -67,6 +67,10 @@
|
|||
<th>Date</th>
|
||||
<th style="max-width: 800px;">Item</th>
|
||||
<th>Action</th>
|
||||
{%elif dict_tagged["object_type"]=="qrcode"%}
|
||||
<th>First seen</th>
|
||||
<th>Last seen</th>
|
||||
<th></th>
|
||||
{%elif dict_tagged["object_type"]=="message"%}
|
||||
<th>Date</th>
|
||||
<th style="max-width: 800px;">Message</th>
|
||||
|
@ -145,7 +149,25 @@
|
|||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
{%elif dict_tagged["object_type"]=="qrcode"%}
|
||||
{% for dict_obj in dict_tagged["tagged_obj"] %}
|
||||
<tr>
|
||||
<td>{{ dict_obj['first_seen'] }}</td>
|
||||
<td>{{ dict_obj['last_seen'] }}</td>
|
||||
<td class="pb-0">
|
||||
<a target="_blank" href="{{ url_for('correlation.show_correlation') }}?type={{dict_tagged['object_type']}}&id={{dict_obj['id']}}" class="text-secondary">
|
||||
<div style="line-height:0.9;">{{ dict_obj['id'] }}</div>
|
||||
</a>
|
||||
<div class="mb-2">
|
||||
{% for tag in dict_obj['tags'] %}
|
||||
<a href="{{ url_for('tags_ui.get_obj_by_tags') }}?object_type={{dict_tagged['object_type']}}<ags={{ tag }}">
|
||||
<span class="badge badge-{{ bootstrap_label[loop.index0 % 5] }}">{{ tag }}</span>
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{%elif dict_tagged["object_type"]=="message"%}
|
||||
{% for dict_obj in dict_tagged["tagged_obj"] %}
|
||||
<tr>
|
||||
|
|
Loading…
Reference in a new issue