kritbit

kritbit Git Source Tree


Root/web/application/views/main.html

{% extends "base.html" %}

{% block content %}

<div class="page-header">
    <h1>Job list</h1>
</div>

<table align="center" style="width: 60%;" class="table table-hover">
    <thead>
        <tr>
            <th>Edit</th>
            <th>Name</th>
            <th>Run Type</th>
            <th>Cron</th>
            <th>Last Run</th>
            <th>Last Result</th>
            <th>History</th>
            <th>Delete</th>
            <th>Force Run</th>
        </tr>
    </thead>
    <tbody>
    {% for job in jobs %}
        <tr class="{{job.getTRClass}}">
            <td><a class="btn btn-default" href="./job/edit/{{job.id}}" role="button">Edit</a></td>
            <td>{{job.jobName}}</td>
            <td>{{job.getRunType}}</td>
            <td>{{job.cron}}</td>
            <td>{{job.getLastRun}}</td>
            <td>{{job.last_result}}</td>
            <td><a class="btn btn-default" href="./history/view/{{job.jobName}}-{{job.id}}" role="button">History</a></td>
            <td><a class="btn btn-danger btn-delete" href="./job/delete/{{job.id}}" role="button">Delete</a></td>
            {% if job.getRunType != "External Source" %}
                {% if job.force_run == 1 %}
                <td><a class="btn btn-warning" href="./job/force/{{job.id}}" role="button">Enabled</a></td>
                {% else %}
                <td><a class="btn btn-success" href="./job/force/{{job.id}}" role="button">Disabled</a></td>
                {% endif %}
            {% else %}
                <td> </td>
            {% endif %}
        </tr>
    {% endfor %}
    </tbody>
</table>

<script type="text/javascript">
    $(function () {
        $('.btn-delete').each(function () {
           $(this).confirm({
               title: 'Confirm',
               content: "Are you sure you want to delete this job?"
           });
        });
    });
</script>

{% endblock %}

Archive Download this file

Branches

Number of commits:
Page rendered in 0.06781s using 11 queries.