Merge claude/1
This commit is contained in:
commit
8e0d470549
@ -2,7 +2,7 @@
|
|||||||
# Edit via the Locations page on /backup, or directly here.
|
# Edit via the Locations page on /backup, or directly here.
|
||||||
CFG_BACKUP_LOC_1_NAME="Local disk" # Location Name - Friendly label shown in the UI
|
CFG_BACKUP_LOC_1_NAME="Local disk" # Location Name - Friendly label shown in the UI
|
||||||
CFG_BACKUP_LOC_1_ENABLED=true # Enabled - Snapshot to this location
|
CFG_BACKUP_LOC_1_ENABLED=true # Enabled - Snapshot to this location
|
||||||
CFG_BACKUP_LOC_1_ENGINE=restic # Engine - Backup engine used at this location [restic:Restic|borg:BorgBackup|kopia:Kopia]
|
CFG_BACKUP_LOC_1_ENGINE=restic # Engine - Backup engine used at this location [restic:Restic|borg:BorgBackup|kopia:Kopia] **ADVANCED**
|
||||||
CFG_BACKUP_LOC_1_PASSWORD=RANDOMIZEDPASSWORD1 # Repository Password - Used to encrypt/decrypt snapshots — back up offline!
|
CFG_BACKUP_LOC_1_PASSWORD=RANDOMIZEDPASSWORD1 # Repository Password - Used to encrypt/decrypt snapshots — back up offline!
|
||||||
CFG_BACKUP_LOC_1_TYPE=local # Type - Backend [local:Local / mounted path|sftp:SFTP|rest:REST|s3:S3|b2:Backblaze B2|gs:Google Cloud Storage|azure:Azure|rclone:rclone]
|
CFG_BACKUP_LOC_1_TYPE=local # Type - Backend [local:Local / mounted path|sftp:SFTP|rest:REST|s3:S3|b2:Backblaze B2|gs:Google Cloud Storage|azure:Azure|rclone:rclone]
|
||||||
CFG_BACKUP_LOC_1_PATH_MODE=auto # Path Mode - Where this location stores its data [auto:Automatic (/docker/backups/<id>)|custom:Custom path]
|
CFG_BACKUP_LOC_1_PATH_MODE=auto # Path Mode - Where this location stores its data [auto:Automatic (/docker/backups/<id>)|custom:Custom path]
|
||||||
|
|||||||
@ -64,8 +64,9 @@ const BACKUP_LOC_FIELDS_BY_TYPE = {
|
|||||||
|
|
||||||
// Suffixes that live in the editor's "Advanced" tab. configs.json can flag
|
// Suffixes that live in the editor's "Advanced" tab. configs.json can flag
|
||||||
// more via a **ADVANCED** comment marker; this set keeps the known overrides
|
// more via a **ADVANCED** comment marker; this set keeps the known overrides
|
||||||
// advanced even on legacy location.configs that predate the marker.
|
// advanced even on legacy location.configs that predate the marker. Engine is
|
||||||
const LOC_ADVANCED_SUFFIXES = new Set(['URI', 'SSH_PORT', 'APPEND_ONLY']);
|
// here too — the system picks a sensible default, so most users never touch it.
|
||||||
|
const LOC_ADVANCED_SUFFIXES = new Set(['ENGINE', 'URI', 'SSH_PORT', 'APPEND_ONLY']);
|
||||||
|
|
||||||
function backupRetentionDetectPreset(values, includeInherit = false) {
|
function backupRetentionDetectPreset(values, includeInherit = false) {
|
||||||
const norm = (v) => (v == null ? '' : String(v).trim());
|
const norm = (v) => (v == null ? '' : String(v).trim());
|
||||||
@ -769,9 +770,6 @@ class BackupPage {
|
|||||||
if (conn) {
|
if (conn) {
|
||||||
conn.innerHTML = this.renderLocFields(idx, groups.connection, { ...loc, type });
|
conn.innerHTML = this.renderLocFields(idx, groups.connection, { ...loc, type });
|
||||||
this.tagFieldsForSave(conn);
|
this.tagFieldsForSave(conn);
|
||||||
this.filterEngineSelect(conn, type, loc.engine);
|
|
||||||
this.applySshAuthVisibility(conn);
|
|
||||||
this.applyPathModeVisibility(conn);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// The Advanced tab's fields are type-dependent too (URI override only
|
// The Advanced tab's fields are type-dependent too (URI override only
|
||||||
@ -783,6 +781,16 @@ class BackupPage {
|
|||||||
: `<div class="backup-empty-state">No advanced options for this location type.</div>`;
|
: `<div class="backup-empty-state">No advanced options for this location type.</div>`;
|
||||||
this.tagFieldsForSave(adv);
|
this.tagFieldsForSave(adv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Re-apply dynamic behaviors across the whole details scope: the engine
|
||||||
|
// select lives in the Advanced tab while SSH-auth / path-mode live in
|
||||||
|
// Connection, so target the shared parent rather than one panel.
|
||||||
|
const scope = (conn || adv)?.closest('.task-details');
|
||||||
|
if (scope) {
|
||||||
|
this.filterEngineSelect(scope, type, loc.engine);
|
||||||
|
this.applySshAuthVisibility(scope);
|
||||||
|
this.applyPathModeVisibility(scope);
|
||||||
|
}
|
||||||
this.enhanceEngineDetailsButton();
|
this.enhanceEngineDetailsButton();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -32,7 +32,7 @@ locationAdd()
|
|||||||
echo "# Edit via the Locations page on /backup, or directly here."
|
echo "# Edit via the Locations page on /backup, or directly here."
|
||||||
echo "CFG_BACKUP_LOC_${idx}_NAME=\"${name}\" # Location Name - Friendly label shown in the UI"
|
echo "CFG_BACKUP_LOC_${idx}_NAME=\"${name}\" # Location Name - Friendly label shown in the UI"
|
||||||
echo "CFG_BACKUP_LOC_${idx}_ENABLED=false # Enabled - Snapshot to this location"
|
echo "CFG_BACKUP_LOC_${idx}_ENABLED=false # Enabled - Snapshot to this location"
|
||||||
echo "CFG_BACKUP_LOC_${idx}_ENGINE=${default_engine} # Engine - Backup engine used at this location [restic:Restic|borg:BorgBackup|kopia:Kopia]"
|
echo "CFG_BACKUP_LOC_${idx}_ENGINE=${default_engine} # Engine - Backup engine used at this location [restic:Restic|borg:BorgBackup|kopia:Kopia] **ADVANCED**"
|
||||||
echo "CFG_BACKUP_LOC_${idx}_PASSWORD=RANDOMIZEDPASSWORD1 # Repository Password - Used to encrypt/decrypt snapshots — back up offline!"
|
echo "CFG_BACKUP_LOC_${idx}_PASSWORD=RANDOMIZEDPASSWORD1 # Repository Password - Used to encrypt/decrypt snapshots — back up offline!"
|
||||||
echo "CFG_BACKUP_LOC_${idx}_TYPE=${type} # Type - Backend [local:Local / mounted path|sftp:SFTP|rest:REST|s3:S3|b2:Backblaze B2|gs:Google Cloud Storage|azure:Azure|rclone:rclone]"
|
echo "CFG_BACKUP_LOC_${idx}_TYPE=${type} # Type - Backend [local:Local / mounted path|sftp:SFTP|rest:REST|s3:S3|b2:Backblaze B2|gs:Google Cloud Storage|azure:Azure|rclone:rclone]"
|
||||||
echo "CFG_BACKUP_LOC_${idx}_PATH_MODE=${default_path_mode} # Path Mode - Where this location stores its data [auto:Automatic (/docker/backups/<id>)|custom:Custom path]"
|
echo "CFG_BACKUP_LOC_${idx}_PATH_MODE=${default_path_mode} # Path Mode - Where this location stores its data [auto:Automatic (/docker/backups/<id>)|custom:Custom path]"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user