Skip to content

Commit d7ba181

Browse files
authored
Resolves #380: Added severity in the view at http://127.0.0.1:8000/vulnerabilities/<… (#390)
* Added Severity table Signed-off-by: Pushpit <pushpit07@gmail.com>
1 parent 254cb96 commit d7ba181

2 files changed

Lines changed: 50 additions & 23 deletions

File tree

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
.Site {
2-
display: flex;
3-
min-height: 100vh;
4-
flex-direction: column;
5-
}
2+
display: flex;
3+
min-height: 100vh;
4+
flex-direction: column;
5+
}
66

77
.Site-content {
8-
flex: 1;
9-
}
8+
flex: 1;
9+
}

vulnerabilities/templates/vulnerability.html

Lines changed: 44 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,33 +20,60 @@ <h3>Summary:</h3>
2020

2121
{% if object_list %}
2222
<h3>References:</h3>
23-
<table class="table is-bordered is-striped is-narrow is-hoverable is-fullwidth">
24-
<tr>
25-
<th> Reference ID </th>
26-
<th> URL </th>
27-
</tr>
28-
{% for ref in object_list %}
23+
<table class="table is-bordered is-striped is-narrow is-hoverable is-fullwidth">
2924
<tr>
30-
{% if ref.reference_id %}
31-
<td>{{ref.reference_id}}</td>
25+
<th> Reference ID </th>
26+
<th> URL </th>
27+
</tr>
28+
{% for ref in object_list %}
29+
<tr>
30+
{% if ref.reference_id %}
31+
<td>{{ref.reference_id}}</td>
32+
33+
{% else %}
34+
<td>-</td>
35+
36+
{% endif %}
37+
38+
{% if ref.url %}
39+
<td><a href="{{ ref.url }}">{{ref.url}}</a></td>
3240

33-
{% else %}
34-
<td>-</td>
41+
{% else %}
42+
<td>-</td>
3543

36-
{% endif %}
44+
{% endif %}
45+
</tr>
3746

38-
{% if ref.url %}
39-
<td><a href="{{ ref.url }}">{{ref.url}}</a></td>
47+
{% endfor %}
4048

41-
{% else %}
42-
<td>-</td>
49+
</table>
4350

44-
{% endif %}
51+
<h3>Severity</h3>
52+
<table class="table is-bordered is-striped is-narrow is-hoverable is-fullwidth">
53+
<tr>
54+
<th> System </th>
55+
<th> Score </th>
56+
<th> Found At </th>
4557
</tr>
58+
{% for ref in object_list %}
59+
{% for obj in ref.scores %}
60+
<tr>
61+
<td>{{obj.scoring_system}}</td>
62+
63+
<td>{{obj.value}}</td>
4664

65+
{% if ref.url %}
66+
<td><a href="{{ ref.url }}">{{ref.url}}</a></td>
67+
68+
{% else %}
69+
<td>{{ ref.reference_id }}</td>
70+
71+
{% endif %}
72+
</tr>
4773
{% endfor %}
74+
{% endfor %}
4875

49-
</table>
76+
</table>
5077
{% endif %}
5178
{% if enable_curation %}
5279
<a class="button is-success" href = "{% url 'vulnerability_reference_create' vulnerability.pk %}">

0 commit comments

Comments
 (0)