webcron/templates/job/index.html.twig

72 lines
3.9 KiB
Twig

{% extends "base.html.twig" %}
{% block title %}Overview{% endblock %}
{% block content %}
<h2>Overview of your cronjobs</h2>
<table class="table table-md-striped">
<thead>
<tr class="d-none d-md-table-row">
<th>&nbsp;</th>
<th>Name</th>
<th>Host</th>
<th>Delay</th>
<th>Next run</th>
<th></th>
</tr>
</thead>
<tbody>
{% for job in jobs %}
<tr{% if job.running == true %} class="running text-success"{% elseif job.norun == true %} class="norun text-danger"{% endif %}>
<td class="d-none d-md-table-cell align-middle status-col text-center">{% if job.needschecking %}<i class="icon icon-warning text-warning big-icon"></i>{% endif %}</td>
<td class="d-block d-md-table-cell align-middle job-name">
<span class="d-inline d-md-none">{% if job.needschecking %}<i class="icon icon-warning text-warning"></i>{% endif %}</span>
{{ job.name | parsetags | raw }}</td>
<td class="d-block d-md-table-cell align-middle">{{ attribute(job, 'host-displayname') }}</td>
<td class="d-block d-md-table-cell align-middle">{{ job.interval | interval }}</td>
<td class="d-block d-md-table-cell align-middle">{{ job.nextrun | date("d/m/Y H:i:s") }}</td>
<td class="text-md-end d-block d-md-table-cell align-middle">
<a href="#" data-href="{{ path('job_runnow', {'id': job.id}) }}" class="runnow btn btn-outline-{% if job.running == true %}success{% elseif job.norun == true %}danger{% else %}primary{% endif %}{% if job.running == true %} disabled{% endif %}"><i class="icon icon-run" aria-hidden="true"></i></a>
<a href="{{ path('job_view', {'id': job.id}) }}" class="btn btn-outline-{% if job.running == true %}success{% elseif job.norun == true %}danger{% else %}primary{% endif %}"><i class="icon icon-view" aria-hidden="true"></i></a>
<a href="{{ path('job_edit', {'id': job.id}) }}" class="btn btn-outline-{% if job.running == true %}success{% elseif job.norun == true %}danger{% else %}primary{% endif %}"><i class="icon icon-edit" aria-hidden="true"></i></a>
<a href="#" data-confirmation="Are you sure you want to delete this job?" data-href="{{ path('job_delete', {'id': job.id}) }}" class="delete-btn btn btn-outline-{% if job.running == true %}success{% elseif job.norun == true %}danger{% else %}primary{% endif %}"><i class="icon icon-delete" aria-hidden="true"></i></a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<div class="modal fade" id="runnow_result" data-backdrop="static" data-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-scrollable">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="staticBackdropLabel"></h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close">
<span aria-hidden="true"></span>
</button>
</div>
<div class="modal-body">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-outline-primary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
{% endblock %}
{% block extrahtml %}
<div class="runnow-overlay d-none">
<div class="runnow-content">
</div>
<div class="runnow-blur"></div>
</div>
{% endblock %}
{% block styles %}
{{ vite_entry_link_tags('job.index') }}
{% endblock %}
{% block scripts %}
{{ vite_entry_script_tags('job.index') }}
{% endblock %}