primary flag for backup targets is set outside of the edit dialog
This commit is contained in:
@@ -27,7 +27,6 @@ const providerConfig = ref({
|
||||
mountOptions: {},
|
||||
prefix: '',
|
||||
});
|
||||
const isPrimary = ref(false);
|
||||
const limits = ref({});
|
||||
const format = ref('');
|
||||
|
||||
@@ -153,15 +152,6 @@ async function onSubmitAdd() {
|
||||
return console.error(error);
|
||||
}
|
||||
|
||||
if (isPrimary.value) {
|
||||
const [error] = await backupTargetsModel.setPrimary(targetId);
|
||||
if (error) {
|
||||
formError.value.generic = 'Failed to set primary backup target';
|
||||
busy.value = false;
|
||||
return console.error(error);
|
||||
}
|
||||
}
|
||||
|
||||
emit('success');
|
||||
dialog.value.close();
|
||||
}
|
||||
@@ -194,16 +184,6 @@ async function onSubmitEdit() {
|
||||
return console.error(error);
|
||||
}
|
||||
|
||||
// primary
|
||||
if (isPrimary.value) {
|
||||
const [error] = await backupTargetsModel.setPrimary(target.value.id);
|
||||
if (error) {
|
||||
formError.value.generic = 'Failed to set primary backup target';
|
||||
busy.value = false;
|
||||
return console.error(error);
|
||||
}
|
||||
}
|
||||
|
||||
emit('success');
|
||||
dialog.value.close();
|
||||
}
|
||||
@@ -237,7 +217,6 @@ defineExpose({
|
||||
name.value = t?.name || '';
|
||||
provider.value = t?.provider || '';
|
||||
format.value = t?.format || '';
|
||||
isPrimary.value = t?.primary || false;
|
||||
providerConfig.value = t?.config || {};
|
||||
encrypted.value = t?.encrypted || false;
|
||||
encryptedFilenames.value = t?.encryptedFilenames || false;
|
||||
@@ -288,9 +267,6 @@ defineExpose({
|
||||
|
||||
<BackupProviderForm v-model:provider="provider" v-model:format="format" v-model:provider-config="providerConfig" :form-error="formError"/>
|
||||
|
||||
<!-- TODO translate -->
|
||||
<Checkbox v-model="isPrimary" label="primary backup target" />
|
||||
|
||||
<FormGroup>
|
||||
<label for="memoryLimitInput">{{ $t('backups.configureBackupStorage.memoryLimit') }}: <b>{{ prettyBinarySize(limits.memoryLimit, '1024 MB') }}</b></label>
|
||||
<div class="small">{{ $t('backups.configureBackupStorage.memoryLimitDescription') }}</div>
|
||||
|
||||
Reference in New Issue
Block a user