63 lines
3.4 KiB
Twig
63 lines
3.4 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>Name</th>
|
|
<th>Host</th>
|
|
<th>Delay</th>
|
|
<th>Next run</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for job in jobs %}
|
|
<tr{% if job.norun == true %} class="norun"{% elseif job.running == true %} class="running"{% endif %}>
|
|
<td class="d-block d-md-table-cell">{{ job.name }}</td>
|
|
<td class="d-block d-md-table-cell">{{ attribute(job, 'host-displayname') }}</td>
|
|
<td class="d-block d-md-table-cell">{{ job.interval | interval }}</td>
|
|
<td class="d-block d-md-table-cell">{{ job.nextrun | date("d/m/Y H:i:s") }}</td>
|
|
<td class="text-md-right d-block d-md-table-cell">
|
|
<a href="#" data-href="{{ path('job_runnow', {'id': job.id}) }}" class="runnow btn btn-outline-{% if job.norun == true %}danger{% elseif job.running == true %}success{% else %}primary{% endif %}{% if job.running == true %} disabled{% endif %}"><i class="fa fa-play" aria-hidden="true"></i></a>
|
|
<a href="{{ path('job_view', {'id': job.id}) }}" class="btn btn-outline-{% if job.norun == true %}danger{% elseif job.running == true %}success{% else %}primary{% endif %}"><i class="fa fa-search" aria-hidden="true"></i></a>
|
|
<a href="{{ path('job_edit', {'id': job.id}) }}" class="btn btn-outline-{% if job.norun == true %}danger{% elseif job.running == true %}success{% else %}primary{% endif %}"><i class="fa fa-pencil-square-o" 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.norun == true %}danger{% elseif job.running == true %}success{% else %}primary{% endif %}"><i class="fa fa-trash-o" 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="close" data-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-dismiss="modal">Close</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id='ajax_loader' style="position: fixed; left: 50%; top: 50%; display: none;">
|
|
<img src="/public/images/ajax-loader.gif" alt="loading">
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block styles %}
|
|
{{ encore_entry_link_tags('job.index') }}
|
|
{% endblock %}
|
|
|
|
{% block scripts %}
|
|
{{ encore_entry_script_tags('job.index') }}
|
|
{% endblock %}
|