diff --git a/dashboard/src/components/app/Backups.vue b/dashboard/src/components/app/Backups.vue
new file mode 100644
index 000000000..cac7413c6
--- /dev/null
+++ b/dashboard/src/components/app/Backups.vue
@@ -0,0 +1,128 @@
+
+
+
+
+
+
{{ $t('app.backups.backups.description') }}
+
+
+
+
+
+
+
+
+ {{ prettyLongDate(backup.creationTime) }} ({{ backup.label }})
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{ errorMessage }}
+
+
+
+
+
+
{{ $t('app.backups.import.description') }}
+
+
+
+
+
+
+
+
{{ $t('app.backups.auto.enabled') }}
+
{{ $t('app.backups.auto.disabled') }}
+
+
+
+
diff --git a/dashboard/src/models/AppsModel.js b/dashboard/src/models/AppsModel.js
index 2f58560cd..3e248bc67 100644
--- a/dashboard/src/models/AppsModel.js
+++ b/dashboard/src/models/AppsModel.js
@@ -301,6 +301,29 @@ function create() {
return [e];
}
+ if (result.status !== 202) return [result];
+ return [null];
+ },
+ async backups(id) {
+ // we fetch probably enough to avoid pagination
+ let result;
+ try {
+ result = await fetcher.get(`${origin}/api/v1/apps/${id}/backups`, { page: 1, per_page: 100, access_token: accessToken });
+ } catch (e) {
+ return [e];
+ }
+
+ if (result.status !== 200) return [result];
+ return [null, result.body.backups];
+ },
+ async backup(id) {
+ let result;
+ try {
+ result = await fetcher.post(`${origin}/api/v1/apps/${id}/backup`, {}, { access_token: accessToken });
+ } catch (e) {
+ return [e];
+ }
+
if (result.status !== 202) return [result];
return [null];
},
diff --git a/dashboard/src/views/AppConfigureView.vue b/dashboard/src/views/AppConfigureView.vue
index ecc8194d1..88ea4ff6c 100644
--- a/dashboard/src/views/AppConfigureView.vue
+++ b/dashboard/src/views/AppConfigureView.vue
@@ -12,6 +12,7 @@ import Info from '../components/app/Info.vue';
import Security from '../components/app/Security.vue';
import Cron from '../components/app/Cron.vue';
import Resources from '../components/app/Resources.vue';
+import Backups from '../components/app/Backups.vue';
import Repair from '../components/app/Repair.vue';
import Eventlog from '../components/app/Eventlog.vue';
import Updates from '../components/app/Updates.vue';
@@ -200,7 +201,7 @@ onBeforeUnmount(() => {
-
+