diff --git a/html/admin.html b/html/admin.html index 009897b..e0c5dd2 100755 --- a/html/admin.html +++ b/html/admin.html @@ -51,33 +51,48 @@ Admin - - + + + + + Parameters + + + + + + Loop Logs + + + + Boot Logs + + + + + Sonde temp/hum (BME280) + + + + ssh tunnel port + + + + Password + + + Submit + + + + + Updates + + + Update firmware + + - - - Loop Logs - - - - Boot Logs - - - - - Sonde temp/hum (BME280) - - - - ssh tunnel port - - - - Password - - - Submit - @@ -138,6 +153,27 @@ window.onload = function() { }) .catch(error => console.error('Error loading config.json:', error)); } + + +function updateGitPull(){ + console.log("Updating device (git pull)"); + + $.ajax({ + url: 'launcher.php?type=git_pull', + method: 'GET', // Use GET or POST depending on your needs + success: function(response) { + // Handle success response if needed + console.log(response); + alert(response); + // Reload the page after the device update + location.reload(); // This will reload the page + + }, + error: function(xhr, status, error) { + console.error('AJAX request failed:', status, error); + } + }); + }