Retention Editor added in UI

Time set in Schedular added
This commit is contained in:
Philipp
2026-05-21 09:05:43 +02:00
parent c272b00c81
commit 4af9f32c46
6 changed files with 86 additions and 9 deletions
+11
View File
@@ -24,6 +24,11 @@ export const config = {
RESTIC_REPOSITORY: process.env.RESTIC_REPOSITORY || '',
RESTIC_PASSWORD: process.env.RESTIC_PASSWORD || '',
},
retention: {
keepDaily: Number(process.env.RESTIC_KEEP_DAILY || 7),
keepWeekly: Number(process.env.RESTIC_KEEP_WEEKLY || 0),
keepMonthly: Number(process.env.RESTIC_KEEP_MONTHLY || 0),
},
};
export const editableEnv = [
@@ -32,6 +37,9 @@ export const editableEnv = [
{ key: 'RESTIC_REPOSITORY', label: 'Restic repository', required: true, secret: false },
{ key: 'RESTIC_PASSWORD', label: 'Restic password', required: true, secret: true },
{ key: 'ZFS_POOL_NAME', label: 'ZFS pool name', required: true, secret: false },
{ key: 'RESTIC_KEEP_DAILY', label: 'Keep daily snapshots', required: false, secret: false },
{ key: 'RESTIC_KEEP_WEEKLY', label: 'Keep weekly snapshots', required: false, secret: false },
{ key: 'RESTIC_KEEP_MONTHLY', label: 'Keep monthly snapshots', required: false, secret: false },
{ key: 'PORT', label: 'API port', required: false, secret: false },
{ key: 'API_TOKEN', label: 'API token', required: false, secret: true },
];
@@ -103,4 +111,7 @@ function applyRuntimeEnv(values) {
config.resticEnv.AWS_SECRET_ACCESS_KEY = process.env.AWS_SECRET_ACCESS_KEY || '';
config.resticEnv.RESTIC_REPOSITORY = process.env.RESTIC_REPOSITORY || '';
config.resticEnv.RESTIC_PASSWORD = process.env.RESTIC_PASSWORD || '';
config.retention.keepDaily = Number(process.env.RESTIC_KEEP_DAILY || 7);
config.retention.keepWeekly = Number(process.env.RESTIC_KEEP_WEEKLY || 0);
config.retention.keepMonthly = Number(process.env.RESTIC_KEEP_MONTHLY || 0);
}