Address review nits for restart flow

Agent-Logs-Url: https://github.com/naturallaw777/staging_alpha/sessions/8e6c98f7-8b24-4ec0-944b-0310e0989495

Co-authored-by: naturallaw777 <99053422+naturallaw777@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-04-16 15:18:34 +00:00
committed by GitHub
parent fce4608647
commit c37816d257
2 changed files with 3 additions and 2 deletions
+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.";