-
-
Notifications
You must be signed in to change notification settings - Fork 309
Expand file tree
/
Copy pathdetection_rules.html
More file actions
72 lines (65 loc) · 2.66 KB
/
Copy pathdetection_rules.html
File metadata and controls
72 lines (65 loc) · 2.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
{% extends "base.html" %}
{% load humanize %}
{% load widget_tweaks %}
{% block title %}
Detection Rule Search
{% endblock %}
{% block content %}
<section class="section pt-0">
{% include "detection_rules_box.html" %}
</section>
<div class="is-max-desktop mb-3">
<section class="mx-5">
<div class="is-flex" style="justify-content: space-between;">
<div>
{{ page_obj.paginator.count|intcomma }} results
</div>
{% if is_paginated %}
{% include 'includes/rules_pagination.html' with page_obj=page_obj %}
{% endif %}
</div>
</section>
</div>
<section class="section pt-0">
<div class="content">
<table class="table is-bordered is-striped is-narrow is-hoverable is-fullwidth">
<thead>
<tr>
<th>Type</th>
<th colspan="width: 200px;">Metadata</th>
<th colspan="width: 100px;">Text</th>
<th>Source URL</th>
<th>Advisory IDs</th>
</tr>
</thead>
<tbody>
{% for detection_rule in page_obj %}
<tr class="is-clipped-list">
<td>{{ detection_rule.rule_type }}</td>
<td>{{ detection_rule.rule_metadata }}</td>
<td>{{ detection_rule.rule_text|truncatewords:10 }}</td>
<td><a href="{{ detection_rule.source_url }}">{{ detection_rule.source_url }}</a></td>
<td>
{% for advisory in detection_rule.related_advisories.all %}
{% ifchanged advisory.avid %}
<a href="{% url "advisory_details" advisory.avid %}">{{ advisory.avid }}</a>
<br/>
{% endifchanged %}
{% endfor %}
</td>
</tr>
{% empty %}
<tr class="is-clipped-list">
<td colspan="5" style="word-break: break-all">
No detection rules found.
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% if is_paginated %}
{% include 'includes/rules_pagination.html' with page_obj=page_obj %}
{% endif %}
</section>
{% endblock %}