diff --git a/dashboard/src/models/ProvisionModel.js b/dashboard/src/models/ProvisionModel.js index 2d5a0af4f..4239e6709 100644 --- a/dashboard/src/models/ProvisionModel.js +++ b/dashboard/src/models/ProvisionModel.js @@ -57,6 +57,17 @@ function create() { error = e; } + if (error || result.status !== 200) return [error || result]; + return [null]; + }, + async restore(data) { + let error, result; + try { + result = await fetcher.post(`${API_ORIGIN}/api/v1/provision/restore`, data); + } catch (e) { + error = e; + } + if (error || result.status !== 200) return [error || result]; return [null]; }, diff --git a/dashboard/src/views/RestoreView.vue b/dashboard/src/views/RestoreView.vue index 5795bf0b6..6f1c17118 100644 --- a/dashboard/src/views/RestoreView.vue +++ b/dashboard/src/views/RestoreView.vue @@ -208,7 +208,7 @@ onMounted(async () => { You can follow the logs on the server at /home/yellowtent/platformdata/logs/box.log

- If setup appears stuck, it can be restarted by running systemctl restart box and reloading this page. + If restore appears stuck, it can be restarted by running systemctl restart box and reloading this page. @@ -216,11 +216,11 @@ onMounted(async () => {

Cloudron Restore

Provide the backup to restore from

-
{{ formError.generic }}
- +
{{ formError.generic }}
+