From dff099c5aa84aba452a26d3d230f00940be1d3df Mon Sep 17 00:00:00 2001 From: Stefan Dej Date: Mon, 24 May 2021 22:58:33 +0200 Subject: [PATCH] feature: restart webcamd by webcam*.txt files feature: display root path logs in config files Signed-off-by: Stefan Dej --- src/components/panels/Settings/ConfigFilesPanel.vue | 11 ++++++----- src/store/files/index.js | 7 +++++++ 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/components/panels/Settings/ConfigFilesPanel.vue b/src/components/panels/Settings/ConfigFilesPanel.vue index 082a3b62..4931e017 100644 --- a/src/components/panels/Settings/ConfigFilesPanel.vue +++ b/src/components/panels/Settings/ConfigFilesPanel.vue @@ -146,16 +146,16 @@ mdi-cloud-download {{ $t('Settings.ConfigFilesPanel.Download') }} - + mdi-rename-box {{ $t('Settings.ConfigFilesPanel.Rename') }} - + mdi-rename-box {{ $t('Settings.ConfigFilesPanel.Rename') }} - + mdi-delete {{ $t('Settings.ConfigFilesPanel.Delete') }} - + mdi-delete {{ $t('Settings.ConfigFilesPanel.Delete') }} @@ -436,7 +436,6 @@ export default { }, methods: { closeEditor() { - console.log("close"); this.editor.show = false; this.editor.init = false; this.editor.monaco = null; @@ -594,6 +593,8 @@ export default { if (boolRestart) { if (this.editor.item.filename === "moonraker.conf") { this.$socket.sendObj('machine.services.restart', { service: "moonraker" }) + } else if (this.editor.item.filename.startsWith("webcam") && this.editor.item.filename.endsWith(".txt")) { + this.$socket.sendObj('machine.services.restart', { service: "webcamd" }) } else { this.$store.commit('server/addEvent', { message: "FIRMWARE_RESTART", type: 'command' }) this.$socket.sendObj('printer.gcode.script', { script: "FIRMWARE_RESTART" }) diff --git a/src/store/files/index.js b/src/store/files/index.js index 46f4b67a..e71dca39 100644 --- a/src/store/files/index.js +++ b/src/store/files/index.js @@ -32,6 +32,13 @@ export function getDefaultState() { modified: new Date(), childrens: [], disk_usage: {} + }, + { + isDirectory: true, + filename: 'logs', + modified: new Date(), + childrens: [], + disk_usage: {} } ], }