mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-24 08:13:36 +05:00
refactor(KIAUH): full refactor of client and client-config installation
Signed-off-by: Dominik Willner <th33xitus@gmail.com>
This commit is contained in:
@@ -12,11 +12,15 @@
|
||||
import textwrap
|
||||
|
||||
from components.klipper.klipper_utils import backup_klipper_dir
|
||||
from components.mainsail.mainsail_utils import backup_mainsail_data
|
||||
from components.moonraker.moonraker_utils import (
|
||||
backup_moonraker_dir,
|
||||
backup_moonraker_db_dir,
|
||||
)
|
||||
from components.webui_client.client_utils import (
|
||||
backup_client_data,
|
||||
load_client_data,
|
||||
backup_client_config_data,
|
||||
)
|
||||
from core.menus import BACK_FOOTER
|
||||
from core.menus.base_menu import BaseMenu
|
||||
from utils.common import backup_printer_config_dir
|
||||
@@ -35,6 +39,10 @@ class BackupMenu(BaseMenu):
|
||||
"3": self.backup_printer_config,
|
||||
"4": self.backup_moonraker_db,
|
||||
"5": self.backup_mainsail,
|
||||
"6": self.backup_fluidd,
|
||||
"7": self.backup_mainsail_config,
|
||||
"8": self.backup_fluidd_config,
|
||||
"9": self.backup_klipperscreen,
|
||||
},
|
||||
footer_type=BACK_FOOTER,
|
||||
)
|
||||
@@ -51,15 +59,15 @@ class BackupMenu(BaseMenu):
|
||||
|-------------------------------------------------------|
|
||||
| {line1:^62} |
|
||||
|-------------------------------------------------------|
|
||||
| Klipper & Moonraker API: | Touchscreen GUI: |
|
||||
| 1) [Klipper] | 7) [KlipperScreen] |
|
||||
| 2) [Moonraker] | |
|
||||
| 3) [Config Folder] | Other: |
|
||||
| 4) [Moonraker Database] | 9) [Telegram Bot] |
|
||||
| | |
|
||||
| Klipper Webinterface: | |
|
||||
| 5) [Mainsail] | |
|
||||
| 6) [Fluidd] | |
|
||||
| Klipper & Moonraker API: | Client-Config: |
|
||||
| 1) [Klipper] | 7) [Mainsail-Config] |
|
||||
| 2) [Moonraker] | 8) [Fluidd-Config] |
|
||||
| 3) [Config Folder] | |
|
||||
| 4) [Moonraker Database] | Touchscreen GUI: |
|
||||
| | 9) [KlipperScreen] |
|
||||
| Webinterface: | |
|
||||
| 5) [Mainsail] | |
|
||||
| 6) [Fluidd] | |
|
||||
"""
|
||||
)[1:]
|
||||
print(menu, end="")
|
||||
@@ -77,13 +85,16 @@ class BackupMenu(BaseMenu):
|
||||
backup_moonraker_db_dir()
|
||||
|
||||
def backup_mainsail(self, **kwargs):
|
||||
backup_mainsail_data()
|
||||
backup_client_data(load_client_data("mainsail"))
|
||||
|
||||
def backup_fluidd(self, **kwargs):
|
||||
pass
|
||||
backup_client_data(load_client_data("fluidd"))
|
||||
|
||||
def backup_mainsail_config(self, **kwargs):
|
||||
backup_client_config_data(load_client_data("mainsail"))
|
||||
|
||||
def backup_fluidd_config(self, **kwargs):
|
||||
backup_client_config_data(load_client_data("fluidd"))
|
||||
|
||||
def backup_klipperscreen(self, **kwargs):
|
||||
pass
|
||||
|
||||
def backup_telegram_bot(self, **kwargs):
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user