Add Pktgen traffic generator for vCMTS
[yardstick.git] / yardstick / common / html_template.py
1 #############################################################################
2 # Copyright (c) 2017 Rajesh Kudaka
3 #
4 # Author: Rajesh Kudaka 4k.rajesh@gmail.com
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 #############################################################################
10
11 report_template = """
12 <html>
13     <head>
14         <title>Yardstick Report</title>
15         <link href="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/css\
16 /bootstrap.min.css" rel="stylesheet">
17     </head>
18     <div class="content">
19         <h3>Yardstick Report </h3>
20         <hr/>
21         <div>
22
23             <div>Task ID : {{result.task_id}} </div>
24             <div style="margin-top:5px;">Criteria :
25                 <font> {{result.criteria}}</font>
26             </div>
27             <hr/>
28
29             <caption>Information</caption>
30             <table class="table table-striped">
31                 <tr>
32                     <th>#</th>
33                     <th>key</th>
34                     <th>value</th>
35                 </tr>
36                 <tbody>
37                     {% for key, value in result.info.items() %}
38                     <tr>
39                         <td>{{ loop.index }}</td>
40                         <td>{{key}}</td>
41                         <td>{{value}}</td>
42                     </tr>
43                     {% endfor %}
44                 </tbody>
45             </table>
46             <hr/>
47
48             <caption>Test Cases</caption>
49             <table class="table table-striped">
50                 <tr>
51                     <th>#</th>
52                     <th>key</th>
53                     <th>value</th>
54                 </tr>
55                 <tbody>
56                     {% for key, value in result.testcases.items() %}
57                     <tr>
58                         <td>{{ loop.index }}</td>
59                         <td>{{key}}</td>
60                         <td>{{value.criteria}}</td>
61                     </tr>
62                     {% endfor %}
63                 </tbody>
64             </table>
65
66         </div>
67     </div>
68 </html>
69 """