mirror of https://github.com/MISP/PyTaxonomies
61 lines
1.8 KiB
HTML
61 lines
1.8 KiB
HTML
|
{% extends "main.html" %}
|
||
|
{% block title %}Search{% endblock %}
|
||
|
|
||
|
{% block content %}
|
||
|
<div class="container">
|
||
|
<h1>Search {% if query %} - {{query}} {%endif%}</h1>
|
||
|
|
||
|
<form class="form-inline" role="form" action="search" method=post>
|
||
|
<div class="form-group">
|
||
|
<input type="text" class="form-control" name="query" id=query placeholder="Search a thing ">
|
||
|
</div>
|
||
|
<button type="submit" class="btn btn-default">Search</button>
|
||
|
</form>
|
||
|
</br>
|
||
|
<div>
|
||
|
{% if query and not entries %}
|
||
|
Nothing found
|
||
|
{%endif%}
|
||
|
{% if entries %}
|
||
|
<table class="table table-striped table-bordered" id="pytaxonomies_table">
|
||
|
<thead>
|
||
|
<tr>
|
||
|
<th>Name</th>
|
||
|
<th>Description</th>
|
||
|
<th>Machinetag</th>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tfoot>
|
||
|
<tr>
|
||
|
<th>Name</th>
|
||
|
<th>Description</th>
|
||
|
<th>Machinetag</th>
|
||
|
</tr>
|
||
|
</tfoot>
|
||
|
<tbody>
|
||
|
{% for mt, val in entries.items() %}
|
||
|
<tr>
|
||
|
<td><a href="{{ url_for('taxonomies', name=val[0].name) }}">{{ val[0].name }}</a></td>
|
||
|
<td>
|
||
|
{% if val|length == 3 %}
|
||
|
{% if val[2].description %}
|
||
|
{{ val[2].description.decode() }}
|
||
|
{% elif val[2].expanded %}
|
||
|
{{ val[2].expanded.decode() }}
|
||
|
{%endif%}
|
||
|
{% elif val[1].description %}
|
||
|
{{ val[1].description.decode() }}
|
||
|
{% else %}
|
||
|
{{ val[1].predicate }}
|
||
|
{%endif%}
|
||
|
</td>
|
||
|
<td>{{ mt }}</td>
|
||
|
</tr>
|
||
|
{% endfor %}
|
||
|
</tbody>
|
||
|
</table>
|
||
|
{%endif%}
|
||
|
</div>
|
||
|
</div>
|
||
|
{% endblock %}
|