<commit_before>
<h1 style="margin-bottom: 0;margin-top: 39px;">Pipeline Execution #{{ execution.id }}</h1>
<h4 style="margin-top: 0;color: #aaa;font-weight: normal;margin-bottom: 30px;">{{ project.name }} » {{ execution.pipeline_config_name }}</h4>
<div class="row">
    <div class="col-md-4">
        <div class="panel panel-default">
            <div class="panel-heading">
                Pipeline Details
            </div>
            <table class="table">
                <tbody>
                <tr>
                    <th>Status</th>
                    <td ng-if="execution.status === 'created'"><i class="fa fa-circle text-info pulse"></i> <span>Created</span></td>
                    <td ng-if="execution.status === 'queued'"><i class="fa fa-circle text-info pulse"></i> <span>Queued</span></td>
                    <td ng-if="execution.status === 'running'"><i class="fa fa-circle text-info pulse"></i> <span>Running</span></td>
                    <td ng-if="execution.status === 'succeeded'"><i class="fa fa-circle text-success"></i> <span class="text-success">Succeeded</span></td>
                    <td ng-if="execution.status === 'failed'"><i class="fa fa-circle text-danger"></i> <span class="text-danger">Failed</span></td>
                </tr>
                <tr>
                    <th>Created by</th>
                    <!--<td><i class="fa fa-github"></i> GitHub Webhook</td>-->
                    <td><i class="octicon octicon-person"></i> {{ execution.owner.first_name}} {{execution.owner.last_name}}</td>
                </tr>
                <tr>
                    <th>Created</th>
                    <td>{{ execution.created_at | amTimeAgo }}<br><small class="text-muted">{{ execution.created_at | amDateFormat: 'dddd, MMM D, YYYY, h:mma' }}</small></td>
                </tr>
                <tr ng-if="execution.finished_at !== null && execution.finished_at !== ''">
                    <th>Finished At</th>
                    <td>{{ execution.finished_at | amTimeAgo }}<br><small class="text-muted">{{ execution.finished_at | amDateFormat: 'dddd, MMM D, YYYY, h:mma' }}</small></td>
                </tr>
                <tr ng-if="execution.finished_at !== null && execution.finished_at !== ''">
                    <th>Total Time</th>
                    <td>{{ execution.finished_at | amDifference : execution.started_at : 'minutes' : true | number : 1 }} minutes</td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>

    <div class="col-md-8">
        <div class="panel panel-default">
            <div class="panel-heading">
                Steps
            </div>
            <table class="table">

                <tbody><tr>
                    <td>Step</td>
                    <td>Status</td>
                    <td>Name</td>
                </tr>

                <tr ng-repeat="stage in execution.stageExecutions">

                    <td class="text-muted">{{ stage.stage_num }}</td>

                    <!-- status:  "created", "running", "awaiting_confirmation", "failed", "succeeded", or "skipped -->
                    <td class="text-info" ng-if="stage.status === 'created'"><i class="fa fa-asterisk"></i> Created</td><!-- legacy -->
                    <td class="text-info" ng-if="stage.status === 'waiting'"><i class="fa fa-hourglass-half"></i> Waiting</td>
                    <td class="text-info" ng-if="stage.status === 'running'"><i class="fa fa-refresh fa-spin"></i> Running</td>
                    <td class="text-success" ng-if="stage.status === 'succeeded'"><i class="fa fa-check"></i> Succeeded</td>
                    <td class="text-warning" ng-if="stage.status === 'awaiting_confirmation'"><i class="fa fa-question-circle"></i> Awaiting Confirmation</td>
                    <td class="text-danger" ng-if="stage.status === 'failed'"><i class="fa fa-times"></i> Failed</td>
                    <td class="text-muted" ng-if="stage.status === 'skipped'"><i class="fa fa-long-arrow-right"></i> Skipped</td>

                    <td>{{ execution.stageConfigsById[stage.stage_config_id].name }}<br><small class="text-muted">GitHub › Clone Repository</small></td>

                </tr>

                <!-- Examples -->
                <!--
                <tr>
                    <td class="text-muted">1</td>
                    <td class="text-success"><i class="fa fa-check"></i> Succeeded</td>
                    <td>Clone Repo<br><small class="text-muted">GitHub › Clone Repository</small></td>
                </tr>
                <tr>
                    <td class="text-muted">2</td>
                    <td class="text-success"><i class="fa fa-check"></i> Succeeded</td>
                    <td>Pause for a few seconds<br><small class="text-muted">Mission Control › Pause Execution</small></td>
                </tr>
                <tr>
                    <td class="text-muted">3</td>
                    <td class="text-success"><i class="fa fa-check"></i> Succeeded</td>
                    <td>Grab template.json<br><small class="text-muted">Mission Control › Copy File(s) to Workspace</small></td>
                </tr>
                <tr>
                    <td class="text-muted">4</td>
                    <td class="text-success"><i class="fa fa-check"></i> Succeeded</td>
                    <td>Build Server AMI<br><small class="text-muted">Packer › Run</small></td>
                </tr>
                <tr>
                    <td class="text-muted">5</td>
                    <td class="text-success"><i class="fa fa-check"></i> Succeeded</td>
                    <td>Pause for another few seconds<br><small class="text-muted">Mission Control › Pause Execution</small></td>
                </tr>
                -->


                </tbody></table>
        </div><!-- end of steps panel -->

        <div class="panel panel-default">
            <div class="panel-heading">
                Pipeline Logs
            </div>
            <table class="table">
                <tbody><tr>
                    <th class="text-center" style="width: 60px;">Step</th>
                    <th class="text-center">Time</th>
                    <th>Title</th>
                    <th>Options</th>
                </tr>

                <tr ng-repeat-start="log in execution.logs">
                    <td class="text-center text-muted" style="vertical-align: middle;">{{ log.stage_num }}</td>
                    <td class="text-center text-muted" style="vertical-align: middle;">{{ log.logged_at | amDateFormat : 'h:mma' }}</td>
                    <td style="vertical-align: middle;" class="">{{ log.title }}</td>
                    <td><a class="btn btn-default btn-sm" ng-click="toggleDetails($event)" ng-if="log.details"><span>Show</span> Details <i class="fa fa-angle-down"></i></a></td>
                </tr>

                <tr ng-repeat-end ng-if="log.details" class="log-details">
                    <td colspan="4" ng-bind-html="log.details | unsafe"></td>
                </tr>

                <!-- TODO: if details/data, show block -->
                <!--<tr style="background: rgb(250, 250, 250);">-->
                    <!--<td colspan="4">-->
                    <!--</td>-->
                <!--</tr>-->

                    <!-- Example below -->
                <!--<commit_msg>Replaces all instances with of step with stage<commit_after>
<h1 style="margin-bottom: 0;margin-top: 39px;">Pipeline Execution #{{ execution.id }}</h1>
<h4 style="margin-top: 0;color: #aaa;font-weight: normal;margin-bottom: 30px;">{{ project.name }} » {{ execution.pipeline_config_name }}</h4>
<div class="row">
    <div class="col-md-4">
        <div class="panel panel-default">
            <div class="panel-heading">
                Pipeline Details
            </div>
            <table class="table">
                <tbody>
                <tr>
                    <th>Status</th>
                    <td ng-if="execution.status === 'created'"><i class="fa fa-circle text-info pulse"></i> <span>Created</span></td>
                    <td ng-if="execution.status === 'queued'"><i class="fa fa-circle text-info pulse"></i> <span>Queued</span></td>
                    <td ng-if="execution.status === 'running'"><i class="fa fa-circle text-info pulse"></i> <span>Running</span></td>
                    <td ng-if="execution.status === 'succeeded'"><i class="fa fa-circle text-success"></i> <span class="text-success">Succeeded</span></td>
                    <td ng-if="execution.status === 'failed'"><i class="fa fa-circle text-danger"></i> <span class="text-danger">Failed</span></td>
                </tr>
                <tr>
                    <th>Created by</th>
                    <!--<td><i class="fa fa-github"></i> GitHub Webhook</td>-->
                    <td><i class="octicon octicon-person"></i> {{ execution.owner.first_name}} {{execution.owner.last_name}}</td>
                </tr>
                <tr>
                    <th>Created</th>
                    <td>{{ execution.created_at | amTimeAgo }}<br><small class="text-muted">{{ execution.created_at | amDateFormat: 'dddd, MMM D, YYYY, h:mma' }}</small></td>
                </tr>
                <tr ng-if="execution.finished_at !== null && execution.finished_at !== ''">
                    <th>Finished At</th>
                    <td>{{ execution.finished_at | amTimeAgo }}<br><small class="text-muted">{{ execution.finished_at | amDateFormat: 'dddd, MMM D, YYYY, h:mma' }}</small></td>
                </tr>
                <tr ng-if="execution.finished_at !== null && execution.finished_at !== ''">
                    <th>Total Time</th>
                    <td>{{ execution.finished_at | amDifference : execution.started_at : 'minutes' : true | number : 1 }} minutes</td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>

    <div class="col-md-8">
        <div class="panel panel-default">
            <div class="panel-heading">
                Stages
            </div>
            <table class="table">

                <tbody><tr>
                    <td>Stage</td>
                    <td>Status</td>
                    <td>Name</td>
                </tr>

                <tr ng-repeat="stage in execution.stageExecutions">

                    <td class="text-muted">{{ stage.stage_num }}</td>

                    <!-- status:  "created", "running", "awaiting_confirmation", "failed", "succeeded", or "skipped -->
                    <td class="text-info" ng-if="stage.status === 'created'"><i class="fa fa-asterisk"></i> Created</td><!-- legacy -->
                    <td class="text-info" ng-if="stage.status === 'waiting'"><i class="fa fa-hourglass-half"></i> Waiting</td>
                    <td class="text-info" ng-if="stage.status === 'running'"><i class="fa fa-refresh fa-spin"></i> Running</td>
                    <td class="text-success" ng-if="stage.status === 'succeeded'"><i class="fa fa-check"></i> Succeeded</td>
                    <td class="text-warning" ng-if="stage.status === 'awaiting_confirmation'"><i class="fa fa-question-circle"></i> Awaiting Confirmation</td>
                    <td class="text-danger" ng-if="stage.status === 'failed'"><i class="fa fa-times"></i> Failed</td>
                    <td class="text-muted" ng-if="stage.status === 'skipped'"><i class="fa fa-long-arrow-right"></i> Skipped</td>

                    <td>{{ execution.stageConfigsById[stage.stage_config_id].name }}<br><small class="text-muted">GitHub › Clone Repository</small></td>

                </tr>

                <!-- Examples -->
                <!--
                <tr>
                    <td class="text-muted">1</td>
                    <td class="text-success"><i class="fa fa-check"></i> Succeeded</td>
                    <td>Clone Repo<br><small class="text-muted">GitHub › Clone Repository</small></td>
                </tr>
                <tr>
                    <td class="text-muted">2</td>
                    <td class="text-success"><i class="fa fa-check"></i> Succeeded</td>
                    <td>Pause for a few seconds<br><small class="text-muted">Mission Control › Pause Execution</small></td>
                </tr>
                <tr>
                    <td class="text-muted">3</td>
                    <td class="text-success"><i class="fa fa-check"></i> Succeeded</td>
                    <td>Grab template.json<br><small class="text-muted">Mission Control › Copy File(s) to Workspace</small></td>
                </tr>
                <tr>
                    <td class="text-muted">4</td>
                    <td class="text-success"><i class="fa fa-check"></i> Succeeded</td>
                    <td>Build Server AMI<br><small class="text-muted">Packer › Run</small></td>
                </tr>
                <tr>
                    <td class="text-muted">5</td>
                    <td class="text-success"><i class="fa fa-check"></i> Succeeded</td>
                    <td>Pause for another few seconds<br><small class="text-muted">Mission Control › Pause Execution</small></td>
                </tr>
                -->


                </tbody></table>
        </div><!-- end of stages panel -->

        <div class="panel panel-default">
            <div class="panel-heading">
                Pipeline Logs
            </div>
            <table class="table">
                <tbody><tr>
                    <th class="text-center" style="width: 60px;">Stage</th>
                    <th class="text-center">Time</th>
                    <th>Title</th>
                    <th>Options</th>
                </tr>

                <tr ng-repeat-start="log in execution.logs">
                    <td class="text-center text-muted" style="vertical-align: middle;">{{ log.stage_num }}</td>
                    <td class="text-center text-muted" style="vertical-align: middle;">{{ log.logged_at | amDateFormat : 'h:mma' }}</td>
                    <td style="vertical-align: middle;" class="">{{ log.title }}</td>
                    <td><a class="btn btn-default btn-sm" ng-click="toggleDetails($event)" ng-if="log.details"><span>Show</span> Details <i class="fa fa-angle-down"></i></a></td>
                </tr>

                <tr ng-repeat-end ng-if="log.details" class="log-details">
                    <td colspan="4" ng-bind-html="log.details | unsafe"></td>
                </tr>

                <!-- TODO: if details/data, show block -->
                <!--<tr style="background: rgb(250, 250, 250);">-->
                    <!--<td colspan="4">-->
                    <!--</td>-->
                <!--</tr>-->

                    <!-- Example below -->
                <!--
{'fraction_non_alphanumeric': 0.1853334237840038, 'fraction_numerical': 0.004205956176650159, 'mean_word_length': 1.6696848967765303, 'pattern_counts': {'":': 0, '<': 515, '<?xml version=': 0, '>': 513, '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': '823394', 'n_tokens_mistral': 4514, 'n_tokens_neox': 4166, 'n_words': 833}