aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/common/nsb_report.html.j2
blob: a6713eb1681699ba2882f2f83aece1f292c3fe38 (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
<!DOCTYPE html>
<html>

<!--
 Copyright (c) 2017 Rajesh Kudaka <4k.rajesh@gmail.com>
 Copyright (c) 2018-2019 Intel Corporation.

 All rights reserved. This program and the accompanying materials
 are made available under the terms of the Apache License, Version 2.0
 which accompanies this distribution, and is available at
 http://www.apache.org/licenses/LICENSE-2.0
-->

    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.3.7/themes/default/style.min.css">
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.3.7/jstree.min.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.3/Chart.bundle.min.js"></script>
        <style>
            {% include 'nsb_report.css' %}
        </style>
        <script>
            {% include 'nsb_report.js' %}
        </script>
    </head>

    <body>
        <div class="container-fluid">
            <div class="row">
                <header>
                    Testcase: {{report_meta.testcase}}<br>
                    Task-ID: {{report_meta.task_id}}<br>
                </header>
            </div>
            <div class="row">
                <div class="col-md-2">
                    <div id="divTree"></div>
                </div>
                <div class="col-md-10">
                    <canvas id="cnvGraph"></canvas>
                </div>
            </div>
            <div class="row">
                <div class="col-md-12 table-responsive">
                    <table id="tblMetrics" class="table table-condensed table-hover"></table>
                </div>
            </div>
        </div>

        <script>
            // Injected metrics, timestamps, keys and hierarchy
            var report_data = {{report_data|safe}};
            var report_time = {{report_time|safe}};
            var report_keys = {{report_keys|safe}};
            var report_tree = {{report_tree|safe}};
            var table_data = {{table_data|safe}};

            // Wait for DOM to be loaded
            $(function() {
                var tblMetrics = $('#tblMetrics');
                var cnvGraph = $('#cnvGraph');
                var divTree = $('#divTree');

                create_table(tblMetrics, table_data, report_time, report_keys);
                var objGraph = create_graph(cnvGraph, report_time);
                create_tree(divTree, report_tree);
                handle_tree(divTree, tblMetrics, objGraph, report_data, table_data, report_time);
            });
        </script>
    </body>
</html>