initial retooling #1

Merged
naturallaw777 merged 1130 commits from staging-dev into stable 2026-05-21 08:10:11 -05:00
2 changed files with 3 additions and 2 deletions
Showing only changes of commit c37816d257 - Show all commits
+1 -1
View File
@@ -2978,7 +2978,7 @@ async def api_service_restart(unit: str):
try:
proc = await asyncio.create_subprocess_exec(
"systemctl", "restart", unit,
stdout=asyncio.subprocess.PIPE,
stdout=asyncio.subprocess.DEVNULL,
stderr=asyncio.subprocess.PIPE,
)
_, stderr = await proc.communicate()
@@ -308,6 +308,7 @@ async function openServiceDetailModal(unit, name, icon) {
var restartBtn = document.getElementById("svc-detail-restart-btn");
var restartResult = document.getElementById("svc-detail-restart-result");
if (restartBtn && restartResult) {
var RESTART_REFRESH_DELAY_MS = 3000;
restartBtn.addEventListener("click", async function() {
restartBtn.disabled = true;
restartBtn.textContent = "Restarting…";
@@ -322,7 +323,7 @@ async function openServiceDetailModal(unit, name, icon) {
restartBtn.textContent = "🔄 Restart Service";
setTimeout(function() {
openServiceDetailModal(unit, name, icon);
}, 3000);
}, RESTART_REFRESH_DELAY_MS);
} catch (e) {
restartResult.classList.add("error");
restartResult.textContent = e && e.message ? e.message : "Failed to restart service.";