diff --git a/dashboard/src/components/BackupSiteAddDialog.vue b/dashboard/src/components/BackupSiteAddDialog.vue
index 7083d81d2..b07dc6465 100644
--- a/dashboard/src/components/BackupSiteAddDialog.vue
+++ b/dashboard/src/components/BackupSiteAddDialog.vue
@@ -30,7 +30,7 @@ const formError = ref({});
const busy = ref(false);
const enableForUpdates = ref(false);
const provider = ref('');
-const includeExclude = ref('include'); // or exclude
+const includeExclude = ref('everything'); // or exclude, everything
const contentOptions = ref([]);
const contentInclude = ref([]);
const contentExclude = ref([]);
@@ -157,12 +157,12 @@ async function onSubmit() {
// everything
let contents;
- if (includeExclude.value === 'exclude') {
+ if (includeExclude.value === 'everything') {
+ contents = null;
+ } else if (includeExclude.value === 'exclude') {
contents = { exclude: contentExclude.value };
} else if (includeExclude.value === 'include' && contentInclude.value.length) {
contents = { include: contentInclude.value };
- } else {
- contents = null;
}
const [error, result] = await backupSitesModel.add(name.value, format.value, contents, enableForUpdates.value, provider.value, data, schedulePattern, retention, limitsConfig);
@@ -245,7 +245,7 @@ defineExpose({
encryptionPasswordHint.value = '';
encryptedFilenames.value = false;
limits.value = {};
- includeExclude.value = 'include';
+ includeExclude.value = 'everything';
contentInclude.value = [];
contentExclude.value = [];
@@ -301,11 +301,16 @@ defineExpose({
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
diff --git a/dashboard/src/components/BackupSiteEditDialog.vue b/dashboard/src/components/BackupSiteEditDialog.vue
index 8d73d7fea..8a501176a 100644
--- a/dashboard/src/components/BackupSiteEditDialog.vue
+++ b/dashboard/src/components/BackupSiteEditDialog.vue
@@ -28,7 +28,7 @@ const uploadPartSize = ref(0);
const syncConcurrency = ref(0);
const downloadConcurrency = ref(0);
const copyConcurrency = ref(0);
-const includeExclude = ref('include'); // or exclude
+const includeExclude = ref('everything'); // or include, exclude
const contentOptions = ref([]);
const contentInclude = ref([]);
const contentExclude = ref([]);
@@ -51,12 +51,12 @@ async function onSubmit() {
}
let contents;
- if (includeExclude.value === 'exclude') {
+ if (includeExclude.value === 'everything') {
+ contents = null;
+ } else if (includeExclude.value === 'exclude') {
contents = { exclude: contentExclude.value };
} else if (includeExclude.value === 'include' && contentInclude.value.length) {
contents = { include: contentInclude.value };
- } else {
- contents = null;
}
[error] = await backupSitesModel.setContents(site.value.id, contents);
@@ -124,12 +124,15 @@ defineExpose({
});
});
- includeExclude.value = 'include';
- if (t.contents !== null && t.contents.exclude) {
- includeExclude.value = 'exclude';
- contentExclude.value = t.contents.exclude;
- } else if (t.contents !== null && t.contents.include) {
- contentInclude.value = t.contents.include;
+ if (t.contents !== null) {
+ if (t.contents.exclude) {
+ includeExclude.value = 'exclude';
+ contentExclude.value = t.contents.exclude;
+ } else if (t.contents.include) {
+ contentInclude.value = t.contents.include;
+ }
+ } else {
+ includeExclude.value = 'everything';
}
dialog.value.open();
@@ -161,11 +164,16 @@ defineExpose({
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
diff --git a/dashboard/src/models/BackupSitesModel.js b/dashboard/src/models/BackupSitesModel.js
index 94f6914f6..91f8780b9 100644
--- a/dashboard/src/models/BackupSitesModel.js
+++ b/dashboard/src/models/BackupSitesModel.js
@@ -239,11 +239,20 @@ function prettyBackupRetention(retention) {
return tmp ? tmp.name : '';
}
+function prettyBackupContents(contents) {
+ if (!contents) return 'Everything';
+ console.log(contents);
+ if (contents.include) return `Only ${contents.include.length} item(s)`;
+ if (contents.exclude) return `Exclude ${contents.exclude.length} item(s)`;
+ return '';
+}
+
export default {
create,
backupRetentions,
cronDays,
cronHours,
prettyBackupSchedule,
- prettyBackupRetention
+ prettyBackupRetention,
+ prettyBackupContents
};
diff --git a/dashboard/src/views/BackupSitesView.vue b/dashboard/src/views/BackupSitesView.vue
index 2170b5033..b14a8658a 100644
--- a/dashboard/src/views/BackupSitesView.vue
+++ b/dashboard/src/views/BackupSitesView.vue
@@ -246,6 +246,10 @@ onMounted(async () => {
{{ regionName(site.provider, site.config.endpoint) + ' ' + site.config.bucket + (site.config.prefix ? `/${site.config.prefix}` : '') }}
+
+ Backup Contents: {{ BackupSitesModel.prettyBackupContents(site.contents) }}
+
+
{{ $t('backups.schedule.schedule') }}: {{ BackupSitesModel.prettyBackupSchedule(site.schedule) }}
{{ $t('backups.schedule.retentionPolicy') }}: {{ BackupSitesModel.prettyBackupRetention(site.retention) }}