mirror of https://github.com/MISP/PyTaxonomies
89 lines
3.1 KiB
HTML
89 lines
3.1 KiB
HTML
{% extends "main.html" %}
|
|
{% block title %}Taxonomy - {{ taxonomy.name }} {% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="container">
|
|
<h1>{% if taxonomy.expanded %}{{ taxonomy.expanded }} {%else%} {{taxonomy.name}} {%endif%} (Version {{ taxonomy.version }})</h1>
|
|
<h3>{{ taxonomy.description }}</h3>
|
|
{% if taxonomy.refs %}
|
|
<div>
|
|
References:
|
|
<ul>
|
|
{% for r in taxonomy.refs %}
|
|
<li><a href="{{r}}">{{r}}</a></li>
|
|
{%endfor%}
|
|
</ul>
|
|
</div>
|
|
{% endif %}
|
|
<table class="table table-striped table-bordered" id="pytaxonomies_table">
|
|
<thead>
|
|
<tr>
|
|
<th>Description</th>
|
|
<th>Expanded</th>
|
|
<th>Predicate</th>
|
|
{% if taxonomy.has_entries() %}
|
|
<th>Values</th>
|
|
{% else %}
|
|
<th>Colour</th>
|
|
<th>Machinetag</th>
|
|
{% endif %}
|
|
</tr>
|
|
</thead>
|
|
<tfoot>
|
|
<tr>
|
|
<th>Description</th>
|
|
<th>Expanded</th>
|
|
<th>Predicate</th>
|
|
{% if taxonomy.has_entries() %}
|
|
<th>Values</th>
|
|
{% else %}
|
|
<th>Colour</th>
|
|
<th>Machinetag</th>
|
|
{% endif %}
|
|
</tr>
|
|
</tfoot>
|
|
<tbody>
|
|
{% for p in taxonomy.predicates.values() %}
|
|
<tr>
|
|
<td>{% if p.description %}{{ p.description }}{% endif %}</td>
|
|
<td>{% if p.expanded %}{{ p.expanded }}{% endif %}</td>
|
|
<td>{{ p.predicate }}</td>
|
|
{% if p.entries %}
|
|
<td>
|
|
<table class="table table-striped table-bordered">
|
|
<thead>
|
|
<tr>
|
|
<th>Value</th>
|
|
<th>Numerical Value</th>
|
|
<th>Expanded</th>
|
|
<th>Description</th>
|
|
<th>Colour</th>
|
|
<th>Machinetag</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for e in p.entries.values() %}
|
|
<tr>
|
|
<td>{{ e.value }}</td>
|
|
<td>{% if e.numerical_value %}{{ e.numerical_value }}{% endif %}</td>
|
|
<td>{% if e.expanded %}{{ e.expanded }}{% endif %}</td>
|
|
<td>{% if e.description %}{{ e.description }}{% endif %}</td>
|
|
<td>{% if p.colour %}<div class='colorbox' background={{ p.colour }}></div>{% endif %}</td>
|
|
<td>{{ taxonomy.make_machinetag(p, e) }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
{% else %}
|
|
<td>{% if p.colour %}<div class='colorbox' style="background: {{ p.colour }};"></div>{% endif %}</td>
|
|
<td>{{ taxonomy.make_machinetag(p) }}</td>
|
|
{% endif %}
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{% endblock %}
|
|
|