()
| 367 | } |
| 368 | |
| 369 | async function handleRestart() { |
| 370 | if (!restartBtn) return; |
| 371 | |
| 372 | restartBtn.disabled = true; |
| 373 | if (saveBtn) saveBtn.disabled = true; |
| 374 | setStatus("Restarting service...", "warning"); |
| 375 | |
| 376 | try { |
| 377 | await restartRuntime(); |
| 378 | setTimeout(() => { |
| 379 | window.location.reload(); |
| 380 | }, 6000); |
| 381 | } catch (err) { |
| 382 | if (saveBtn) saveBtn.disabled = false; |
| 383 | restartBtn.disabled = false; |
| 384 | setStatus("Restart failed: " + err.message, "error"); |
| 385 | } |
| 386 | } |
| 387 | |
| 388 | function updateRestartButton(show) { |
| 389 | if (!restartBtn) return; |
nothing calls this directly
no test coverage detected