feat: add restore points integration via /api/v1/restorePoints

This commit is contained in:
2026-06-10 11:51:52 +07:00
parent d15be6c0d3
commit 5619d20ad1
3 changed files with 48 additions and 1 deletions

View File

@@ -489,10 +489,12 @@ function renderJobsTable(inst) {
for (const j of jobs) {
const isDisabled = j.schedule_enabled === false || (j.state || '').toLowerCase() === 'disabled';
const pts = j.restore_points_to_keep != null ? j.restore_points_to_keep : (j.restorePointsToKeep != null ? j.restorePointsToKeep : '—');
const actual = j.actual_restore_points != null ? j.actual_restore_points : null;
const ptsDisplay = actual != null ? (pts !== '—' ? pts + ' / ' + actual : actual) : pts;
rows += '<tr class="' + (isDisabled ? 'job-disabled' : '') + '">';
rows += '<td>' + esc(j.name || j.Name || '—') + '</td>';
rows += '<td>' + esc(j.type || j.jobType || '—') + '</td>';
rows += '<td>' + pts + '</td>';
rows += '<td>' + ptsDisplay + '</td>';
rows += '<td>' + formatDate(j.last_backup) + '</td>';
rows += '<td>' + (isDisabled ? '<span class="badge danger">выключена</span>' : '<span class="badge success">включена</span>') + '</td>';
rows += '</tr>';