diff --git a/tubearchivist/home/templates/home/settings.html b/tubearchivist/home/templates/home/settings.html index 30b656b9..bde21809 100644 --- a/tubearchivist/home/templates/home/settings.html +++ b/tubearchivist/home/templates/home/settings.html @@ -165,7 +165,7 @@
Create next snapshot: {{ snapshots.next_exec_str }}, snapshots expire after {{ snapshots.expire_after }}
Snapshot created on: {{ snapshot.start_date }}, took {{ snapshot.duration_s }}s to create
+Snapshot created on: {{ snapshot.start_date }}, took {{ snapshot.duration_s }}s to create.
{% endfor %} {% endif %} diff --git a/tubearchivist/static/script.js b/tubearchivist/static/script.js index e68971bf..ee2dc12d 100644 --- a/tubearchivist/static/script.js +++ b/tubearchivist/static/script.js @@ -287,6 +287,16 @@ function resetToken() { document.getElementById('text-reveal').replaceWith(message); } +// restore from snapshot +function restoreSnapshot(snapshotId) { + console.log('restore ' + snapshotId); + let apiEndpoint = '/api/snapshot/' + snapshotId + '/'; + apiRequest(apiEndpoint, 'POST'); + let message = document.createElement('p'); + message.innerText = 'Snapshot restore started'; + document.getElementById(snapshotId).parentElement.replaceWith(message); +} + // delete from file system function deleteConfirm() { let to_show = document.getElementById('delete-button');