mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-11 13:23:00 +00:00
add update button to web control page
This commit is contained in:
@@ -126,6 +126,8 @@ CONFIG_PAGE_TEMPLATE = """
|
|||||||
<button type="button" class="action-button" onclick="runAction('disable_autostart')">Disable Auto-Start</button>
|
<button type="button" class="action-button" onclick="runAction('disable_autostart')">Disable Auto-Start</button>
|
||||||
<hr>
|
<hr>
|
||||||
<button type="button" class="action-button" onclick="runAction('reboot_system')">Reboot System</button>
|
<button type="button" class="action-button" onclick="runAction('reboot_system')">Reboot System</button>
|
||||||
|
<hr>
|
||||||
|
<button type="button" class="action-button" onclick="runAction('git_pull')">Download Latest Update</button>
|
||||||
</div>
|
</div>
|
||||||
<div id="action_output_container" style="margin-top: 20px;">
|
<div id="action_output_container" style="margin-top: 20px;">
|
||||||
<h3>Action Output:</h3>
|
<h3>Action Output:</h3>
|
||||||
@@ -352,6 +354,9 @@ def run_action_route():
|
|||||||
elif action == 'reboot_system':
|
elif action == 'reboot_system':
|
||||||
command_parts = ["sudo", "reboot"]
|
command_parts = ["sudo", "reboot"]
|
||||||
explanation_msg = "Reboots the system."
|
explanation_msg = "Reboots the system."
|
||||||
|
elif action == 'git_pull':
|
||||||
|
command_parts = ["git", "pull"]
|
||||||
|
explanation_msg = "Downloads the latest updates from the repository."
|
||||||
else:
|
else:
|
||||||
return jsonify({
|
return jsonify({
|
||||||
"status": "error",
|
"status": "error",
|
||||||
|
|||||||
Reference in New Issue
Block a user