UI Cleanup
This commit is contained in:
@@ -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()
|
||||||
|
|||||||
@@ -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"))
|
||||||
|
|||||||
+7
-2
@@ -121,8 +121,7 @@ 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')
|
||||||
|
|||||||
Reference in New Issue
Block a user