Skip to content

Commit e75499c

Browse files
committed
chore: minor backup settings improvements
1 parent 163664b commit e75499c

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ services:
5050

5151
# Notification
5252
NTFY: ${NTFY:-}
53+
DISCORD: ${DISCORD:-}
5354

5455
volumes:
5556
- stream_temp:/tmp/stream

src/main/java/com/kcn/hikvisionmanager/service/backup/BackupStatisticsService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public Map<String, Object> getOverallStatistics() {
4545
LocalDateTime weekAgo = LocalDateTime.now().minusDays(7);
4646
List<BackupJobEntity> recentBackups = jobRepository.findByDateRange(weekAgo, LocalDateTime.now());
4747

48-
double successRate = calculateSuccessRate(completedBackups, totalBackups);
48+
double successRate = calculateSuccessRate(completedBackups, completedBackups + failedBackups);
4949

5050
long averageBackupSize = completedBackups > 0 ? totalSize / completedBackups : 0;
5151

src/main/resources/static/js/features/backups.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class BackupManager {
101101
if (!configs || configs.length === 0) {
102102
this.tableBody.innerHTML = `
103103
<tr>
104-
<td colspan="8" class="text-secondary py-3">
104+
<td colspan="9" class="text-secondary py-3">
105105
No backup configurations found.
106106
</td>
107107
</tr>
@@ -115,6 +115,7 @@ class BackupManager {
115115
<td>${this.escapeHtml(cfg.name)}</td>
116116
<td>${this.escapeHtml(cfg.cameraId)}</td>
117117
<td><span class="badge bg-secondary">${cfg.scheduleType}</span></td>
118+
<td><span class="badge bg-secondary">${cfg.timeRangeStrategy || '—'}</span></td>
118119
<td>${cfg.time || '—'}</td>
119120
<td>${cfg.retentionDays} days</td>
120121
<td>${cfg.notifyOnComplete ? '✅' : '❌'}</td>

src/main/resources/templates/backups.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,11 @@ <h4 id="storage-title" class="mb-0 fw-bold">Current Backup Settings</h4>
110110
<th>Name</th>
111111
<th>Camera ID</th>
112112
<th>Schedule</th>
113+
<th>TimeRange</th>
113114
<th>Time</th>
114115
<th>Retention</th>
115116
<th>Notify</th>
116-
<th>Status</th>
117+
<th>Active</th>
117118
<th>Actions</th>
118119
</tr>
119120
</thead>

0 commit comments

Comments
 (0)