()
| 264 | } |
| 265 | |
| 266 | async function handleRestart() { |
| 267 | if (!restartBtn) return; |
| 268 | |
| 269 | restartBtn.disabled = true; |
| 270 | if (saveBtn) saveBtn.disabled = true; |
| 271 | setStatus("Restarting service...", "warning"); |
| 272 | |
| 273 | try { |
| 274 | await restartRuntime(); |
| 275 | setTimeout(() => { |
| 276 | window.location.reload(); |
| 277 | }, 6000); |
| 278 | } catch (err) { |
| 279 | if (saveBtn) saveBtn.disabled = false; |
| 280 | restartBtn.disabled = false; |
| 281 | setStatus("Restart failed: " + err.message, "error"); |
| 282 | } |
| 283 | } |
| 284 | |
| 285 | function updateRestartButton(show) { |
| 286 | if (!restartBtn) return; |
nothing calls this directly
no test coverage detected