<commit_before>{% extends 'LadbCoreBundle:Common:Layout/_list.html.twig' %}

{% set pageTitle = 'OpenCutList Stats' %}
{% set hideHeaderContainer = false %}

{% block bodyJavascripts %}
    {{ parent() }}
    <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.4/Chart.min.js"></script>
    <script>
        $('.ladb-readmore').readmore({
            moreLink: '<a href="#" class="ladb-readmore-more"><i class="ladb-icon-two-chevron-down"></i></a>',
            lessLink: '<a href="#" class="ladb-readmore-less"><i class="ladb-icon-two-chevron-up"></i></a>',
        });
        var byDayChart = new Chart($('#ladb_by_day_chart'), {
            type: 'line',
            data: {
                datasets: [{
                    label: 'Upgrades',
                    data: [
                        {% for row in downloadsByDay %}
                            {
                                t: new Date('{{ row.day }} 00:00'),
                                y: {{ row.count }}
                            }{% if not loop.last %},{% endif %}
                        {% endfor %}
                    ],
                    backgroundColor: '#FD6586',
                    borderColor: '#FD6586',
                    fill: false,
                    lineTension: 0
                },{
                    label: 'Manifests',
                    data: [
                        {% for row in manifestsByDay %}
                            {
                                t: new Date('{{ row.day }} 00:00'),
                                y: {{ row.count }}
                            }{% if not loop.last %},{% endif %}
                        {% endfor %}
                    ],
                    backgroundColor: '#3DA4E8',
                    borderColor: '#3DA4E8',
                    fill: false,
                    lineTension: 0
                },{
                    label: 'Tutorials',
                    data: [
                        {% for row in tutorialsByDay %}
                            {
                                t: new Date('{{ row.day }} 00:00'),
                                y: {{ row.count }}
                            }{% if not loop.last %},{% endif %}
                        {% endfor %}
                    ],
                    backgroundColor: '#71D4A9',
                    borderColor: '#71D4A9',
                    fill: false,
                    lineTension: 0
                }]
            },
            options: {
                animation: {
                    duration: 0 // general animation time
                },
                aspectRatio: 2,
                scales: {
                    xAxes: [{
                        type: 'time',
                        time: {
                            unit: 'day'
                        }
                    }],
                    yAxes: [{
                        type: 'linear',
                        ticks: {
                            beginAtZero: true,
                            stepSize: 10
                        },
                        position: 'right',
                    }]
                }
            }
        });
    </script>
{% endblock %}

{% block bodyHeaderContainerContent %}
    {% include 'LadbCoreBundle:Opencutlist:_list-topbar.part.html.twig' %}
{% endblock %}

{% block bodyContainerContent %}
    <div class="row ladb-margin-top">
        <div class="col-xs-12">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <strong>Utilisateurs / jour</strong>
                </div>
                <div class="panel-body">
                    <canvas id="ladb_by_day_chart"></canvas>
                </div>
            </div>
        </div>
        <div class="col-md-4 col-xs-12">
            {% include 'LadbCoreBundle:Opencutlist:_country-panel.part.html.twig' with { 'title':'Upgrades', 'data':downloadsByCountry, 'totalCount':downloadsCount , 'color':'FD6586' } %}
        </div>
        <div class="col-md-4 col-xs-12">
            {% include 'LadbCoreBundle:Opencutlist:_country-panel.part.html.twig' with { 'title':'Manifests', 'data':manifestsByCountry, 'totalCount':manifestsCount, 'color':'3DA4E8' } %}
        </div>
        <div class="col-md-4 col-xs-12">
            {% include 'LadbCoreBundle:Opencutlist:_country-panel.part.html.twig' with { 'title':'Tutorials', 'data':tutorialsByCountry, 'totalCount':tutorialsCount, 'color':'71D4A9' } %}
        </div>
    </div>
    {{ parent() }}
{% endblock %}

{% block autopagerContainerInner %}
    <h2 style="padding-bottom: 5px;">{{ accesses.count }} requêtes</h2>
    {% include 'LadbCoreBundle:Opencutlist:_list-n.part.html.twig' %}<commit_msg>~ Stats UI improvements<commit_after>{% extends 'LadbCoreBundle:Common:Layout/_list.html.twig' %}

{% set pageTitle = 'OpenCutList Stats' %}
{% set hideHeaderContainer = false %}

{% block bodyJavascripts %}
    {{ parent() }}
    <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.4/Chart.min.js"></script>
    <script>
        $('.ladb-readmore').readmore({
            moreLink: '<a href="#" class="ladb-readmore-more"><i class="ladb-icon-two-chevron-down"></i></a>',
            lessLink: '<a href="#" class="ladb-readmore-less"><i class="ladb-icon-two-chevron-up"></i></a>',
        });
        var byDayChart = new Chart($('#ladb_by_day_chart'), {
            type: 'line',
            data: {
                datasets: [{
                    label: 'Upgrades',
                    data: [
                        {% for row in downloadsByDay %}
                            {
                                t: new Date('{{ row.day }} 00:00'),
                                y: {{ row.count }}
                            }{% if not loop.last %},{% endif %}
                        {% endfor %}
                    ],
                    backgroundColor: '#FD6586',
                    borderColor: '#FD6586',
                    fill: false,
                    lineTension: 0
                },{
                    label: 'Manifests',
                    data: [
                        {% for row in manifestsByDay %}
                            {
                                t: new Date('{{ row.day }} 00:00'),
                                y: {{ row.count }}
                            }{% if not loop.last %},{% endif %}
                        {% endfor %}
                    ],
                    backgroundColor: '#3DA4E8',
                    borderColor: '#3DA4E8',
                    fill: false,
                    lineTension: 0
                },{
                    label: 'Tutorials',
                    data: [
                        {% for row in tutorialsByDay %}
                            {
                                t: new Date('{{ row.day }} 00:00'),
                                y: {{ row.count }}
                            }{% if not loop.last %},{% endif %}
                        {% endfor %}
                    ],
                    backgroundColor: '#71D4A9',
                    borderColor: '#71D4A9',
                    fill: false,
                    lineTension: 0
                }]
            },
            options: {
                animation: {
                    duration: 0 // general animation time
                },
                aspectRatio: 2,
                scales: {
                    xAxes: [{
                        type: 'time',
                        time: {
                            unit: 'day'
                        }
                    }],
                    yAxes: [{
                        type: 'linear',
                        ticks: {
                            beginAtZero: true,
                            stepSize: 10
                        },
                        position: 'right',
                    }]
                }
            }
        });
    </script>
{% endblock %}

{% block bodyHeaderContainerContent %}
    {% include 'LadbCoreBundle:Opencutlist:_list-topbar.part.html.twig' %}
{% endblock %}

{% block bodyContainerContent %}
    <div class="row ladb-margin-top">
        <div class="col-xs-12">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <strong>Utilisateurs / jour</strong>
                </div>
                <div class="panel-body">
                    <canvas id="ladb_by_day_chart"></canvas>
                </div>
            </div>
        </div>
        <div class="col-md-4 col-xs-12">
            {% include 'LadbCoreBundle:Opencutlist:_country-panel.part.html.twig' with { 'title':'Upgrades', 'data':downloadsByCountry, 'totalCount':downloadsCount , 'color':'FD6586' } %}
        </div>
        <div class="col-md-4 col-xs-12">
            {% include 'LadbCoreBundle:Opencutlist:_country-panel.part.html.twig' with { 'title':'Manifests', 'data':manifestsByCountry, 'totalCount':manifestsCount, 'color':'3DA4E8' } %}
        </div>
        <div class="col-md-4 col-xs-12">
            {% include 'LadbCoreBundle:Opencutlist:_country-panel.part.html.twig' with { 'title':'Tutorials', 'data':tutorialsByCountry, 'totalCount':tutorialsCount, 'color':'71D4A9' } %}
        </div>
    </div>
    {{ parent() }}
{% endblock %}

{% block autopagerContainerInner %}
    <h2>{{ accesses.count }} requêtes</h2>
    {% include 'LadbCoreBundle:Opencutlist:_list-n.part.html.twig' %}
{'fraction_non_alphanumeric': 0.13995126602394323, 'fraction_numerical': 0.014514249390825299, 'mean_word_length': 1.1123293801745358, 'pattern_counts': {'":': 0, '<': 71, '<?xml version=': 0, '>': 71, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 24, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1217657', 'n_tokens_mistral': 2779, 'n_tokens_neox': 2454, 'n_words': 433}