comparison farol/templates/vulnerability/view.j2 @ 0:4a9f23230eba

Initial Release
author Benoît Allard <benoit.allard@greenbone.net>
date Wed, 24 Sep 2014 10:07:49 +0200
parents
children 6de88f98983c
comparison
equal deleted inserted replaced
-1:000000000000 0:4a9f23230eba
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" %}
27 {% from "macros.j2" import panel, label_value %}
28 {% block title %}{{ vulnerability._title }}{% endblock %}
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 %}
45 {% call panel(heading="Notes (%d)" % vulnerability._notes | length, title=3) %}
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>
57 {% call panel(heading="Involvements (%d)" % vulnerability._involvements | length, title=3) %}
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 %}
70 {% call panel(heading="CWE (%d)" % vulnerability._cwes | length, title=3) %}
71 <ul>
72 {% for cwe in vulnerability._cwes %}
73 <li>{{ cwe._id }} - {{ cwe._value}} (<a href="{{ url_for('.edit_cwe', ordinal=vulnerability._ordinal, index=loop.index0) }}">edit</a>)</li>
74 {% endfor %}
75 <a href="{{ url_for('.add_cwe', ordinal=vulnerability._ordinal) }}" class="pull-right">add</a>
76 {% endcall %}
77 {% call panel(heading="Product Statuses (%d)" % vulnerability._productstatuses | length, title=3) %}
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 %}
85 {% call panel(heading="Threats (%d)" % vulnerability._threats | length, title=3) %}
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 %}
93 {% call panel(heading="CVSS Score Sets (%d)" % vulnerability._cvsss | length, title=3) %}
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>
99 <a href="{{ url_for('.add_note', ordinal=vulnerability._ordinal) }}" class="pull-right">add</a>
100 {% endcall %}
101 {% call panel(heading="Remediations (%d)" % vulnerability._remediations | length, title=3) %}
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 %}
109 {% call panel(heading="References (%d)" % vulnerability._references | length , title=3) %}
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 %}
117 {% call panel(heading="Acknowledgments (%d)" % vulnerability._acknowledgments | length, title=3) %}
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 %}

http://farol.wald.intevation.org