<commit_before><?php
ini_set('display_errors', 1);
error_reporting(E_ALL);
require_once('class.TicketAdminPage.php');
require_once('class.FlipsideTicketDB.php');
$page = new TicketAdminPage('Burning Flipside - Tickets');

$page->add_js(JS_DATATABLE);
$page->add_js(JS_CHART);
$page->add_css(CSS_DATATABLE);
$page->add_js_from_src('js/chart_requests.js');

    $db = new FlipsideTicketDB();
    $request_count = $db->getRequestCount();
    $tickets = $db->getRequestedTickets();
    $requested_ticket_count = 0;
    for($i = 0; $i < count($tickets); $i++)
    {
        $requested_ticket_count += $tickets[$i]['count'];
    }

    $page->body .= '
        <div class="row">
            <div class="col-lg-12">
                <h1 class="page-header">Request Graphs</h1>
            </div>
        </div>
        <div class="row">
            <div class="panel-group" id="accordion">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h4 class="panel-title"><a data-toggle="collapse" data-parent="#accordion" href="#requestTypes">Request Types</a></h4>
                    </div>
                    <div id="requestTypes" class="panel-collapse collapse in">
                        <div class="panel-body">
                            <canvas id="request_type_chart"></canvas>
                        </div>
                    </div>
                </div>
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h4 class="panel-title"><a data-toggle="collapse" data-parent="#accordion" href="#crits">Crit Vols/Protected</a></h4>
                    </div>
                    <div id="crits" class="panel-collapse collapse">
                        <div class="panel-body">
                            <canvas id="crits_chart"></canvas>
                        </div>
                    </div>
                </div>
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h4 class="panel-title"><a data-toggle="collapse" data-parent="#accordion" href="#ticket_counts">Tickets per Request</a></h4><commit_msg>Remove TicketDB dependency from chart_requests.php backend<commit_after><?php
ini_set('display_errors', 1);
error_reporting(E_ALL);
require_once('class.TicketAdminPage.php');
$page = new TicketAdminPage('Burning Flipside - Tickets');

$page->add_js(JS_DATATABLE);
$page->add_js(JS_CHART);
$page->add_css(CSS_DATATABLE);
$page->add_js_from_src('js/chart_requests.js');

$page->body .= '
        <div class="row">
            <div class="col-lg-12">
                <h1 class="page-header">Request Graphs</h1>
            </div>
        </div>
        <div class="row">
            <div class="panel-group" id="accordion">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h4 class="panel-title"><a data-toggle="collapse" data-parent="#accordion" href="#requestTypes">Request Types</a></h4>
                    </div>
                    <div id="requestTypes" class="panel-collapse collapse in">
                        <div class="panel-body">
                            <canvas id="request_type_chart"></canvas>
                        </div>
                    </div>
                </div>
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h4 class="panel-title"><a data-toggle="collapse" data-parent="#accordion" href="#crits">Crit Vols/Protected</a></h4>
                    </div>
                    <div id="crits" class="panel-collapse collapse">
                        <div class="panel-body">
                            <canvas id="crits_chart"></canvas>
                        </div>
                    </div>
                </div>
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h4 class="panel-title"><a data-toggle="collapse" data-parent="#accordion" href="#ticket_counts">Tickets per Request</a></h4>
{'fraction_non_alphanumeric': 0.15477048786349434, 'fraction_numerical': 0.005767844268204758, 'mean_word_length': 1.789544235924933, 'pattern_counts': {'":': 0, '<': 90, '<?xml version=': 0, '>': 99, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '324687', 'n_tokens_mistral': 1214, 'n_tokens_neox': 1143, 'n_words': 197}