<commit_before><div style="border:1px solid #dddddd; margin-top:1px; width:95%; padding:10px">
<?php
    if (!$dbEncodingStatus):
?>
        <div style="font-size:12pt;padding-left:3px;width:100%;background-color:red;color:white;font-weight:bold;"><?php echo __('Incorrect database encoding setting: Your database connection is currently NOT set to UTF-8. Please make sure to uncomment the \'encoding\' => \'utf8\' line in ') . APP; ?>Config/database.php</div>
<?php
    endif;
?>
    <h3><?php echo __('MISP version');?></h3>
    <p><?php echo __('Every version of MISP includes a json file with the current version. This is checked against the latest tag on github, if there is a version mismatch the tool will warn you about it. Make sure that you update MISP regularly.');?></p>
    <div style="background-color:#f7f7f9;width:100%;">
        <span><?php echo __('Currently installed version…');?>
            <?php

                switch ($version['upToDate']) {
                    case 'newer':
                        $fontColour = 'orange';
                        $versionText = __('Upcoming development version');
                        break;
                    case 'older':
                        $fontColour = 'red';
                        $versionText = __('Outdated version');
                        break;
                    case 'same':
                        $fontColour = 'green';
                        $versionText = __('OK');
                        break;
                    default:
                        $fontColour = 'red';
                        $versionText = __('Could not retrieve version from github');
                }
            ?>
            <span style="color:<?php echo $fontColour; ?>;">
                <?php
                    echo $version['current'] . ' (' . h($commit) . ')';
                ?>
                <?php if ($commit === ''): ?>
                    <br />
                    <span class="red bold apply_css_arrow">
                        <?php echo __('Unable to fetch current commit id, check apache user read privilege.'); ?>
                    </span>
                <?php endif; ?>
            </span>
        </span><br />
        <span><?php echo __('Latest available version…');?>
            <span style="color:<?php echo $fontColour; ?>;">
                <?php
                    echo $version['newest'] . ' (' . $latestCommit . ')';
                ?>
            </span>
        </span><br />
        <span><?php echo __('Status…');?>
            <span style="color:<?php echo $fontColour; ?>;">
                <?php
                    echo $versionText;
                ?>
            </span>
        </span><br />
        <span><?php echo __('Current branch…');?>
            <?php
                $branchColour = $branch == '2.4' ? 'green' : 'red bold';
            ?>
            <span class="<?php echo h($branchColour); ?>">
                <?=($branch == '2.4') ? h($branch) : __('You are not on a branch, Update MISP will fail'); ?>
            </span>
        </span><br />
        <pre class="hidden green bold" id="gitResult"></pre>
        <button title="<?php echo __('Pull the latest MISP version from github');?>" class="btn btn-inverse" style="padding-top:1px;padding-bottom:1px;" onClick = "updateMISP();"><?php echo __('Update MISP');?></button>
        <a title="<?php echo __('Click the following button to go to the update progress page. This page lists all updates that are currently queued and executed.'); ?>" class="btn btn-inverse" style="padding-top:1px;padding-bottom:1px;" href="<?php echo $baseurl; ?>/servers/updateProgress/"><?php echo __('Update Progress');?></a>
    </div>
    <h3><?php echo __('Submodules version');?>
        <it id="refreshSubmoduleStatus" class="fas fa-sync useCursorPointer" style="font-size: small; margin-left: 5px;" title="<?php echo __('Refresh submodules version.'); ?>"></it>
        <it id="updateAllJson" class="fas fa-file-upload useCursorPointer" style="font-size: small; margin-left: 5px;" title="<?php echo __('Load all JSON into the database.'); ?>"></it>
    </h3>
    <div id="divSubmoduleVersions" style="background-color:#f7f7f9;">
    </div>

    <h3><?php echo __('Writeable Directories and files');?></h3>
    <p><?php echo __('The following directories and files have to be writeable for MISP to function properly. Make sure that the apache user has write privileges for the directories below.');?></p><commit_msg>chg: [diagnostic:view] Improved visibility of the `updateAllJson` update button<commit_after><div style="border:1px solid #dddddd; margin-top:1px; width:95%; padding:10px">
<?php
    if (!$dbEncodingStatus):
?>
        <div style="font-size:12pt;padding-left:3px;width:100%;background-color:red;color:white;font-weight:bold;"><?php echo __('Incorrect database encoding setting: Your database connection is currently NOT set to UTF-8. Please make sure to uncomment the \'encoding\' => \'utf8\' line in ') . APP; ?>Config/database.php</div>
<?php
    endif;
?>
    <h3><?php echo __('MISP version');?></h3>
    <p><?php echo __('Every version of MISP includes a json file with the current version. This is checked against the latest tag on github, if there is a version mismatch the tool will warn you about it. Make sure that you update MISP regularly.');?></p>
    <div style="background-color:#f7f7f9;width:100%;">
        <span><?php echo __('Currently installed version…');?>
            <?php

                switch ($version['upToDate']) {
                    case 'newer':
                        $fontColour = 'orange';
                        $versionText = __('Upcoming development version');
                        break;
                    case 'older':
                        $fontColour = 'red';
                        $versionText = __('Outdated version');
                        break;
                    case 'same':
                        $fontColour = 'green';
                        $versionText = __('OK');
                        break;
                    default:
                        $fontColour = 'red';
                        $versionText = __('Could not retrieve version from github');
                }
            ?>
            <span style="color:<?php echo $fontColour; ?>;">
                <?php
                    echo $version['current'] . ' (' . h($commit) . ')';
                ?>
                <?php if ($commit === ''): ?>
                    <br />
                    <span class="red bold apply_css_arrow">
                        <?php echo __('Unable to fetch current commit id, check apache user read privilege.'); ?>
                    </span>
                <?php endif; ?>
            </span>
        </span><br />
        <span><?php echo __('Latest available version…');?>
            <span style="color:<?php echo $fontColour; ?>;">
                <?php
                    echo $version['newest'] . ' (' . $latestCommit . ')';
                ?>
            </span>
        </span><br />
        <span><?php echo __('Status…');?>
            <span style="color:<?php echo $fontColour; ?>;">
                <?php
                    echo $versionText;
                ?>
            </span>
        </span><br />
        <span><?php echo __('Current branch…');?>
            <?php
                $branchColour = $branch == '2.4' ? 'green' : 'red bold';
            ?>
            <span class="<?php echo h($branchColour); ?>">
                <?=($branch == '2.4') ? h($branch) : __('You are not on a branch, Update MISP will fail'); ?>
            </span>
        </span><br />
        <pre class="hidden green bold" id="gitResult"></pre>
        <button title="<?php echo __('Pull the latest MISP version from github');?>" class="btn btn-inverse" style="padding-top:1px;padding-bottom:1px;" onClick = "updateMISP();"><?php echo __('Update MISP');?></button>
        <a title="<?php echo __('Click the following button to go to the update progress page. This page lists all updates that are currently queued and executed.'); ?>" class="btn btn-inverse" style="padding-top:1px;padding-bottom:1px;" href="<?php echo $baseurl; ?>/servers/updateProgress/"><?php echo __('Update Progress');?></a>
    </div>
    <h3><?php echo __('Submodules version');?>
        <it id="refreshSubmoduleStatus" class="fas fa-sync useCursorPointer" style="font-size: small; margin-left: 5px;" title="<?php echo __('Refresh submodules version.'); ?>"></it>
    </h3>
    <div id="divSubmoduleVersions" style="background-color:#f7f7f9;"></div>
    <span id="updateAllJson" class="btn btn-inverse" title="<?php echo __('Load all JSON into the database.'); ?>">
        <it class="fas fa-file-upload"></it> <?php echo __("Load JSON into database"); ?>
    </span>

    <h3><?php echo __('Writeable Directories and files');?></h3>
    <p><?php echo __('The following directories and files have to be writeable for MISP to function properly. Make sure that the apache user has write privileges for the directories below.');?></p>
{'fraction_non_alphanumeric': 0.15776109516449546, 'fraction_numerical': 0.008500772797527048, 'mean_word_length': 2.05016835016835, 'pattern_counts': {'":': 0, '<': 170, '<?xml version=': 0, '>': 172, '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': '4222304', 'n_tokens_mistral': 2511, 'n_tokens_neox': 2410, 'n_words': 726}