From ad9ba06ce1d49eba43828fd85159e25add817b9b Mon Sep 17 00:00:00 2001 From: ThisModernDay Date: Sat, 21 Oct 2023 16:16:05 -0400 Subject: [PATCH] Added a restart server button that makes an API call to the reboot API root. --- web/scripts/ui.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/web/scripts/ui.js b/web/scripts/ui.js index c3b3fbda1..416b73c2c 100644 --- a/web/scripts/ui.js +++ b/web/scripts/ui.js @@ -788,6 +788,13 @@ export class ComfyUI { } } }), + $el("button", { + id: "comfy-reboot-server-button", textContent: "Reboot Server", onclick: () => { + if (!confirmClear.value || confirm("Are you sure you'd like to reboot the server?")) { + api.fetchApi("/reboot") + } + } + }) ]); const devMode = this.settings.addSetting({