aboutsummaryrefslogtreecommitdiffstats
path: root/test/security/check_versions/versions/templates/versions.html.j2
blob: 4860a72da46fd391c56b28ab9cccc4743f6e0dfd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
{% extends "base.html.j2" %}
{% block title %}ONAPTEST Bench{% endblock %}

{% block content %}
<h1 class="title is-1">{{ info.title }}</h1>

<div class="container">

<article class="message">
<div class="message-header">
  <p>Results</p>
</div>
<div class="message-body">
SECCOM recommended versions (global success rate: {{ info.mean }}):
  <ul>
    <li>Java: {{ info.success_rate.java }}% </li>
    <li>Python: {{ info.success_rate.python }}%</li>
  </ul>
</div>
</article>

<article class="message">
  <div class="message-header">
    <p>Legend</p>
  </div>
  <div class="message-body">
  <div class="has-background-success">SECCOM recommended version</div>
  <div class="has-background-success-light">Not the recommended version but at least the major version</div>
  <div class="has-background-warning-light">Ambiguous versions but at least 1 is the SECCOM recommended version</div>
  <div class="has-background-warning">Ambiguous versions but at least 1 is the major recommended version</div>
  <div class="has-background-danger">Wrong Versions</div>
  </div>
</article>
<br>

<h2 class="title is-1">JAVA versions</h2>

<table class="table is-bordered is-striped is-narrow is-hoverable is-fullwidth">
  <thead>
    <tr>
      <th>Component</th>
      <th>Versions</th>
    </tr>
  </thead>
  <tbody>
    {% for component in data %}
    <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 %}>

      {% if component.java_version is defined and component.java_version|length > 0 %}
         <td>{{ component.container }}</td>
         <td>{{ component.java_version}}</td>
      {% endif %}
        </tr>
    {% endfor %}
    </tbody>
  </table>
</div>
<br>

<div class="container">
<h2 class="title is-1">Python versions</h2>

<table class="table is-bordered is-striped is-narrow is-hoverable is-fullwidth">
  <thead>
    <tr>
      <th>Component</th>
      <th>Versions</th>
    </tr>
  </thead>
  <tbody>
    {% for component in data %}
    <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 %}>
      {% if component.python_version is defined and component.python_version|length > 0 %}
         <td>{{ component.container }}</td>
         <td>{{ component.python_version}}</td>
         {% endif %}
           </tr>
    {% endfor %}
    </tbody>
  </table>
</div>

{% endblock %}
</div>
</section>