summaryrefslogtreecommitdiffstats
path: root/src/VBox/Devices/EFI/Firmware/BaseTools/Plugin/BuildToolsReport/BuildToolsReport_Template.html
blob: 8273fdee4993e9367aa4b7a1a3e4474d51e8f447 (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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<!doctype html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible">
    <title>Build Tools Report</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" type="text/css" href="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.7/css/bootstrap.min.css" />
    <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.15/css/dataTables.bootstrap.min.css" />
    <style>
        div.attribution {
            border: 1px solid #ddd;
            background-color: #bbb;
            padding-left: 20px;
        }
    </style>
</head>
<body>
    <div class="container-fluid">
        <h1>Build Tools Report</h1>
        <ul class="nav nav-tabs">
            <li class="active"><a data-toggle="tab" href="#tabs-1">Tools</a></li>
            <li><a data-toggle="tab" href="#tabs-2">About</a></li>
        </ul>
        <div class="tab-content">
            <div id="tabs-1" class="tab-pane fade in active">
                <table id="modinfo" class="table table-striped table-bordered table-hover" cellspacing="0">
                    <thead>
                        <tr>
                            <th>Key</th>
                            <th>Value</th>
                            <th>Type</th>
                        </tr>
                    </thead>
                    <tbody></tbody>
                </table>
            </div>
            <div id="tabs-2" class="tab-pane">
                <div class="row">
                    <div class="col-xs-7">
                        <p></p>
                        <p>
                            Build Tools Report Template Version: <span id="ReportTemplateVersion">1.00</span><br />
                            Build Tools Report Plugin Version: <span id='ReportToolVersion'></span><br />
                        </p>
                        <h3>License</h3>
                        <hr />
                        <div id="ToolLicenseContent">
                            <p>
                                <span class="copyright">Copyright (c) Microsoft Corporation.</span><br />
                                <span class="license">
                                    SPDX-License-Identifier: BSD-2-Clause-Patent
                                </span>
                            </p>
                        </div>
                    </div>
                    <div id="AttributionListWrapper" class="col-xs-5">
                        <h3>External Licenses</h3>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- Javascript libraries -->
    <script type="text/javascript" charset="utf8" src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.2.1.min.js"></script>
    <script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.10.15/js/jquery.dataTables.min.js"></script>
    <script type="text/javascript" charset="utf8" src="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.7/bootstrap.min.js"></script>
    <script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.10.15/js/dataTables.bootstrap.min.js"></script>

    <script>
        var EmbeddedJd = %TO_BE_FILLED_IN_BY_PYTHON_SCRIPT%;
    </script>
    <!-- Add javascript here -->
    <script>
        var MODULE_TABLE_OFFSET = 350;  //Space needed for other stuff besides the Table
        $(document).ready(function () {
            $('span#ReportToolVersion').text(EmbeddedJd.PluginVersion);
            //To support tabs and correct column width we need this change
            $('a[data-toggle="tab"][href="#tabs-1"]').on('shown.bs.tab', function (e) {
                $.fn.dataTable.tables({ visible: true, api: true }).columns.adjust();
            });
            //table for modules
            var mTable = $('table#modinfo').dataTable({
                "aaData": EmbeddedJd.modules,
                "paginate": false,
                "autoWidth": false,
                "scrollY": ($(window).height() - MODULE_TABLE_OFFSET) + "px",
                "aaSorting": [[2, "asc"]],
                "aoColumnDefs": [
                    {
                        "mData": "name",
                        "aTargets": [0]
                    },

                    {
                        "mData": "version",
                        "aTargets": [1]
                    },
                    {
                        "mData": "type",
                        "aTargets": [2],
                    }
                ] //end of column def
            }); //end of modules table

            //
            // Create Attribution List for all external libraries used
            //
            [
                { Title: "JQuery", Copyright: "Copyright 2017 The jQuery Foundation", Version: $.fn.jquery, LicenseType: "MIT", LicenseLink: "https://jquery.org/license/" },
                { Title: "DataTables", Copyright: "DataTables designed and created by SpryMedia Ltd Copyright 2007-2017", Version: $.fn.dataTable.version, LicenseType: "MIT", LicenseLink: "https://datatables.net/license/mit" },
                { Title: "BootStrap", Copyright: "Code and documentation copyright 2011-2017 the Bootstrap Authors and Twitter, Inc.", Version: "3.3.7", LicenseType: "MIT", LicenseLink: "https://github.com/twbs/bootstrap/blob/master/LICENSE" }
            ].forEach(function (element) {
                $("<div class='attribution'><h4>" + element.Title + "</h4><p>Version: <span class='version'>" + element.Version + "</span><br /><span class='copyright'>" +
                    element.Copyright + "</span><br />License: <a class='license' href='" + element.LicenseLink + "'>" + element.LicenseType + "</a></p></div>").appendTo("div#AttributionListWrapper");
            });
        });
        $(window).resize(function() {
            $.fn.dataTable.tables({ visible: true, api: true }).columns.adjust();
        });


    </script>
</body>
</html>