Default to 1 year retension
This commit is contained in:
+4
-4
@@ -152,7 +152,7 @@ export function createDataManager(deps) {
|
||||
WARM_MEM_PRESETS,
|
||||
matchPointsPreset(config.tier1Points, WARM_MEM_PRESETS)
|
||||
)
|
||||
fillSelect(els.warmPreset, RETENTION_PRESETS, config.warmRetentionPreset || '1w')
|
||||
fillSelect(els.warmPreset, RETENTION_PRESETS, config.warmRetentionPreset || '1y')
|
||||
fillSelect(els.diskPreset, DISK_BUDGET_PRESETS, matchBytesPreset(config.warmMaxBytes || 0))
|
||||
|
||||
if (els.hotPoints) els.hotPoints.value = String(config.tier0Points)
|
||||
@@ -161,7 +161,7 @@ export function createDataManager(deps) {
|
||||
if (els.warmEnabled) els.warmEnabled.checked = config.warmRetentionEnabled !== false
|
||||
if (els.warmCustomDays) {
|
||||
els.warmCustomDays.value = String(
|
||||
Math.max(1, Math.round((config.warmRetentionMs || 0) / (24 * 60 * 60 * 1000)) || 7)
|
||||
Math.max(1, Math.round((config.warmRetentionMs || 0) / (24 * 60 * 60 * 1000)) || 365)
|
||||
)
|
||||
}
|
||||
if (els.diskCustomMb) {
|
||||
@@ -203,7 +203,7 @@ export function createDataManager(deps) {
|
||||
function readForm() {
|
||||
const hotId = els.hotPreset?.value || '1h'
|
||||
const warmMemId = els.warmMemPreset?.value || '24h'
|
||||
const warmId = els.warmPreset?.value || '1w'
|
||||
const warmId = els.warmPreset?.value || '1y'
|
||||
const diskId = els.diskPreset?.value || 'unlimited'
|
||||
|
||||
let tier0Points =
|
||||
@@ -223,7 +223,7 @@ export function createDataManager(deps) {
|
||||
const days = Math.max(1, Number(els.warmCustomDays?.value) || 7)
|
||||
warmRetentionMs = days * 24 * 60 * 60 * 1000
|
||||
} else {
|
||||
warmRetentionMs = RETENTION_PRESETS[warmId]?.ms ?? 7 * 24 * 60 * 60 * 1000
|
||||
warmRetentionMs = RETENTION_PRESETS[warmId]?.ms ?? RETENTION_PRESETS['1y'].ms
|
||||
}
|
||||
|
||||
let warmMaxBytes = 0
|
||||
|
||||
Reference in New Issue
Block a user