-
- factory()->describeBackends()]]>
-
-
- , parameters:array}>]]>
-
diff --git a/src/api.js b/src/api.js
index 0c53981..f30c03b 100644
--- a/src/api.js
+++ b/src/api.js
@@ -27,6 +27,8 @@ export default {
confirmKit: (accepted, phrase, code) => call('post', '/key/confirm', { accepted, phrase, code }),
backends: () => call('get', '/backends'),
addTarget: (target) => call('post', '/targets', target),
+ targetSettings: (id) => call('get', `/targets/${id}/settings`),
+ updateTarget: (id, target) => call('put', `/targets/${id}`, target),
removeTarget: (id) => call('delete', `/targets/${id}`),
testTarget: (id) => call('post', `/targets/${id}/test`),
setTargetLimit: (id, maxGb) => call('put', `/targets/${id}/limit`, { maxGb }),
diff --git a/src/components/Backups.vue b/src/components/Backups.vue
index 3a09a28..547c9dd 100644
--- a/src/components/Backups.vue
+++ b/src/components/Backups.vue
@@ -49,7 +49,7 @@
{{ targetName(run.targetId) }} |
{{ run.kind }} |
{{ run.snapshot ? new Date(run.snapshot.createdAt * 1000).toLocaleString() + (run.snapshot.label ? ' – ' + run.snapshot.label : '') : '' }} |
- {{ run.status }}{{ run.status === 'running' ? ' (' + run.phase + ')' : '' }}{{ run.error ? ': ' + run.error : '' }} |
+ {{ run.status }}{{ run.status === 'running' ? ' (' + run.phase + percent(run) + ')' : '' }}{{ run.error ? ': ' + run.error : '' }} |
{{ run.stats?.files?.files ?? run.stats?.restored ?? '' }} |
{{ run.stats?.files ? formatSize(run.stats.files.uploaded) : '' }} |
@@ -101,6 +101,8 @@ async function untrash(target, item) {
}
}
+// " 68%", or " ~68%" when the total is estimated from Nextcloud's file cache (first backup)
+const percent = (run) => run.progress ? ' ' + (run.progress.approximate ? '~' : '') + Math.floor(run.progress.fraction * 100) + '%' : ''
const isRunning = (targetId) => props.status.runs.some(r => r.targetId === targetId && r.kind === 'full' && r.status === 'running')
const targetName = (id) => props.status.targets.find(tg => tg.id === id)?.name ?? '#' + id
diff --git a/src/components/Locations.vue b/src/components/Locations.vue
index 2131c7c..c29dd1c 100644
--- a/src/components/Locations.vue
+++ b/src/components/Locations.vue
@@ -14,12 +14,16 @@
{{ tests[target.id].ok ? t('ng_backup', 'OK, {n} snapshots', { n: tests[target.id].snapshots }) : tests[target.id].error }}
{{ t('ng_backup', 'Test') }}
+ {{ t('ng_backup', 'Edit') }}
{{ t('ng_backup', 'Remove') }}
- {{ t('ng_backup', 'Add location') }}
-
{{ error }}
@@ -41,7 +45,7 @@