Add automatic status reporting
[releng.git] / utils / test / reporting / index-tempest-tmpl.html
1  <html>
2   <head>
3     <meta charset="utf-8">
4     <!-- Bootstrap core CSS -->
5     <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet">
6     <link href="default.css" rel="stylesheet">
7     <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
8     <script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
9     <script type="text/javascript">
10     $(document).ready(function (){
11         $(".btn-more").click(function() {
12             $(this).hide();
13             $(this).parent().find(".panel-default").show();
14         });
15     })
16     </script>
17   </head>
18     <body>
19     <div class="container">
20       <div class="masthead">
21         <h3 class="text-muted">Tempest status page</h3>
22         <nav>
23           <ul class="nav nav-justified">
24             <li class="active"><a href="index.html">Home</a></li>
25             <li><a href="index-tempest-apex.html">Apex</a></li>
26             <li><a href="index-tempest-compass.html">Compass</a></li>
27             <li><a href="index-tempest-fuel.html">Fuel</a></li>
28             <li><a href="index-tempest-joid.html">Joid</a></li>
29           </ul>
30         </nav>
31       </div>
32 <div class="row">
33     <div class="col-md-1"></div>
34     <div class="col-md-10">
35         <div class="page-header">
36             <h2>{{installer}}</h2>
37         </div>
38         {% for scenario_name, results in scenario_results.iteritems() -%}
39         <div class="scenario-part">
40             <div class="page-header">
41                 <h3><span class="glyphicon glyphicon-chevron-right"> <b>{{scenario_name}}</b></h3>
42             </div>
43             {% for result in results -%}
44                 {% if loop.index > 2 -%}
45                     <div class="panel panel-default" hidden>
46                 {%- else -%}
47                     <div class="panel panel-default">
48                 {%- endif %}
49                         <div class="panel-heading">
50                             <div class="progress-bar" role="progressbar" aria-valuenow="{{result.pr_step_ok}}" aria-valuemin="0" aria-valuemax="100" style="width: {{result.pr_step_ok}}%"></div>
51                             <span class="panel-header-item">
52                                 <h4><b>{{result.creation_date}}</b></h4>
53                             </span>
54                             <span class="badge panel-pod-name">{{result.pod_name}}</span>
55                         </div>
56                         <table class="table">
57                             <tr>
58                                 <th width="20%">Item</th>
59                                 <th width="10%">Result</th>
60                                 <th width="10%">Status</th>
61                                 <th width="60%">Errors</th>
62                             </tr>
63                             {% for item in items -%}
64                                 {% if item in result.details.keys() -%}
65                                     {% if result.criteria[item] -%}
66                                         <tr class="tr-ok">
67                                             <td>{{item}}</td>
68                                             <td>{{result.details[item]}}</td>
69                                             <td><span class="glyphicon glyphicon-ok"></td>
70                                             <td>{{result.errors[item]}}</td>
71                                         </tr>
72                                     {%- else -%}
73                                         <tr class="tr-danger">
74                                             <td>{{item}}</td>
75                                             <td>{{result.details[item]}}</td>
76                                             <td><span class="glyphicon glyphicon-remove"></td>
77                                             <td>{{result.errors[item]}}</td>
78                                         </tr>
79                                     {%- endif %}
80                                 {%- endif %}
81                             {%- endfor %}
82                         </table>
83                     </div>
84             {%- endfor %}
85             <button type="button" class="btn btn-more">More than two</button>
86         </div>
87         {%- endfor %}
88     </div>
89     <div class="col-md-1"></div>
90 </div>