-
-
Notifications
You must be signed in to change notification settings - Fork 303
Expand file tree
/
Copy pathpackages_v2.html
More file actions
113 lines (107 loc) · 5.91 KB
/
packages_v2.html
File metadata and controls
113 lines (107 loc) · 5.91 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
{% extends "base.html" %}
{% load humanize %}
{% load widget_tweaks %}
{% block title %}
VulnerableCode Package Search
{% endblock %}
{% block content %}
<section class="section pt-0">
{% include "package_search_box_v2.html" %}
</section>
{% if search %}
<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 %}
<div style="display:inline-block;">
{% include 'includes/pagination.html' with page_obj=page_obj %}
</div>
<div style="display:inline-block; margin-left:12px; vertical-align:middle;">
<a class="button is-small" href="?{% if search %}search={{ search|urlencode }}{% endif %}" title="Reset sorting and keep search">
⇵ Reset
</a>
</div>
{% 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>
<span
class="has-tooltip-multiline has-tooltip-black has-tooltip-arrow has-tooltip-text-left"
data-tooltip="The package url or purl is a URL string used to identify and locate a software package.">
Package URL
</span>
</th>
<th style="width: 225px;">
{% if sorts %}
{% if "-affected" in sorts %}
<a href="?{% if search %}search={{ search|urlencode }}&{% endif %}sort=affected" title="Sort ascending" style="margin-right:6px; text-decoration:none;">▼</a>
{% elif "affected" in sorts %}
<a href="?{% if search %}search={{ search|urlencode }}&{% endif %}sort=-affected" title="Sort descending" style="margin-right:6px; text-decoration:none;">▲</a>
{% else %}
<a href="?{% if search %}search={{ search|urlencode }}&{% endif %}sort=-affected" title="Sort by affected (desc)" style="margin-right:6px; text-decoration:none;">⇵</a>
{% endif %}
{% else %}
<a href="?{% if search %}search={{ search|urlencode }}&{% endif %}sort=-affected" title="Sort by affected (desc)" style="margin-right:6px; text-decoration:none;">⇵</a>
{% endif %}
<span
class="has-tooltip-multiline has-tooltip-black has-tooltip-arrow has-tooltip-text-left"
data-tooltip="This is the number of vulnerabilities that affect the package.">
Affected by vulnerabilities
</span>
</th>
<th style="width: 225px;">
{% if sorts %}
{% if "-fixing" in sorts %}
<a href="?{% if search %}search={{ search|urlencode }}&{% endif %}sort=fixing" title="Sort ascending" style="margin-right:6px; text-decoration:none;">▼</a>
{% elif "fixing" in sorts %}
<a href="?{% if search %}search={{ search|urlencode }}&{% endif %}sort=-fixing" title="Sort descending" style="margin-right:6px; text-decoration:none;">▲</a>
{% else %}
<a href="?{% if search %}search={{ search|urlencode }}&{% endif %}sort=-fixing" title="Sort by fixing (desc)" style="margin-right:6px; text-decoration:none;">⇵</a>
{% endif %}
{% else %}
<a href="?{% if search %}search={{ search|urlencode }}&{% endif %}sort=-fixing" title="Sort by fixing (desc)" style="margin-right:6px; text-decoration:none;">⇵</a>
{% endif %}
<span
class="has-tooltip-multiline has-tooltip-black has-tooltip-arrow has-tooltip-text-left"
data-tooltip="This is the number of vulnerabilities fixed by the package.">
Fixing vulnerabilities
</span>
</th>
</tr>
</thead>
<tbody>
{% for package in page_obj %}
<tr>
<td style="word-break: break-all;">
<a
href="{{ package.get_absolute_url }}?search={{ search }}"
target="_self">{{ package.purl }}</a>
</td>
<td>{{ package.vulnerability_count }}</td>
<td>{{ package.patched_vulnerability_count }}</td>
</tr>
{% empty %}
<tr>
<td colspan="3" style="word-break: break-all;">
No Package found.
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% if is_paginated %}
{% include 'includes/pagination.html' with page_obj=page_obj %}
{% endif %}
</section>
{% endif %}
{% endblock %}