<commit_before><?php use PHPCensor\Helper\Lang; ?>

<div class="row">
    <div class="col-sm-4">
        <div class="box">
            <div class="box-header">
                <h3 class="box-title">
                    <?php Lang::out('build_details'); ?>
                </h3>
            </div>

            <div class="box-body no-padding">
                <table class="table">
                    <tr>
                        <th><?php Lang::out('project'); ?></th>
                        <td style="text-align: right">
                            <a href="<?php print APP_URL . 'project/view/' . $build->getProjectId(); ?>">
                                <i class="fa fa-<?php print $build->getProject()->getIcon(); ?>"></i>
                                <?php print $build->getProject()->getTitle(); ?>
                            </a>
                        </td>
                    </tr>

                    <tr>
                        <th><?php Lang::out('branch'); ?></th>
                        <td style="text-align: right">
                            <a target="_blank" href="<?php print $build->getBranchLink(); ?>">
                                <span class="label label-default"><?php print $build->getBranch(); ?></span>
                            </a>
                        </td>
                    </tr>

                    <tr>
                        <th><?php Lang::out('environment'); ?></th>
                        <td style="text-align: right">
                            <?php
                                $environment = $build->getEnvironment();
                                echo !empty($environment) ? ('<span class="label label-default">' . $environment . '</span>') : '—' ;
                            ?>
                        </td>
                    </tr>

                    <tr>
                        <th><?php Lang::out('merged_branches'); ?></th>
                        <td style="text-align: right">
                            <span class="label label-default"><?php print $build->getBranch() ?></span>
                            + <?php
                            $branches = $build->getExtra('branches');
                            if (!empty($branches)) {
                                foreach($branches as $branch) {
                                    ?><span class="label label-default"><?php print $branch ?></span><?php
                                }
                            } else {
                                ?>&mdash;<?php
                            }
                            ?>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </div>

    <div class="col-sm-4">
        <div class="box">
            <div class="box-header">
                <h3 class="box-title">
                    <?php Lang::out('commit_details'); ?>
                </h3>
            </div>

            <div class="box-body no-padding">
                <table class="table">
                    <tr>
                        <th><?php Lang::out('commit'); ?></th>
                        <td style="text-align: right">
                            <a target="_blank" href="<?php print $build->getCommitLink(); ?>">
                                <?php print substr($build->getCommitId(), 0, 7); ?>
                            </a>
                        </td>
                    </tr>

                    <tr>
                        <th><?php Lang::out('committer'); ?></th>
                        <td style="text-align: right">
                            <?php print $build->getCommitterEmail(); ?>
                        </td>
                    </tr>

                    <tr>
                        <th><?php Lang::out('commit_message'); ?></th>
                        <td style="text-align: right">
                            <?php print $build->getCommitMessage(); ?>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </div>

    <div class="col-sm-4">
        <div class="box">
            <div class="box-header">
                <h3 class="box-title">
                    <?php Lang::out('timing'); ?>
                </h3>
            </div>

            <div class="box-body no-padding">
                <table class="table">
                    <tr>
                        <th><?php Lang::out('created'); ?></th>
                        <td style="text-align: right" class="build-created datetime">
                            <?php print $build->getCreated() ? $build->getCreated()->format('Y-m-d H:i:s') : ''; ?>
                        </td>
                    </tr>

                    <tr>
                        <th><?php Lang::out('started'); ?></th>
                        <td style="text-align: right" class="build-started datetime">
                            <?php print $build->getStarted() ? $build->getStarted()->format('Y-m-d H:i:s') : ''; ?>
                        </td>
                    </tr>

                    <tr>
                        <th><?php Lang::out('finished'); ?></th>
                        <td style="text-align: right" class="build-finished datetime">
                            <?php print $build->getFinished() ? $build->getFinished()->format('Y-m-d H:i:s') : ''; ?>
                        </td>
                    </tr>

                    <tr>
                        <th><?php Lang::out('duration'); ?></th>
                        <td style="text-align: right" class="build-duration duration">
                            <?php print $build->getDuration(); ?> <?= Lang::get('seconds'); ?>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </div>

</div>

<div class="nav-tabs-custom">
    <ul class="nav nav-tabs">
        <li class="active">
            <a href="#log" data-toggle="tab"><i class="fa fa-cogs"></i> <?php print Lang::get('build_log'); ?></a>
        </li>
        <li class="">
            <a href="#errors" data-toggle="tab">
                <i class="fa fa-exclamation-triangle"></i>  <?php print Lang::get('errors'); ?>
                <?php if ($data['errors'] == 0): ?>
                    <span class="errors-label label label-danger" style="display: none">0</span>
                <?php else: ?>
                    <span class="errors-label label label-danger"><?php print $data['errors']; ?></span>
                <?php endif; ?>
            </a>
        </li>
        <li class="">
            <a href="#information" data-toggle="tab"><i class="fa fa-info-circle"></i>  <?php print Lang::get('information'); ?></a>
        </li>
    </ul>

    <div class="tab-content">
        <div class="tab-pane active" id="log">
            <pre style="overflow-y: visible;"><?php print $data['log']; ?></pre>
        </div>

        <div class="tab-pane" id="errors">
            <table class="errors-table table table-hover">
                <thead>
                    <tr>
                        <th><?php Lang::out('severity'); ?></th>
                        <th><?php Lang::out('plugin'); ?></th>
                        <th><?php Lang::out('file'); ?></th>
                        <th data-orderable="false"><?php Lang::out('line'); ?></th>
                        <th data-orderable="false"><?php Lang::out('message'); ?></th>
                    </tr>
                </thead>
                <tbody>
                    <?php print $data['error_html']; ?>
                </tbody>
            </table>
        </div>

        <div class="tab-pane" id="information"><commit_msg>Added text wrap for build log<commit_after><?php use PHPCensor\Helper\Lang; ?>

<div class="row">
    <div class="col-sm-4">
        <div class="box">
            <div class="box-header">
                <h3 class="box-title">
                    <?php Lang::out('build_details'); ?>
                </h3>
            </div>

            <div class="box-body no-padding">
                <table class="table">
                    <tr>
                        <th><?php Lang::out('project'); ?></th>
                        <td style="text-align: right">
                            <a href="<?php print APP_URL . 'project/view/' . $build->getProjectId(); ?>">
                                <i class="fa fa-<?php print $build->getProject()->getIcon(); ?>"></i>
                                <?php print $build->getProject()->getTitle(); ?>
                            </a>
                        </td>
                    </tr>

                    <tr>
                        <th><?php Lang::out('branch'); ?></th>
                        <td style="text-align: right">
                            <a target="_blank" href="<?php print $build->getBranchLink(); ?>">
                                <span class="label label-default"><?php print $build->getBranch(); ?></span>
                            </a>
                        </td>
                    </tr>

                    <tr>
                        <th><?php Lang::out('environment'); ?></th>
                        <td style="text-align: right">
                            <?php
                                $environment = $build->getEnvironment();
                                echo !empty($environment) ? ('<span class="label label-default">' . $environment . '</span>') : '—' ;
                            ?>
                        </td>
                    </tr>

                    <tr>
                        <th><?php Lang::out('merged_branches'); ?></th>
                        <td style="text-align: right">
                            <span class="label label-default"><?php print $build->getBranch() ?></span>
                            + <?php
                            $branches = $build->getExtra('branches');
                            if (!empty($branches)) {
                                foreach($branches as $branch) {
                                    ?><span class="label label-default"><?php print $branch ?></span><?php
                                }
                            } else {
                                ?>&mdash;<?php
                            }
                            ?>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </div>

    <div class="col-sm-4">
        <div class="box">
            <div class="box-header">
                <h3 class="box-title">
                    <?php Lang::out('commit_details'); ?>
                </h3>
            </div>

            <div class="box-body no-padding">
                <table class="table">
                    <tr>
                        <th><?php Lang::out('commit'); ?></th>
                        <td style="text-align: right">
                            <a target="_blank" href="<?php print $build->getCommitLink(); ?>">
                                <?php print substr($build->getCommitId(), 0, 7); ?>
                            </a>
                        </td>
                    </tr>

                    <tr>
                        <th><?php Lang::out('committer'); ?></th>
                        <td style="text-align: right">
                            <?php print $build->getCommitterEmail(); ?>
                        </td>
                    </tr>

                    <tr>
                        <th><?php Lang::out('commit_message'); ?></th>
                        <td style="text-align: right">
                            <?php print $build->getCommitMessage(); ?>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </div>

    <div class="col-sm-4">
        <div class="box">
            <div class="box-header">
                <h3 class="box-title">
                    <?php Lang::out('timing'); ?>
                </h3>
            </div>

            <div class="box-body no-padding">
                <table class="table">
                    <tr>
                        <th><?php Lang::out('created'); ?></th>
                        <td style="text-align: right" class="build-created datetime">
                            <?php print $build->getCreated() ? $build->getCreated()->format('Y-m-d H:i:s') : ''; ?>
                        </td>
                    </tr>

                    <tr>
                        <th><?php Lang::out('started'); ?></th>
                        <td style="text-align: right" class="build-started datetime">
                            <?php print $build->getStarted() ? $build->getStarted()->format('Y-m-d H:i:s') : ''; ?>
                        </td>
                    </tr>

                    <tr>
                        <th><?php Lang::out('finished'); ?></th>
                        <td style="text-align: right" class="build-finished datetime">
                            <?php print $build->getFinished() ? $build->getFinished()->format('Y-m-d H:i:s') : ''; ?>
                        </td>
                    </tr>

                    <tr>
                        <th><?php Lang::out('duration'); ?></th>
                        <td style="text-align: right" class="build-duration duration">
                            <?php print $build->getDuration(); ?> <?= Lang::get('seconds'); ?>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </div>

</div>

<div class="nav-tabs-custom">
    <ul class="nav nav-tabs">
        <li class="active">
            <a href="#log" data-toggle="tab"><i class="fa fa-cogs"></i> <?php print Lang::get('build_log'); ?></a>
        </li>
        <li class="">
            <a href="#errors" data-toggle="tab">
                <i class="fa fa-exclamation-triangle"></i>  <?php print Lang::get('errors'); ?>
                <?php if ($data['errors'] == 0): ?>
                    <span class="errors-label label label-danger" style="display: none">0</span>
                <?php else: ?>
                    <span class="errors-label label label-danger"><?php print $data['errors']; ?></span>
                <?php endif; ?>
            </a>
        </li>
        <li class="">
            <a href="#information" data-toggle="tab"><i class="fa fa-info-circle"></i>  <?php print Lang::get('information'); ?></a>
        </li>
    </ul>

    <div class="tab-content">
        <div class="tab-pane active" id="log">
            <pre style="overflow-y: visible; white-space: pre-wrap"><?php print $data['log']; ?></pre>
        </div>

        <div class="tab-pane" id="errors">
            <table class="errors-table table table-hover">
                <thead>
                    <tr>
                        <th><?php Lang::out('severity'); ?></th>
                        <th><?php Lang::out('plugin'); ?></th>
                        <th><?php Lang::out('file'); ?></th>
                        <th data-orderable="false"><?php Lang::out('line'); ?></th>
                        <th data-orderable="false"><?php Lang::out('message'); ?></th>
                    </tr>
                </thead>
                <tbody>
                    <?php print $data['error_html']; ?>
                </tbody>
            </table>
        </div>

        <div class="tab-pane" id="information">
{'fraction_non_alphanumeric': 0.1731919875130073, 'fraction_numerical': 0.0016909469302809573, 'mean_word_length': 1.028092851490372, 'pattern_counts': {'":': 0, '<': 443, '<?xml version=': 0, '>': 491, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2346617', 'n_tokens_mistral': 3980, 'n_tokens_neox': 3824, 'n_words': 782}