<!-- wrapper  -->
<div class="container-fluid dashboard-content ">
    <!-- pageheader  -->
    <div class="row">
        <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
            <div class="page-header">
                <h2 class="pageheader-title">Completed sessions statistics</h2>
                <!-- <p class="pageheader-text">Nulla euismod urna eros, sit amet scelerisque torton lectus vel mauris facilisis faucibus at enim quis massa lobortis rutrum.</p> -->
                <div class="page-breadcrumb">
                    <nav aria-label="breadcrumb">
                        <ol class="breadcrumb">
                            <li class="breadcrumb-item"><a href="#" class="breadcrumb-link">Statistics</a></li>
                            <li class="breadcrumb-item active" aria-current="page">Overall</li>
                        </ol>
                    </nav>
                </div>
            </div>
        </div>
    </div>
    <!-- end pageheader  -->
    <!-- main content  -->
    <div class="row">
            <div class="offset-xl-10 col-xl-2 col-lg-2 col-md-6 col-sm-12 col-12">
                <form>
                    <div class="form-group">
                        <input class="form-control" type="text" name="daterange" value="01/01/2020 - 12/31/2020" />
                    </div>
                </form>
            </div>
    </div>
    <div class="row">
        {% if sessions|length %}
            {% for session in sessions %}
            <div class="col-xl-6 col-lg-6 col-md-6 col-sm-12 col-12">
                <div class="card">
                    <div class="card-body">
                        <table class="table table-striped">
                            <tbody>
                            <tr>
                                <td>User</td>
                                <td>{{ session.operator_id }}</td>
                            </tr>
                            <tr>
                                <td>Started</td>
                                <td>{{ session.start }}</td>
                            </tr>
                            <tr>
                                <td>Finished</td>
                                <td>{{ session.end }}</td>
                            </tr>
                            <tr>
                                <td>Num. of movies</td>
                                <td>{{ session.stats.numMovies }}</td>
                            </tr>
                            <tr>
                                <td>Num. of particles</td>
                                <td>{{ session.stats.numPtcls }}</td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
            {% endfor %}
        {% else %}
            <p>No sessions found for current user.</p>
        {% endif %}
    </div>
    <!-- end main content  -->
</div>
<!-- end wrapper  -->
<!-- javascript -->
<script>
    $(function() {
        $('input[name="daterange"]').daterangepicker({
            opens: 'left'
        }, function(start, end, label) {
            console.log("A new date selection was made: " + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD'));
        });
    });
</script>
