webcron/templates/job/index.html.twig

96 lines
5.8 KiB
Twig
Raw Normal View History

2017-04-14 15:58:09 +02:00
{% extends "base.html.twig" %}
2022-09-07 17:21:39 +02:00
{% block title %}{{ 'job.index.title' | trans }}{% endblock %}
2017-04-14 15:58:09 +02:00
{% block content %}
2022-09-07 17:21:39 +02:00
<h2>{{ 'job.index.header' | trans }}</h2>
2021-04-12 12:23:50 +02:00
2021-05-21 13:09:48 +02:00
<table class="table table-md-striped">
<thead>
<tr class="d-none d-md-table-row">
<th>&nbsp;</th>
2022-09-07 17:21:39 +02:00
<th>{{ 'job.index.table.headers.name' | trans }}</th>
<th>{{ 'job.index.table.headers.host' | trans }}</th>
<th>{{ 'job.index.table.headers.interval' | trans }}</th>
<th>{{ 'job.index.table.headers.nextrun' | trans }}</th>
2021-05-21 13:09:48 +02:00
<th></th>
</tr>
</thead>
<tbody>
{% for job in jobs %}
<tr{% if job.data.running == true %} class="running text-success"{% elseif job.data.norun == true %} class="norun text-danger"{% endif %}>
<td class="d-none d-md-table-cell align-middle status-col text-center">{% if job.data.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.data.needschecking %}<i class="icon icon-warning text-warning"></i>{% endif %}</span>
{{ job.name | parsetags | raw }}</td>
2022-08-18 14:02:31 +02:00
<td class="d-block d-md-table-cell align-middle">{% if job.data.hostlabel is defined and job.data.hostlabel is not empty %}{{ job.data.hostlabel }}{% else %}{{ attribute(job.data, 'host-displayname') }}{% endif %}</td>
2021-07-20 16:29:11 +02:00
<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>
2021-07-20 18:54:07 +02:00
<td class="text-md-end d-block d-md-table-cell align-middle">
2023-01-10 17:21:49 +01:00
<a href="javascript:void(0);" data-nextrun="{{ job.nextrun | date("Y/m/d H:i:s") }}" data-href="{{ path('job_run', {'id': job.id}) }}" class="run btn btn-outline-{% if job.data.running == true %}success{% elseif job.data.norun == true %}danger{% else %}primary{% endif %}{% if job.data.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.data.running == true %}success{% elseif job.data.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.data.running == true %}success{% elseif job.data.norun == true %}danger{% else %}primary{% endif %}"><i class="icon icon-edit" aria-hidden="true"></i></a>
<a href="javascript:void(0);" 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.data.running == true %}success{% elseif job.data.norun == true %}danger{% else %}primary{% endif %}"><i class="icon icon-delete" aria-hidden="true"></i></a>
2021-05-21 13:09:48 +02:00
</td>
</tr>
{% endfor %}
</tbody>
</table>
2023-01-10 17:21:49 +01:00
<div class="modal fade" id="run_selecttime" 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">{{ "job.index.run.selecttime.header" | trans }}</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">
<p>{{ "job.index.run.selecttime.description" | trans }}</p>
<div class="d-flex flex-column align-items-center selecttimepickers">
<div id="selecttime_datepicker">
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-outline-primary schedule" data-bs-dismiss="modal">{{ "job.index.run.selecttime.btnschedule.label" | trans }}</button>
<button type="button" class="btn btn-outline-success run-now" data-bs-dismiss="modal">{{ "job.index.run.selecttime.btnrunnow.label" | trans }}</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="run_result" data-backdrop="static" data-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true">
2021-06-01 20:21:47 +02:00
<div class="modal-dialog modal-dialog-scrollable">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="staticBackdropLabel"></h5>
2021-07-20 18:54:07 +02:00
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close">
<span aria-hidden="true"></span>
2021-06-01 20:21:47 +02:00
</button>
</div>
<div class="modal-body">
2021-05-21 13:09:48 +02:00
2021-06-01 20:21:47 +02:00
</div>
<div class="modal-footer">
2023-01-10 17:21:49 +01:00
<button type="button" class="btn btn-outline-primary" data-bs-dismiss="modal">{{ "job.index.run.ran.btnclose.label" | trans }}</button>
2021-06-01 20:21:47 +02:00
</div>
</div>
</div>
2017-04-16 10:41:06 +02:00
</div>
2021-07-30 14:35:47 +02:00
{% endblock %}
{% block extrahtml %}
2023-01-10 17:21:49 +01:00
<div class="run-overlay d-none">
<div class="run-content">
2021-05-21 13:09:48 +02:00
</div>
2023-01-10 17:21:49 +01:00
<div class="run-blur"></div>
2021-07-30 14:35:47 +02:00
</div>
2019-05-24 22:21:21 +02:00
{% endblock %}
2021-04-13 14:07:11 +02:00
2021-05-26 13:09:13 +02:00
{% block styles %}
2022-08-23 11:53:31 +02:00
{{ encore_entry_link_tags('job.index') }}
2021-04-13 14:07:11 +02:00
{% endblock %}
2021-05-26 13:09:13 +02:00
{% block scripts %}
2022-08-23 11:53:31 +02:00
{{ encore_entry_script_tags('job.index') }}
2021-05-24 14:08:30 +02:00
{% endblock %}