Add admin deployment sync
Some checks failed
Build & Push Docker Image / build-and-push (push) Failing after 14s
Some checks failed
Build & Push Docker Image / build-and-push (push) Failing after 14s
This commit is contained in:
@@ -172,6 +172,30 @@ $(document).ready(function() {
|
||||
});
|
||||
});
|
||||
|
||||
// ==================== WEBSITE SYNC ====================
|
||||
|
||||
$('#sync-site').click(function() {
|
||||
if (!confirm('Neueste Version laden und Website neu starten?')) return;
|
||||
|
||||
var $button = $(this);
|
||||
var $status = $('#sync-status');
|
||||
$button.prop('disabled', true);
|
||||
$status.text('Sync laeuft...');
|
||||
|
||||
$.post('/api/admin/sync')
|
||||
.done(function(res) {
|
||||
$status.text(res.message || 'Sync gestartet. Website startet neu...');
|
||||
window.setTimeout(function() {
|
||||
window.location.reload();
|
||||
}, 12000);
|
||||
})
|
||||
.fail(function(err) {
|
||||
var msg = err.responseJSON ? err.responseJSON.error : 'Sync fehlgeschlagen';
|
||||
$status.text(msg);
|
||||
$button.prop('disabled', false);
|
||||
});
|
||||
});
|
||||
|
||||
// ==================== EIGENES PASSWORT ====================
|
||||
|
||||
$('#admin-pw-form').submit(function(e) {
|
||||
|
||||
Reference in New Issue
Block a user