Mercurial > farol > farol
comparison farol/templates/vulnerability/view.j2 @ 32:9b0fb5ca7eff
Replace the (%d)s with badges
author | Benoît Allard <benoit.allard@greenbone.net> |
---|---|
date | Thu, 02 Oct 2014 15:40:38 +0200 |
parents | 6de88f98983c |
children | 08a24e470de2 |
comparison
equal
deleted
inserted
replaced
31:79b76911444e | 32:9b0fb5ca7eff |
---|---|
40 {{ label_value("System Name", vulnerability._id._systemname) }} | 40 {{ label_value("System Name", vulnerability._id._systemname) }} |
41 {{ label_value("Value", vulnerability._id._value) }} | 41 {{ label_value("Value", vulnerability._id._value) }} |
42 </div> | 42 </div> |
43 {% endcall %} | 43 {% endcall %} |
44 {% endif %} | 44 {% endif %} |
45 {% call panel(heading="Notes (%d)" % vulnerability._notes | length, title=3) %} | 45 {% call panel(heading="Notes", badge=vulnerability._notes | length, title=3) %} |
46 <ul> | 46 <ul> |
47 {% for note in vulnerability._notes %} | 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> | 48 <li><a href="{{ url_for('.view_note', ordinal=vulnerability._ordinal, note_ordinal=note._ordinal)}}">{{ note.getTitle() }}</a></li> |
49 {% endfor %} | 49 {% endfor %} |
50 </ul> | 50 </ul> |
52 {% endcall %} | 52 {% endcall %} |
53 <div class="form-horizontal"> | 53 <div class="form-horizontal"> |
54 {% if vulnerability._discoverydate %}{{ label_value("Discovery Date", vulnerability._discoverydate) }}{% endif %} | 54 {% if vulnerability._discoverydate %}{{ label_value("Discovery Date", vulnerability._discoverydate) }}{% endif %} |
55 {% if vulnerability._releasedate %}{{ label_value("Release Date", vulnerability._releasedate) }}{% endif %} | 55 {% if vulnerability._releasedate %}{{ label_value("Release Date", vulnerability._releasedate) }}{% endif %} |
56 </div> | 56 </div> |
57 {% call panel(heading="Involvements (%d)" % vulnerability._involvements | length, title=3) %} | 57 {% call panel(heading="Involvements", badge=vulnerability._involvements | length, title=3) %} |
58 <ul> | 58 <ul> |
59 {% for involvement in vulnerability._involvements %} | 59 {% for involvement in vulnerability._involvements %} |
60 <li><a href="{{ url_for('.view_involvement', ordinal=vulnerability._ordinal, index=loop.index0) }}">{{ involvement.getTitle() }}</a></li> | 60 <li><a href="{{ url_for('.view_involvement', ordinal=vulnerability._ordinal, index=loop.index0) }}">{{ involvement.getTitle() }}</a></li> |
61 {% endfor %} | 61 {% endfor %} |
62 </ul> | 62 </ul> |
65 {% if vulnerability._cve %} | 65 {% if vulnerability._cve %} |
66 <div class="form-horizontal"> | 66 <div class="form-horizontal"> |
67 {{ label_value("CVE", vulnerability._cve) }} | 67 {{ label_value("CVE", vulnerability._cve) }} |
68 </div> | 68 </div> |
69 {% endif %} | 69 {% endif %} |
70 {% call panel(heading="CWE (%d)" % vulnerability._cwes | length, title=3) %} | 70 {% call panel(heading="CWE", badge=vulnerability._cwes | length, title=3) %} |
71 <ul> | 71 <ul> |
72 {% for cwe in vulnerability._cwes %} | 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> | 73 <li>{{ cwe._id }} - {{ cwe._value}} (<a href="{{ url_for('.edit_cwe', ordinal=vulnerability._ordinal, index=loop.index0) }}">edit</a>)</li> |
74 {% endfor %} | 74 {% endfor %} |
75 <a href="{{ url_for('.add_cwe', ordinal=vulnerability._ordinal) }}" class="pull-right">add</a> | 75 <a href="{{ url_for('.add_cwe', ordinal=vulnerability._ordinal) }}" class="pull-right">add</a> |
76 {% endcall %} | 76 {% endcall %} |
77 {% call panel(heading="Product Statuses (%d)" % vulnerability._productstatuses | length, title=3) %} | 77 {% call panel(heading="Product Statuses", badge=vulnerability._productstatuses | length, title=3) %} |
78 <ul> | 78 <ul> |
79 {% for status in vulnerability._productstatuses %} | 79 {% for status in vulnerability._productstatuses %} |
80 <li><a href="{{ url_for('.view_status', ordinal=vulnerability._ordinal, index=loop.index0) }}">{{ status.getTitle() }}</a></li> | 80 <li><a href="{{ url_for('.view_status', ordinal=vulnerability._ordinal, index=loop.index0) }}">{{ status.getTitle() }}</a></li> |
81 {% endfor %} | 81 {% endfor %} |
82 </ul> | 82 </ul> |
83 <a href="{{ url_for('.add_status', ordinal=vulnerability._ordinal) }}" class="pull-right">add</a> | 83 <a href="{{ url_for('.add_status', ordinal=vulnerability._ordinal) }}" class="pull-right">add</a> |
84 {% endcall %} | 84 {% endcall %} |
85 {% call panel(heading="Threats (%d)" % vulnerability._threats | length, title=3) %} | 85 {% call panel(heading="Threats", badge=vulnerability._threats | length, title=3) %} |
86 <ul> | 86 <ul> |
87 {% for threat in vulnerability._threats %} | 87 {% for threat in vulnerability._threats %} |
88 <li><a href="{{ url_for('.view_threat', ordinal=vulnerability._ordinal, index=loop.index0) }}">{{ threat.getTitle() }}</a></li> | 88 <li><a href="{{ url_for('.view_threat', ordinal=vulnerability._ordinal, index=loop.index0) }}">{{ threat.getTitle() }}</a></li> |
89 {% endfor %} | 89 {% endfor %} |
90 </ul> | 90 </ul> |
91 <a href="{{ url_for('.add_threat', ordinal=vulnerability._ordinal) }}" class="pull-right">add</a> | 91 <a href="{{ url_for('.add_threat', ordinal=vulnerability._ordinal) }}" class="pull-right">add</a> |
92 {% endcall %} | 92 {% endcall %} |
93 {% call panel(heading="CVSS Score Sets (%d)" % vulnerability._cvsss | length, title=3) %} | 93 {% call panel(heading="CVSS Score Sets", badge=vulnerability._cvsss | length, title=3) %} |
94 <ul> | 94 <ul> |
95 {% for cvss in vulnerability._cvsss %} | 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> | 96 <li><a href="{{ url_for('.view_cvss', ordinal=vulnerability._ordinal, index=loop.index0) }}">{{ cvss._vector }} ({{ cvss._basescore }})</a></li> |
97 {% endfor %} | 97 {% endfor %} |
98 </ul> | 98 </ul> |
99 <a href="{{ url_for('.add_cvss', ordinal=vulnerability._ordinal) }}" class="pull-right">add</a> | 99 <a href="{{ url_for('.add_cvss', ordinal=vulnerability._ordinal) }}" class="pull-right">add</a> |
100 {% endcall %} | 100 {% endcall %} |
101 {% call panel(heading="Remediations (%d)" % vulnerability._remediations | length, title=3) %} | 101 {% call panel(heading="Remediations", badge=vulnerability._remediations | length, title=3) %} |
102 <ul> | 102 <ul> |
103 {% for remediation in vulnerability._remediations %} | 103 {% for remediation in vulnerability._remediations %} |
104 <li><a href="{{ url_for('.view_remediation', ordinal=vulnerability._ordinal, index=loop.index0) }}">{{ remediation.getTitle() }}</a></li> | 104 <li><a href="{{ url_for('.view_remediation', ordinal=vulnerability._ordinal, index=loop.index0) }}">{{ remediation.getTitle() }}</a></li> |
105 {% endfor %} | 105 {% endfor %} |
106 </ul> | 106 </ul> |
107 <a href="{{ url_for('.add_remediation', ordinal=vulnerability._ordinal) }}" class="pull-right">add</a> | 107 <a href="{{ url_for('.add_remediation', ordinal=vulnerability._ordinal) }}" class="pull-right">add</a> |
108 {% endcall %} | 108 {% endcall %} |
109 {% call panel(heading="References (%d)" % vulnerability._references | length , title=3) %} | 109 {% call panel(heading="References", badge=vulnerability._references | length , title=3) %} |
110 <ul> | 110 <ul> |
111 {% for reference in vulnerability._references %} | 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> | 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 %} | 113 {% endfor %} |
114 </ul> | 114 </ul> |
115 <a class="pull-right" href="{{ url_for('.add_reference', ordinal=vulnerability._ordinal) }}">add</a> | 115 <a class="pull-right" href="{{ url_for('.add_reference', ordinal=vulnerability._ordinal) }}">add</a> |
116 {% endcall %} | 116 {% endcall %} |
117 {% call panel(heading="Acknowledgments (%d)" % vulnerability._acknowledgments | length, title=3) %} | 117 {% call panel(heading="Acknowledgments", badge=vulnerability._acknowledgments | length, title=3) %} |
118 <ul> | 118 <ul> |
119 {% for ack in vulnerability._acknowledgments %} | 119 {% for ack in vulnerability._acknowledgments %} |
120 <li><a href="{{ url_for('.view_acknowledgment', ordinal=vulnerability._ordinal, index=loop.index0)}}">{{ ack.getTitle() }}</a></li> | 120 <li><a href="{{ url_for('.view_acknowledgment', ordinal=vulnerability._ordinal, index=loop.index0)}}">{{ ack.getTitle() }}</a></li> |
121 {% endfor %} | 121 {% endfor %} |
122 </ul> | 122 </ul> |