diff --git a/html/admin.html b/html/admin.html
index ccece87..eeec61f 100755
--- a/html/admin.html
+++ b/html/admin.html
@@ -79,49 +79,49 @@
-
+
-
+
-
+
@@ -506,62 +506,6 @@ function update_config_sqlite(param, value){
});
}
-function update_config_scripts_sqlite(param, value) {
- console.log("Updating scripts sqlite ", param, " : ", value);
- const toastLiveExample = document.getElementById('liveToast')
- const toastBody = toastLiveExample.querySelector('.toast-body');
-
- $.ajax({
- url: 'launcher.php?type=update_config_scripts_sqlite¶m=' + param + '&value=' + value,
- dataType: 'json',
- method: 'GET',
- cache: false,
- success: function(response) {
- console.log(response);
- // Format the response nicely
- let formattedMessage = '';
-
- if (response.success) {
- // Success message
- toastLiveExample.classList.remove('text-bg-danger');
- toastLiveExample.classList.add('text-bg-success');
-
- formattedMessage = `
- Success!
- Parameter: ${response.script_path || param}
- Value: ${response.enabled !== undefined ? response.enabled : value}
- ${response.message || ''}
- `;
-
- if (response.script_path == "envea/read_value_v2.py") {
- console.log("envea sondes activated");
- add_sondeEnveaContainer();
-
- }
- } else {
- // Error message
- toastLiveExample.classList.remove('text-bg-success');
- toastLiveExample.classList.add('text-bg-danger');
-
- formattedMessage = `
- Error!
- ${response.error || 'Unknown error'}
- Parameter: ${response.script_path || param}
- `;
- }
-
- // Update the toast body with formatted content
- toastBody.innerHTML = formattedMessage;
- // Show the toast
- const toastBootstrap = bootstrap.Toast.getOrCreateInstance(toastLiveExample)
- toastBootstrap.show()
- },
- error: function(xhr, status, error) {
- console.error('AJAX request failed:', status, error);
- }
- });
-}
-
function update_config(param, value){
console.log("Updating ",param," : ", value);
diff --git a/html/launcher.php b/html/launcher.php
index 8f21845..615c565 100755
--- a/html/launcher.php
+++ b/html/launcher.php
@@ -218,52 +218,6 @@ if ($type == "update_config_sqlite") {
}
}
-//UPDATING the config_scripts table from SQLite DB
-if ($type == "update_config_scripts_sqlite") {
- $script_path = $_GET['param'] ?? null;
- $enabled = $_GET['value'] ?? null;
-
- if ($script_path === null || $enabled === null) {
- echo json_encode(["error" => "Missing parameter or value"]);
- exit;
- }
-
- try {
- $db = new PDO("sqlite:$database_path");
- $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
-
- // First, check if parameter exists and get its type
- $checkStmt = $db->prepare("SELECT enabled FROM config_scripts_table WHERE script_path = :script_path");
- $checkStmt->bindParam(':script_path', $script_path);
- $checkStmt->execute();
- $result = $checkStmt->fetch(PDO::FETCH_ASSOC);
-
- if ($result) {
- // Convert enabled value to 0 or 1
- $enabledValue = (filter_var($enabled, FILTER_VALIDATE_BOOLEAN)) ? 1 : 0;
-
- // Update the enabled status
- $updateStmt = $db->prepare("UPDATE config_scripts_table SET enabled = :enabled WHERE script_path = :script_path");
- $updateStmt->bindParam(':enabled', $enabledValue, PDO::PARAM_INT);
- $updateStmt->bindParam(':script_path', $script_path);
- $updateStmt->execute();
-
- echo json_encode([
- "success" => true,
- "message" => "Script configuration updated successfully",
- "script_path" => $script_path,
- "enabled" => (bool)$enabledValue
- ], JSON_UNESCAPED_SLASHES); // Prevent escaping forward slashes
- } else {
- echo json_encode([
- "error" => "Script path not found in configuration",
- "script_path" => $script_path
- ], JSON_UNESCAPED_SLASHES); // Prevent escaping forward slashes
- }
- } catch (PDOException $e) {
- echo json_encode(["error" => $e->getMessage()]);
- }
-}
//UPDATING the envea_sondes_table table from SQLite DB
if ($type == "update_sonde") {
diff --git a/html/logs.html b/html/logs.html
index 3f2ad22..4412773 100755
--- a/html/logs.html
+++ b/html/logs.html
@@ -56,7 +56,7 @@