aboutsummaryrefslogtreecommitdiff
path: root/public/js/maintenance.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/js/maintenance.js')
-rw-r--r--public/js/maintenance.js18
1 files changed, 11 insertions, 7 deletions
diff --git a/public/js/maintenance.js b/public/js/maintenance.js
index 078c223..a742cf6 100644
--- a/public/js/maintenance.js
+++ b/public/js/maintenance.js
@@ -42,19 +42,14 @@ function cleanLogs(){
42 fetcher.send({}); 42 fetcher.send({});
43} 43}
44 44
45// notification après restauration 45// notification de succès ou erreur après restauration
46document.addEventListener('DOMContentLoaded', function(){ 46document.addEventListener('DOMContentLoaded', function(){
47 // 1/ message généré avant la redirection
47 const params = new URLSearchParams(window.location.search); 48 const params = new URLSearchParams(window.location.search);
48 // ça pourrait être bien de récupérer le message d'erreur de l'exception d'une autre manière (message dans la variable globale window? c'est faisable??)
49
50 if(typeof window.error_message !== "undefined"){
51 toastNotify(window.error_message);
52 }
53 49
54 if(params.has('read_backups_dir')){ 50 if(params.has('read_backups_dir')){
55 toastNotify("Une erreur s'est produite:<br>" + params.get('read_backups_dir')); 51 toastNotify("Une erreur s'est produite:<br>" + params.get('read_backups_dir'));
56 } 52 }
57
58 if(params.has('database_restauration')){ 53 if(params.has('database_restauration')){
59 if(params.get('database_restauration') === 'successful'){ 54 if(params.get('database_restauration') === 'successful'){
60 toastNotify("La base de données a été restaurée avec succès !!"); 55 toastNotify("La base de données a été restaurée avec succès !!");
@@ -63,4 +58,13 @@ document.addEventListener('DOMContentLoaded', function(){
63 toastNotify("Une erreur s'est produite:<br>" + params.get('database_restauration')); 58 toastNotify("Une erreur s'est produite:<br>" + params.get('database_restauration'));
64 } 59 }
65 } 60 }
61 if(params.has('get_all_media')){
62 toastNotify(params.get('get_all_media'));
63 }
64
65
66 // 2/ message généré après la redirection, au moment de l'ouverture de la page
67 if(typeof window.error_message !== "undefined"){
68 toastNotify(window.error_message);
69 }
66}); 70});