
<h2>Processes</h2>

<table id="processes" class="table">
    <tr>
        <th>Process ID</th>
        <th>UUID</th>
        <th>Status</th>
        <th>Progress</th>
        <th>Action</th>
    </tr>
    {{#each processes}}
    <tr class="{{#if isMissing}}table-danger{{/if}}">
        <td>{{displayName}}</td>
        <td>{{{readableUUID uuidFull}}}</td>
        <td>{{status}}</td>
        <td style="{{progressStyle}}">{{#if progress}}{{progress}}%{{/if}}</td>
        <td>
            <form action="/nodes/{{node}}/process/{{processBase}}/stop" method="post">
                <button
                        type="submit"
                        class="btn btn-danger btn-sm"
                        onclick="return confirm('Confirm stopping process {{displayName}}')"
                        {{#if isMissing}}disabled{{/if}}>Cancel</button>
            </form>
        </td>
    </tr>
    {{/each}}
    {{#unless processes}}
    <tr>
        <td colspan="5">No processes running lately</td>
    </tr>
    {{/unless}}
</table>

<h2>Jobs</h2>
<table id="jobs" class="table">
    <tr>
        <th>Job</th>
        <th>Status</th>
        <th>Progress</th>
    </tr>
    {{#each jobs}}
    <tr class="{{#if isMissing}}table-danger{{/if}}">
        <td>{{taskName}}</td>
        <td>{{status}}</td>
        <td style="{{progressStyle}}">{{#if progress}}{{progress}}%{{/if}} {{stage}}</td>
    </tr>
    {{/each}}
    {{#unless jobs}}
    <tr>
      <td colspan="4">No jobs running lately</td>
    </tr>
    {{/unless}}
</table>
