| 130 | } |
| 131 | |
| 132 | function applyCleanupDefaults(data) { |
| 133 | if (logsState.cleanupDefaultsHydrated) { |
| 134 | return; |
| 135 | } |
| 136 | |
| 137 | const retentionDays = Number(data.retention_days || 0); |
| 138 | const maxRows = Number(data.max_rows || 0); |
| 139 | |
| 140 | if (retentionDays > 0) { |
| 141 | el.cleanupRetentionDays.value = String(retentionDays); |
| 142 | } |
| 143 | if (maxRows > 0) { |
| 144 | el.cleanupMaxRows.value = String(maxRows); |
| 145 | } |
| 146 | |
| 147 | if (retentionDays > 0 || maxRows > 0) { |
| 148 | logsState.cleanupDefaultsHydrated = true; |
| 149 | } |
| 150 | } |
| 151 | |
| 152 | async function loadStats(silent = false) { |
| 153 | try { |