<%- def job_execution(job_info, job_execution, job_execution_output) -%>
    <%- layout_base(title: "Execution #{job_info.name}##{job_execution.id}") do -%>
        <h3 class="section_title">
            Execution
            <b><a href="/job/<%= job_info.name %>"><%= job_info.name %></a>#<%= job_execution.id %></b>
            <span id="job_execution_finished" class="execution_status_finished is-<%= job_execution.finished ? (job_execution.exit_code == 0 ? "finished" : "failed") : "running" %>">
                <%= job_execution.finished ? (job_execution.exit_code == 0 ? "Finished" : "Failed") : "Running" %>
            </span>
        </h3>

        <div class="console_output" id="job_execution_output">
            <pre><%= job_execution_output %></pre>
        </div>

        <%- if !job_execution.finished -%>
            <script type="text/javascript" src="/job_execution.<%= @cache_buster %>.js"></script>
            <script>
                init("<%= job_info.name %>", "<%= job_execution.id %>")
            </script>
        <%- end -%>
    <%- end -%>
<%- end -%>