mirror of
https://github.com/vale981/dirkules
synced 2025-03-05 09:21:38 -05:00
prepared directory structure for cleaning blueprint
This commit is contained in:
parent
cf0646e3d7
commit
b4bd35f5fa
3 changed files with 106 additions and 0 deletions
0
dirkules/cleaning/__init__.py
Normal file
0
dirkules/cleaning/__init__.py
Normal file
25
dirkules/cleaning/templates/cleaning/add_cleaning.html
Normal file
25
dirkules/cleaning/templates/cleaning/add_cleaning.html
Normal file
|
@ -0,0 +1,25 @@
|
|||
{% extends "base.html" %}
|
||||
{% block title %}Add Cleaning{% endblock %}
|
||||
{% block head %}
|
||||
{{ super() }}
|
||||
{% endblock %}
|
||||
{% block body %}
|
||||
<div class="ui container">
|
||||
{% from "_formhelpers.html" import render_field %}
|
||||
<form method=post class="ui form error">
|
||||
{{ form.hidden_tag() }}
|
||||
{{ render_field(form.jobname) }}
|
||||
{{ render_field(form.path) }}
|
||||
{{ render_field(form.active) }}
|
||||
{{ render_field(form.submit) }}
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
$(document).ready(
|
||||
function () {
|
||||
$('.ui.checkbox')
|
||||
.checkbox()
|
||||
;
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
81
dirkules/cleaning/templates/cleaning/cleaning.html
Normal file
81
dirkules/cleaning/templates/cleaning/cleaning.html
Normal file
|
@ -0,0 +1,81 @@
|
|||
{% extends "base.html" %}
|
||||
{% block title %}Cleaning{% endblock %}
|
||||
{% block head %}
|
||||
{{ super() }}
|
||||
{% endblock %}
|
||||
{% block body %}
|
||||
<div class="infobox">
|
||||
<div class="ui info message">
|
||||
<i class="close icon"></i>
|
||||
<div class="header">
|
||||
Hinweis
|
||||
</div>
|
||||
<p>
|
||||
Alle cleaning Jobs löschen sämtliche Dateien im angegebenen Pfad, welche länger als 180 Tage nicht
|
||||
modifiziert wurden. Status "running" bedeutet, dass dieser Job regelmäßig ausgeführt wird.
|
||||
"stopped" bedeutet, dass dieser Job niemals ausgeführt wird. Jobs können hinzugefügt und entfernt
|
||||
werden. "Status ändern" setzt einen "running job" auf "stopped" bzw. umgekehrt.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui container">
|
||||
<a href="{{ url_for('add_cleaning') }}">
|
||||
<div class="ui primary labeled icon button">
|
||||
<i class="plus icon"></i> Job hinzufügen
|
||||
</div>
|
||||
</a>
|
||||
{% if task_running %}
|
||||
<a href="{{ url_for('cleaning', service="pause") }}">
|
||||
<div class="ui negative labeled icon button">
|
||||
<i class="pause icon"></i> Service pausieren
|
||||
</div>
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="{{ url_for('cleaning', service="start") }}">
|
||||
<div class="ui positive labeled icon button">
|
||||
<i class="play icon"></i> Service starten
|
||||
</div>
|
||||
</a>
|
||||
{% endif %}
|
||||
<table class="ui celled fixed table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Status</th>
|
||||
<th>Job Name</th>
|
||||
<th>Pfad</th>
|
||||
<th>Letzte Ausführung</th>
|
||||
<th>Aktionen</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{% for element in elements %}
|
||||
<tr>
|
||||
{% if element.state %}
|
||||
<td><i class="play icon"></i> running</td>
|
||||
{% else %}
|
||||
<td><i class="stop icon"></i> stopped</td>
|
||||
{% endif %}
|
||||
<td>{{ element.name }}</td>
|
||||
<td>{{ element.path }}</td>
|
||||
<td>{{ element.time }}</td>
|
||||
<td>
|
||||
<div class="buttonspace">
|
||||
<a href="{{ url_for('cleaning', remove=(element.id)) }}">
|
||||
<div class="ui negative basic button">
|
||||
<i class="trash icon"></i> Job entfernen
|
||||
</div>
|
||||
</a></div>
|
||||
<a href="{{ url_for('cleaning', changestate=(element.id)) }}">
|
||||
<div class="ui primary basic button">
|
||||
<i class="sync icon"></i> Status ändern
|
||||
</div>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endblock %}
|
Loading…
Add table
Reference in a new issue