54 lines
2.1 KiB
HTML
54 lines
2.1 KiB
HTML
{% extends "base.html" %}
|
|
{% from "macros.html" import guide_box %}
|
|
{% block title %}اعمال تنظیمات{% endblock %}
|
|
{% block content %}
|
|
<h2>اعمال پروفایل</h2>
|
|
{{ guide_box(guide, 'profiles') }}
|
|
|
|
{% if pending and not pending.confirmed %}
|
|
<div class="alert alert-warning">
|
|
یک apply در انتظار تأیید است.
|
|
<a href="{{ url_for('apply.status', log_id=pending.id) }}">ادامه</a>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div class="row g-3 mb-4">
|
|
{% for p in profiles %}
|
|
<div class="col-md-6">
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<h5>{{ p.name }}</h5>
|
|
<p class="small text-muted">{{ p.description }}</p>
|
|
<form method="post" action="{{ url_for('apply.apply', profile_id=p.id) }}">
|
|
<div class="mb-2">
|
|
<label class="form-label small">پنجره rollback (دقیقه)</label>
|
|
<input type="number" name="rollback_minutes" class="form-control form-control-sm" value="15" min="5" max="60">
|
|
</div>
|
|
<button type="submit" class="btn btn-success" onclick="return confirm('Backup گرفته میشود. Docker ممکن است restart شود. ادامه؟')">
|
|
اعمال پروفایل
|
|
</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
|
|
<h4>تاریخچه apply</h4>
|
|
<div class="table-responsive">
|
|
<table class="table table-sm">
|
|
<thead><tr><th>پروفایل</th><th>وضعیت</th><th>شروع</th><th></th></tr></thead>
|
|
<tbody>
|
|
{% for log in recent_logs %}
|
|
<tr>
|
|
<td>{{ log.profile.name if log.profile else '-' }}</td>
|
|
<td><span class="badge bg-secondary">{{ log.status }}</span></td>
|
|
<td>{{ log.started_at.strftime('%Y-%m-%d %H:%M') }}</td>
|
|
<td><a href="{{ url_for('apply.status', log_id=log.id) }}">جزئیات</a></td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{% endblock %}
|