\x89PNG\r\n\x1a\n\x00\x00\x00\x0DIHDR\x00\x00\x00\x01\x00 \x00\x00\x01\x08\x06\x00\x00\x00\x1F\x15\xC4\x89\x00\x00\x00 \x0AIDATx\x9Ccb\x00\x00\x00\x06\x00\x03\x1A\x05\x9D\x00\x00 \x00\x00IEND\xAE\x42\x60\x82
| Path : /var/www/html/yedekledb24/DatabaseBackupMasterv2/templates/ |
|
B-Con CMD Config cPanel C-Rdp D-Log Info Jump Mass Ransom Symlink vHost Zone-H |
| Current File : /var/www/html/yedekledb24/DatabaseBackupMasterv2/templates/logs.html |
{% extends "base.html" %}
{% block content %}
<div class="container-fluid">
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
<h1 class="h2">Backup Logs</h1>
</div>
<!-- Backup Logs Table -->
<div class="card">
<div class="card-body">
<div class="table-responsive">
<table class="table table-hover align-middle">
<thead>
<tr>
<th>Status</th>
<th>Job Name</th>
<th>Database</th>
<th>Storage</th>
<th>Timestamp</th>
<th>Size</th>
<th>Duration</th>
<th>Details</th>
</tr>
</thead>
<tbody>
{% for log in backup_logs.items %}
<tr>
<td>
{% if log.status == 'success' %}
<span class="badge bg-success">
<i class="fas fa-check"></i> Success
</span>
{% else %}
<span class="badge bg-danger">
<i class="fas fa-times"></i> Failed
</span>
{% endif %}
</td>
<td>{{ log.job.name }}</td>
<td>{{ log.job.database.name }}</td>
<td>{{ log.job.storage.name }}</td>
<td>{{ log.timestamp.strftime('%Y-%m-%d %H:%M:%S') }}</td>
<td>
{% if log.backup_size %}
{% if log.backup_size > 1024*1024*1024 %}
{{ (log.backup_size / (1024*1024*1024)) | round(2) }} GB
{% elif log.backup_size > 1024*1024 %}
{{ (log.backup_size / (1024*1024)) | round(2) }} MB
{% elif log.backup_size > 1024 %}
{{ (log.backup_size / 1024) | round(2) }} KB
{% else %}
{{ log.backup_size }} B
{% endif %}
{% else %}
N/A
{% endif %}
</td>
<td>
{% if log.duration %}
{{ log.duration | round(2) }} sec
{% else %}
N/A
{% endif %}
</td>
<td>
<button type="button" class="btn btn-sm btn-outline-info"
data-bs-toggle="modal" data-bs-target="#detailsModal{{ log.id }}">
<i class="fas fa-info-circle"></i> Details
</button>
<!-- Log Details Modal -->
<div class="modal fade" id="detailsModal{{ log.id }}" tabindex="-1" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Backup Log Details</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<h6>Backup Information</h6>
<table class="table">
<tr>
<th>Job Name:</th>
<td>{{ log.job.name }}</td>
</tr>
<tr>
<th>Status:</th>
<td>
{% if log.status == 'success' %}
<span class="badge bg-success">Success</span>
{% else %}
<span class="badge bg-danger">Failed</span>
{% endif %}
</td>
</tr>
<tr>
<th>Time:</th>
<td>{{ log.timestamp.strftime('%Y-%m-%d %H:%M:%S') }}</td>
</tr>
<tr>
<th>Database:</th>
<td>{{ log.job.database.name }} ({{ log.job.database.db_type }})</td>
</tr>
<tr>
<th>Storage:</th>
<td>{{ log.job.storage.name }} ({{ log.job.storage.storage_type }})</td>
</tr>
{% if log.backup_file %}
<tr>
<th>Backup File:</th>
<td>{{ log.backup_file }}</td>
</tr>
{% endif %}
{% if log.backup_size %}
<tr>
<th>Size:</th>
<td>
{% if log.backup_size > 1024*1024*1024 %}
{{ (log.backup_size / (1024*1024*1024)) | round(2) }} GB
{% elif log.backup_size > 1024*1024 %}
{{ (log.backup_size / (1024*1024)) | round(2) }} MB
{% elif log.backup_size > 1024 %}
{{ (log.backup_size / 1024) | round(2) }} KB
{% else %}
{{ log.backup_size }} B
{% endif %}
</td>
</tr>
{% endif %}
{% if log.duration %}
<tr>
<th>Duration:</th>
<td>{{ log.duration | round(2) }} seconds</td>
</tr>
{% endif %}
</table>
{% if log.message %}
<h6>Message</h6>
<div class="alert {% if log.status == 'success' %}alert-success{% else %}alert-danger{% endif %}">
{{ log.message }}
</div>
{% endif %}
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</td>
</tr>
{% endfor %}
{% if not backup_logs.items %}
<tr>
<td colspan="8" class="text-center">No backup logs found</td>
</tr>
{% endif %}
</tbody>
</table>
</div>
<!-- Pagination -->
{% if backup_logs.pages > 1 %}
<nav aria-label="Backup log pagination">
<ul class="pagination justify-content-center">
{% if backup_logs.has_prev %}
<li class="page-item">
<a class="page-link" href="{{ url_for('logs', page=backup_logs.prev_num) }}" aria-label="Previous">
<span aria-hidden="true">«</span>
</a>
</li>
{% else %}
<li class="page-item disabled">
<a class="page-link" href="#" aria-label="Previous">
<span aria-hidden="true">«</span>
</a>
</li>
{% endif %}
{% for page_num in backup_logs.iter_pages(left_edge=1, right_edge=1, left_current=2, right_current=2) %}
{% if page_num %}
{% if page_num == backup_logs.page %}
<li class="page-item active"><a class="page-link" href="#">{{ page_num }}</a></li>
{% else %}
<li class="page-item"><a class="page-link" href="{{ url_for('logs', page=page_num) }}">{{ page_num }}</a></li>
{% endif %}
{% else %}
<li class="page-item disabled"><a class="page-link" href="#">...</a></li>
{% endif %}
{% endfor %}
{% if backup_logs.has_next %}
<li class="page-item">
<a class="page-link" href="{{ url_for('logs', page=backup_logs.next_num) }}" aria-label="Next">
<span aria-hidden="true">»</span>
</a>
</li>
{% else %}
<li class="page-item disabled">
<a class="page-link" href="#" aria-label="Next">
<span aria-hidden="true">»</span>
</a>
</li>
{% endif %}
</ul>
</nav>
{% endif %}
</div>
</div>
</div>
{% endblock %}