Fix security versions script
[integration.git] / test / security / check_versions / versions / templates / versions.html.j2
1 {% extends "base.html.j2" %}
2 {% block title %}ONAPTEST Bench{% endblock %}
3
4 {% block content %}
5 <h1 class="title is-1">{{ info.title }}</h1>
6
7 <div class="container">
8
9 <article class="message">
10 <div class="message-header">
11   <p>Results</p>
12 </div>
13 <div class="message-body">
14 SECCOM recommended versions (global success rate: {{ info.mean }}):
15   <ul>
16     <li>Java: {{ info.success_rate.java }}% </li>
17     <li>Python: {{ info.success_rate.python }}%</li>
18   </ul>
19 </div>
20 </article>
21
22 <article class="message">
23   <div class="message-header">
24     <p>Legend</p>
25   </div>
26   <div class="message-body">
27   <div class="has-background-success">SECCOM recommended version</div>
28   <div class="has-background-success-light">Not the recommended version but at least the major version</div>
29   <div class="has-background-warning-light">Ambiguous versions but at least 1 is the SECCOM recommended version</div>
30   <div class="has-background-warning">Ambiguous versions but at least 1 is the major recommended version</div>
31   <div class="has-background-danger">Wrong Versions</div>
32   </div>
33 </article>
34 <br>
35
36 <h2 class="title is-1">JAVA versions</h2>
37
38 <table class="table is-bordered is-striped is-narrow is-hoverable is-fullwidth">
39   <thead>
40     <tr>
41       <th>Component</th>
42       <th>Versions</th>
43     </tr>
44   </thead>
45   <tbody>
46     {% for component in data %}
47     <tr {% if component.java_status == 4 %} class="has-background-danger" {%elif component.java_status == 0  %}  class="has-background-success" {%elif component.java_status == 1  %}  class="has-background-success-light" {%elif component.java_status == 2  %}  class="has-background-warning-light" {%elif component.java_status == 3  %}  class="has-background-warning" {% endif %}>
48
49       {% if component.java_version is defined and component.java_version|length > 0 %}
50          <td>{{ component.container }}</td>
51          <td>{{ component.java_version}}</td>
52       {% endif %}
53         </tr>
54     {% endfor %}
55     </tbody>
56   </table>
57 </div>
58 <br>
59
60 <div class="container">
61 <h2 class="title is-1">Python versions</h2>
62
63 <table class="table is-bordered is-striped is-narrow is-hoverable is-fullwidth">
64   <thead>
65     <tr>
66       <th>Component</th>
67       <th>Versions</th>
68     </tr>
69   </thead>
70   <tbody>
71     {% for component in data %}
72     <tr {% if component.python_status == 4 %} class="has-background-danger" {%elif component.python_status == 0  %}  class="has-background-success" {%elif component.python_status == 1  %}  class="has-background-success-light" {%elif component.python_status == 2  %}  class="has-background-warning-light" {%elif component.python_status == 3  %}  class="has-background-warning" {% endif %}>
73       {% if component.python_version is defined and component.python_version|length > 0 %}
74          <td>{{ component.container }}</td>
75          <td>{{ component.python_version}}</td>
76          {% endif %}
77            </tr>
78     {% endfor %}
79     </tbody>
80   </table>
81 </div>
82
83 {% endblock %}
84 </div>
85 </section>