{{/*
This file is part of SystemTestPortal.
Copyright (C) 2017  Institute of Software Technology, University of Stuttgart

SystemTestPortal is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

SystemTestPortal is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with SystemTestPortal.  If not, see <http://www.gnu.org/licenses/>.
*/}}

{{define "tab-content"}}
<div class="tab-card card" id="tabTestDashboard">
    <div class="navbar navbar-light action-bar p-3 d-print-none">
        <div class="btn-group">
            <select class="selectpicker" data-style="btn-primary" id="variants-dropdown-menu">
                {{/*get filled by fillDropdown*/}}
            </select>
        </div>
    </div>
    <div class="row tab-side-bar-row">
        <div class="col-md-12 p-3">
            <h4 class="mb-3">
                Dashboard
            </h4>
            <div class="panel panel-default">
                <table class="table table-bordered" id="dashboardTable">
                    <thead>
                    <tr id="versionNames">
                        <th>
                            Test Cases
                        </th>
                    </tr>
                    </thead>
                    <tbody id = "dashboard-content">
                    {{/*get filled by onChangeDropdown and newSiteDashboard*/}}
                    </tbody>
                </table>
            </div>
        </div>
    </div>
    <script src="/static/js/project/dashboard.js"></script>
    <script>
        $("#printerIcon").addClass("d-none");
        $("#helpIcon").removeClass("d-none");
        var dropdown = document.getElementById("variants-dropdown-menu");
        var dashboardElements = {{.Dashboard.DashboardElements}};
        var variants = {{.Dashboard.Variants}};
        fillDropdown(variants);
        newSiteDashboard(dashboardElements, variants);
        onChangeDropdown();
    </script>
</div>
{{end}}