UI Cleanup

This commit is contained in:
2025-10-24 16:52:08 -04:00
parent 629f6b510d
commit c52767b3a3
3 changed files with 14 additions and 7 deletions
+2 -2
View File
@@ -31,13 +31,13 @@ import utils.menus as menus
from services.API import AirlockAPIWrapper from services.API import AirlockAPIWrapper
from services.security import getAPI from services.security import getAPI
from utils.setup import get_base_directory, setup from utils.setup import get_base_directory, setup
from utils.utils import irtang
urllib3.disable_warnings( urllib3.disable_warnings(
urllib3.exceptions.InsecureRequestWarning urllib3.exceptions.InsecureRequestWarning
) )
def main(): def main():
irtang()
#Determine working directory, setup directory, configure logging, sent env, get API and URL if not already stored #Determine working directory, setup directory, configure logging, sent env, get API and URL if not already stored
setup() setup()
+2
View File
@@ -41,6 +41,7 @@ from utils.utils import (
locked, locked,
open_directory, open_directory,
printEnforceChecklist, printEnforceChecklist,
clear_screen
) )
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
@@ -51,6 +52,7 @@ def menu_main(api: AirlockAPIWrapper):
working_dir = load_env("WORKING_DIR") working_dir = load_env("WORKING_DIR")
extras = load_env("EXTRAS") extras = load_env("EXTRAS")
while True: while True:
clear_screen()
displayIntro() displayIntro()
# Add Settings, and give option to change working dir # Add Settings, and give option to change working dir
print(colorText("1. ✅ - Move Device(s) to local approval", "yellow")) print(colorText("1. ✅ - Move Device(s) to local approval", "yellow"))
+8 -3
View File
@@ -121,9 +121,8 @@ def regulator(paths, case_insensitive=True):
pattern = "(?i)" + pattern # Add inline case-insensitive flag pattern = "(?i)" + pattern # Add inline case-insensitive flag
print(f"Regulator is providing: {pattern}") print(f"Regulator is providing: {pattern}")
return pattern return pattern
def irtang():
def displayIntro(): print(
print(
colorText( colorText(
r""" r"""
███ ███
@@ -152,6 +151,8 @@ def displayIntro():
"yellow", "yellow",
) )
) )
def displayIntro():
print( print(
colorText( colorText(
r""" r"""
@@ -619,3 +620,7 @@ def print_x_wide(items: list, width: int):
for i in range(0, len(items), width): for i in range(0, len(items), width):
row = items[i:i+width] row = items[i:i+width]
print(" | ".join(row)) print(" | ".join(row))
def clear_screen():
os.system('cls' if os.name == 'nt' else 'clear')