<commit_before><?php
$keyUsageCsv = null;
if (isset($keyUsage)) {
    $todayString = date('Y-m-d');
    $today = strtotime($todayString);
    $startDate = key($keyUsage); // oldest date for sparkline
    $startDate = strtotime($startDate) - (3600 * 24 * 3);
    $keyUsageCsv = 'Date,Close\n';
    for ($date = $startDate; $date <= $today; $date += (3600 * 24)) {
        $dateAsString = date('Y-m-d', $date);
        $keyUsageCsv .= $dateAsString . ',' . (isset($keyUsage[$dateAsString]) ? $keyUsage[$dateAsString] : 0) . '\n';
    }
}

echo $this->element(
    'genericElements/SingleViews/single_view',
    [
        'title' => 'Auth key view',
        'data' => $data,
        'fields' => [
            [
                'key' => __('ID'),
                'path' => 'AuthKey.id'
            ],
            [
                'key' => __('UUID'),
                'path' => 'AuthKey.uuid',
            ],
            [
                'key' => __('Auth Key'),
                'path' => 'AuthKey',
                'type' => 'authkey'
            ],
            [
                'key' => __('User'),
                'path' => 'User.id',<commit_msg>fix: [UI] Undefined variables in authkeys view<commit_after><?php
$keyUsageCsv = null;
if (isset($keyUsage)) {
    $todayString = date('Y-m-d');
    $today = strtotime($todayString);
    $startDate = key($keyUsage); // oldest date for sparkline
    $startDate = strtotime($startDate) - (3600 * 24 * 3);
    $keyUsageCsv = 'Date,Close\n';
    for ($date = $startDate; $date <= $today; $date += (3600 * 24)) {
        $dateAsString = date('Y-m-d', $date);
        $keyUsageCsv .= $dateAsString . ',' . (isset($keyUsage[$dateAsString]) ? $keyUsage[$dateAsString] : 0) . '\n';
    }
} else {
    $lastUsed = null;
    $uniqueIps = null;
}

echo $this->element(
    'genericElements/SingleViews/single_view',
    [
        'title' => 'Auth key view',
        'data' => $data,
        'fields' => [
            [
                'key' => __('ID'),
                'path' => 'AuthKey.id'
            ],
            [
                'key' => __('UUID'),
                'path' => 'AuthKey.uuid',
            ],
            [
                'key' => __('Auth Key'),
                'path' => 'AuthKey',
                'type' => 'authkey'
            ],
            [
                'key' => __('User'),
                'path' => 'User.id',
{'fraction_non_alphanumeric': 0.19277614447711044, 'fraction_numerical': 0.011759764804703907, 'mean_word_length': 1.6466666666666667, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 29, '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': '2329264', 'n_tokens_mistral': 811, 'n_tokens_neox': 768, 'n_words': 146}