mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-15 03:24:29 +05:00
fix: performance improvement for loading the advanced menu ui
This commit is contained in:
@@ -248,6 +248,9 @@ toggle_octoprint_service(){
|
|||||||
|
|
||||||
read_octoprint_service_status(){
|
read_octoprint_service_status(){
|
||||||
unset OPRINT_SERVICE_STATUS
|
unset OPRINT_SERVICE_STATUS
|
||||||
|
if [ ! -f "/etc/systemd/system/octoprint.service" ]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
if systemctl list-unit-files | grep -E "octoprint*" | grep "enabled" &>/dev/null; then
|
if systemctl list-unit-files | grep -E "octoprint*" | grep "enabled" &>/dev/null; then
|
||||||
OPRINT_SERVICE_STATUS="${red}[Disable]${default} OctoPrint Service "
|
OPRINT_SERVICE_STATUS="${red}[Disable]${default} OctoPrint Service "
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -2,9 +2,11 @@ advanced_ui(){
|
|||||||
top_border
|
top_border
|
||||||
echo -e "| ${yellow}~~~~~~~~~~~~~ [ Advanced Menu ] ~~~~~~~~~~~~~${default} | "
|
echo -e "| ${yellow}~~~~~~~~~~~~~ [ Advanced Menu ] ~~~~~~~~~~~~~${default} | "
|
||||||
hr
|
hr
|
||||||
echo -e "| 0) $OPRINT_SERVICE_STATUS| "
|
if [ ! "$OPRINT_SERVICE_STATUS" == "" ]; then
|
||||||
hr
|
echo -e "| 0) $OPRINT_SERVICE_STATUS| "
|
||||||
echo -e "| | | "
|
hr
|
||||||
|
echo -e "| | | "
|
||||||
|
fi
|
||||||
echo -e "| Klipper: | Mainsail: | "
|
echo -e "| Klipper: | Mainsail: | "
|
||||||
echo -e "| 1) [Switch Branch] | 7) [Theme installer] | "
|
echo -e "| 1) [Switch Branch] | 7) [Theme installer] | "
|
||||||
echo -e "| 2) [Rollback] | | "
|
echo -e "| 2) [Rollback] | | "
|
||||||
|
|||||||
Reference in New Issue
Block a user