Merge claude/2
This commit is contained in:
commit
06970b528c
@ -232,11 +232,42 @@ class ConfigOptions {
|
||||
return generated;
|
||||
}
|
||||
|
||||
// Backup-related dropdowns (TYPE / ENGINE / PATH_MODE / SSH_AUTH /
|
||||
// STRATEGY) now come from the bash generator's [value:Label|...] parser
|
||||
// and land in window.configData.config[key].options — see the
|
||||
// "Generator-emitted options" check above. The corresponding hardcoded
|
||||
// blocks that used to live here are gone on purpose.
|
||||
// Per-location backup dropdowns (CFG_BACKUP_LOC_<n>_*). Their options are
|
||||
// static and identical for every location, but the config generator only
|
||||
// scans flat per-category files — it never descends into the nested
|
||||
// configs/backup/locations/<n>/ dir — so configData carries no options for
|
||||
// these keys. Resolve them here by suffix so every location index works,
|
||||
// including ones added after install. (The global CFG_BACKUP_ENGINE/
|
||||
// STRATEGY still come from the generator via the check above.)
|
||||
const locDropdown = key.match(/^CFG_BACKUP_LOC_[0-9]+_(TYPE|PATH_MODE|ENGINE|SSH_AUTH)$/);
|
||||
if (locDropdown) {
|
||||
const BACKUP_LOC_OPTIONS = {
|
||||
TYPE: [
|
||||
{ value: 'local', label: 'Local / mounted path' },
|
||||
{ value: 'sftp', label: 'SFTP' },
|
||||
{ value: 'rest', label: 'REST' },
|
||||
{ value: 's3', label: 'S3' },
|
||||
{ value: 'b2', label: 'Backblaze B2' },
|
||||
{ value: 'gs', label: 'Google Cloud Storage' },
|
||||
{ value: 'azure', label: 'Azure' },
|
||||
{ value: 'rclone', label: 'rclone' }
|
||||
],
|
||||
PATH_MODE: [
|
||||
{ value: 'auto', label: 'Automatic (/docker/backups/<id>)' },
|
||||
{ value: 'custom', label: 'Custom path' }
|
||||
],
|
||||
ENGINE: [
|
||||
{ value: 'restic', label: 'restic' },
|
||||
{ value: 'borg', label: 'BorgBackup' },
|
||||
{ value: 'kopia', label: 'Kopia' }
|
||||
],
|
||||
SSH_AUTH: [
|
||||
{ value: 'key', label: 'SSH key (~/.ssh/id_rsa)' },
|
||||
{ value: 'password', label: 'Password (via sshpass)' }
|
||||
]
|
||||
};
|
||||
return BACKUP_LOC_OPTIONS[locDropdown[1]];
|
||||
}
|
||||
|
||||
const result = optionMaps[key] || [];
|
||||
//console.log('Final result for', key, ':', result);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user