Mercurial > farol > farol
annotate farol/templates/vulnerability/view.j2 @ 91:6a61c02f2156
Add deletion of CWEs
author | Benoît Allard <benoit.allard@greenbone.net> |
---|---|
date | Thu, 09 Oct 2014 16:03:04 +0200 |
parents | 08a24e470de2 |
children | 3848faa88cd5 |
rev | line source |
---|---|
0 | 1 {# |
2 # Description: | |
3 # Web Template used in Farol Design | |
4 # | |
5 # Authors: | |
6 # BenoƮt Allard <benoit.allard@greenbone.net> | |
7 # | |
8 # Copyright: | |
9 # Copyright (C) 2014 Greenbone Networks GmbH | |
10 # | |
11 # This program is free software; you can redistribute it and/or | |
12 # modify it under the terms of the GNU General Public License | |
13 # as published by the Free Software Foundation; either version 2 | |
14 # of the License, or (at your option) any later version. | |
15 # | |
16 # This program is distributed in the hope that it will be useful, | |
17 # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 # GNU General Public License for more details. | |
20 # | |
21 # You should have received a copy of the GNU General Public License | |
22 # along with this program; if not, write to the Free Software | |
23 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
24 -#} | |
25 | |
26 {% extends "base.j2" %} | |
91
6a61c02f2156
Add deletion of CWEs
Benoît Allard <benoit.allard@greenbone.net>
parents:
65
diff
changeset
|
27 {% from "macros.j2" import panel, label_value, delete_button %} |
65
08a24e470de2
Small fix to the page title
Benoît Allard <benoit.allard@greenbone.net>
parents:
32
diff
changeset
|
28 {% block title %}{{ vulnerability._title or '' }}{% endblock %} |
0 | 29 |
30 {% set active = 'vulnerability' %} | |
31 | |
32 {% block content %} | |
33 <a class="pull-right" href="{{ url_for('.edit', ordinal=vulnerability._ordinal) }}">edit</a> | |
34 <div class='page-header'> | |
35 <h1>{{ vulnerability._title or '' }} <small>{{ vulnerability._type or '' }} (#{{ vulnerability._ordinal }})</small></h1> | |
36 </div> | |
37 {% if vulnerability._id %} | |
38 {% call panel(heading="ID", title=3, collapsible=False) %} | |
39 <div class="form-horizontal"> | |
40 {{ label_value("System Name", vulnerability._id._systemname) }} | |
41 {{ label_value("Value", vulnerability._id._value) }} | |
42 </div> | |
43 {% endcall %} | |
44 {% endif %} | |
32
9b0fb5ca7eff
Replace the (%d)s with badges
Benoît Allard <benoit.allard@greenbone.net>
parents:
24
diff
changeset
|
45 {% call panel(heading="Notes", badge=vulnerability._notes | length, title=3) %} |
0 | 46 <ul> |
47 {% for note in vulnerability._notes %} | |
48 <li><a href="{{ url_for('.view_note', ordinal=vulnerability._ordinal, note_ordinal=note._ordinal)}}">{{ note.getTitle() }}</a></li> | |
49 {% endfor %} | |
50 </ul> | |
51 <a href="{{ url_for('.add_note', ordinal=vulnerability._ordinal) }}" class="pull-right">add</a> | |
52 {% endcall %} | |
53 <div class="form-horizontal"> | |
54 {% if vulnerability._discoverydate %}{{ label_value("Discovery Date", vulnerability._discoverydate) }}{% endif %} | |
55 {% if vulnerability._releasedate %}{{ label_value("Release Date", vulnerability._releasedate) }}{% endif %} | |
56 </div> | |
32
9b0fb5ca7eff
Replace the (%d)s with badges
Benoît Allard <benoit.allard@greenbone.net>
parents:
24
diff
changeset
|
57 {% call panel(heading="Involvements", badge=vulnerability._involvements | length, title=3) %} |
0 | 58 <ul> |
59 {% for involvement in vulnerability._involvements %} | |
60 <li><a href="{{ url_for('.view_involvement', ordinal=vulnerability._ordinal, index=loop.index0) }}">{{ involvement.getTitle() }}</a></li> | |
61 {% endfor %} | |
62 </ul> | |
63 <a href="{{ url_for('.add_involvement', ordinal=vulnerability._ordinal) }}" class="pull-right">add</a> | |
64 {% endcall %} | |
65 {% if vulnerability._cve %} | |
66 <div class="form-horizontal"> | |
67 {{ label_value("CVE", vulnerability._cve) }} | |
68 </div> | |
69 {% endif %} | |
32
9b0fb5ca7eff
Replace the (%d)s with badges
Benoît Allard <benoit.allard@greenbone.net>
parents:
24
diff
changeset
|
70 {% call panel(heading="CWE", badge=vulnerability._cwes | length, title=3) %} |
0 | 71 <ul> |
72 {% for cwe in vulnerability._cwes %} | |
91
6a61c02f2156
Add deletion of CWEs
Benoît Allard <benoit.allard@greenbone.net>
parents:
65
diff
changeset
|
73 <li><div>{{ cwe._id }} - {{ cwe._value}} (<a href="{{ url_for('.edit_cwe', ordinal=vulnerability._ordinal, index=loop.index0) }}">edit</a>){{ delete_button(url_for('.del_cwe', ordinal=vulnerability._ordinal, index=loop.index0)) }}</div></li> |
0 | 74 {% endfor %} |
75 <a href="{{ url_for('.add_cwe', ordinal=vulnerability._ordinal) }}" class="pull-right">add</a> | |
76 {% endcall %} | |
32
9b0fb5ca7eff
Replace the (%d)s with badges
Benoît Allard <benoit.allard@greenbone.net>
parents:
24
diff
changeset
|
77 {% call panel(heading="Product Statuses", badge=vulnerability._productstatuses | length, title=3) %} |
0 | 78 <ul> |
79 {% for status in vulnerability._productstatuses %} | |
80 <li><a href="{{ url_for('.view_status', ordinal=vulnerability._ordinal, index=loop.index0) }}">{{ status.getTitle() }}</a></li> | |
81 {% endfor %} | |
82 </ul> | |
83 <a href="{{ url_for('.add_status', ordinal=vulnerability._ordinal) }}" class="pull-right">add</a> | |
84 {% endcall %} | |
32
9b0fb5ca7eff
Replace the (%d)s with badges
Benoît Allard <benoit.allard@greenbone.net>
parents:
24
diff
changeset
|
85 {% call panel(heading="Threats", badge=vulnerability._threats | length, title=3) %} |
0 | 86 <ul> |
87 {% for threat in vulnerability._threats %} | |
88 <li><a href="{{ url_for('.view_threat', ordinal=vulnerability._ordinal, index=loop.index0) }}">{{ threat.getTitle() }}</a></li> | |
89 {% endfor %} | |
90 </ul> | |
91 <a href="{{ url_for('.add_threat', ordinal=vulnerability._ordinal) }}" class="pull-right">add</a> | |
92 {% endcall %} | |
32
9b0fb5ca7eff
Replace the (%d)s with badges
Benoît Allard <benoit.allard@greenbone.net>
parents:
24
diff
changeset
|
93 {% call panel(heading="CVSS Score Sets", badge=vulnerability._cvsss | length, title=3) %} |
0 | 94 <ul> |
95 {% for cvss in vulnerability._cvsss %} | |
96 <li><a href="{{ url_for('.view_cvss', ordinal=vulnerability._ordinal, index=loop.index0) }}">{{ cvss._vector }} ({{ cvss._basescore }})</a></li> | |
97 {% endfor %} | |
98 </ul> | |
24
6de88f98983c
Fix url to add a cvss vector
Benoît Allard <benoit.allard@greenbone.net>
parents:
0
diff
changeset
|
99 <a href="{{ url_for('.add_cvss', ordinal=vulnerability._ordinal) }}" class="pull-right">add</a> |
0 | 100 {% endcall %} |
32
9b0fb5ca7eff
Replace the (%d)s with badges
Benoît Allard <benoit.allard@greenbone.net>
parents:
24
diff
changeset
|
101 {% call panel(heading="Remediations", badge=vulnerability._remediations | length, title=3) %} |
0 | 102 <ul> |
103 {% for remediation in vulnerability._remediations %} | |
104 <li><a href="{{ url_for('.view_remediation', ordinal=vulnerability._ordinal, index=loop.index0) }}">{{ remediation.getTitle() }}</a></li> | |
105 {% endfor %} | |
106 </ul> | |
107 <a href="{{ url_for('.add_remediation', ordinal=vulnerability._ordinal) }}" class="pull-right">add</a> | |
108 {% endcall %} | |
32
9b0fb5ca7eff
Replace the (%d)s with badges
Benoît Allard <benoit.allard@greenbone.net>
parents:
24
diff
changeset
|
109 {% call panel(heading="References", badge=vulnerability._references | length , title=3) %} |
0 | 110 <ul> |
111 {% for reference in vulnerability._references %} | |
112 <li><a href="{{ reference._url }}" target="_blank">{{ reference._description }}{% if reference._type %} ({{ reference._type }}){% endif %}</a> (<a href="{{ url_for('.edit_reference', ordinal=vulnerability._ordinal, index=loop.index0) }}">edit</a>)</li> | |
113 {% endfor %} | |
114 </ul> | |
115 <a class="pull-right" href="{{ url_for('.add_reference', ordinal=vulnerability._ordinal) }}">add</a> | |
116 {% endcall %} | |
32
9b0fb5ca7eff
Replace the (%d)s with badges
Benoît Allard <benoit.allard@greenbone.net>
parents:
24
diff
changeset
|
117 {% call panel(heading="Acknowledgments", badge=vulnerability._acknowledgments | length, title=3) %} |
0 | 118 <ul> |
119 {% for ack in vulnerability._acknowledgments %} | |
120 <li><a href="{{ url_for('.view_acknowledgment', ordinal=vulnerability._ordinal, index=loop.index0)}}">{{ ack.getTitle() }}</a></li> | |
121 {% endfor %} | |
122 </ul> | |
123 <a class="pull-right" href="{{ url_for('.add_acknowledgment', ordinal=vulnerability._ordinal) }}">add</a> | |
124 {% endcall %} | |
125 {% endblock %} |