Compare commits
2 Commits
c987aefb72
...
06970b528c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
06970b528c | ||
|
|
2af21c94fa |
@ -232,11 +232,42 @@ class ConfigOptions {
|
|||||||
return generated;
|
return generated;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Backup-related dropdowns (TYPE / ENGINE / PATH_MODE / SSH_AUTH /
|
// Per-location backup dropdowns (CFG_BACKUP_LOC_<n>_*). Their options are
|
||||||
// STRATEGY) now come from the bash generator's [value:Label|...] parser
|
// static and identical for every location, but the config generator only
|
||||||
// and land in window.configData.config[key].options — see the
|
// scans flat per-category files — it never descends into the nested
|
||||||
// "Generator-emitted options" check above. The corresponding hardcoded
|
// configs/backup/locations/<n>/ dir — so configData carries no options for
|
||||||
// blocks that used to live here are gone on purpose.
|
// 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] || [];
|
const result = optionMaps[key] || [];
|
||||||
//console.log('Final result for', key, ':', result);
|
//console.log('Final result for', key, ':', result);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user