diff --git a/core/ajax/luna.ajax.php b/core/ajax/luna.ajax.php index cb2a746..7953567 100644 --- a/core/ajax/luna.ajax.php +++ b/core/ajax/luna.ajax.php @@ -29,6 +29,14 @@ En V4 : autoriser l'exécution d'une méthode 'action' en GET en indiquant le(s) nom(s) de(s) action(s) dans un tableau en argument */ ajax::init(); + + + + if(init('action') == 'cleanWifi'){ + luna::cleanWifi(1); + luna::cleanWifi(2); + ajax::success(); + } if(init('action') == 'isLTELuna'){ diff --git a/desktop/js/luna.js b/desktop/js/luna.js index 507a704..657625c 100644 --- a/desktop/js/luna.js +++ b/desktop/js/luna.js @@ -397,6 +397,35 @@ function ajax_start_percentage() { // }); +document.getElementById('bt_cleanWifi')?.addEventListener('click', function() { + bootbox.confirm('{{Êtes-vous sûr de vouloir supprimer le profil Wifi ?}}', function(result) { + if (result) { + $.ajax({ + type: "POST", + url: "plugins/luna/core/ajax/luna.ajax.php", + data: { + action: "cleanWifi" + }, + dataType: 'json', + async: true, + global: false, + error: function(request, status, error) { + handleAjaxError(request, status, error) + }, + success: function(data) { + if (data.state != 'ok') { + $('#div_alert').showAlert({ message: data.result, level: 'danger' }) + return + } + $('#div_alert').showAlert({ message: 'Profil Wifi supprimé avec succes', level: 'success' }); + } + }) + } + }); + +}) + + document.getElementById('bt_reloadConfig')?.addEventListener('click', function() { bootbox.confirm('{{Êtes-vous sûr de vouloir recharger la configuration de Luna ?}}', function(result) { if (result) { diff --git a/desktop/php/luna.php b/desktop/php/luna.php index c5a491c..17a3db0 100644 --- a/desktop/php/luna.php +++ b/desktop/php/luna.php @@ -199,16 +199,41 @@ + +
+ +
+ +
+
+ {{Outils Administration}}
-
- {{Se référer à la documentation du plugin pour plus d'informations}} - Documentation -
- -
- -
+
+ {{Se référer à la documentation du plugin pour plus d'informations}} + Documentation +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ + +
+
- -
- -
- -
-
-