{% extends 'base.html.twig' %}

{% block pagewrapper %}
    <h1 class="page-title">JOB EXEC</h1>
    <br><br>
    <div class="card">
        <div class="card-header">
            <i class="fa fa-pencil-alt fa-fw"></i> Logs
        </div>

        <div class="card-body">
        </div>
    </div>
{% endblock %}

{% block localjavascript %}
    function refreshContent() {
        console.log("refresh");
        
        $.ajax({
            method: "POST",
            url: "{{ path('app_cron_config_cronexecread') }}",
            success: function(data, dataType)
            {
                $(".card-body").html(data.replace(/\"/g,"").replace(/\\n/g,"<br>"));
            }
        });         
    };

    var timer=setInterval(refreshContent, 1000);        

{% endblock %}