chg: [tags search] search qrcode by tags

pull/607/merge v5.8
terrtia 2024-10-03 15:17:19 +02:00
parent 483d49fecf
commit 6f2a59ccc0
No known key found for this signature in database
GPG Key ID: 1E1B1F50D84613D0
3 changed files with 38 additions and 2 deletions

View File

@ -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

View File

@ -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>

View File

@ -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']}}&ltags={{ 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>