feature: restart moonraker if you click SAVE & RESTART of moonraker.conf

Signed-off-by: Stefan Dej <meteyou@gmail.com>
This commit is contained in:
Stefan Dej 2021-01-23 01:36:29 +01:00
parent e81ba35909
commit 659504f77e

View File

@ -427,7 +427,9 @@
this.editor.show = false;
this.editor.sourcecode = "";
if (boolRestart) {
if (boolRestart && this.editor.item.filename === "moonraker.conf") {
this.$socket.sendObj('machine.services.restart', { service: "moonraker" })
} else if (boolRestart) {
this.$store.commit('server/addEvent', { message: "FIRMWARE_RESTART", type: 'command' })
this.$socket.sendObj('printer.gcode.script', { script: "FIRMWARE_RESTART" })
}