Bugfix, plus some QoL upgrades from the Async branch
This commit is contained in:
+11
-11
@@ -70,17 +70,20 @@ def menu_main(api: AirlockAPIWrapper):
|
||||
elif choice == "2":
|
||||
menu_otp(api)
|
||||
elif choice == "3":
|
||||
choices = ["audit", "enforcement"]
|
||||
choices = ["audit", "enforcement", "Cancel"]
|
||||
print(colorText("Move devices to which state?:", "yellow"))
|
||||
direction = Selector.select_string(choices, False, False)
|
||||
devices = selectAgents(api)
|
||||
print(colorText("Would you like to continue with these devices?","white"))
|
||||
for device in devices:
|
||||
print(device.hostname)
|
||||
confirm = Selector.confirm()
|
||||
if direction and devices and confirm:
|
||||
if direction == "Cancel":
|
||||
pass
|
||||
else:
|
||||
devices = selectAgents(api)
|
||||
print(colorText("Would you like to continue with these devices?","white"))
|
||||
for device in devices:
|
||||
moveAgentToRelatedPolicy(api,device, direction)
|
||||
print(device.hostname)
|
||||
confirm = Selector.confirm()
|
||||
if direction and devices and confirm:
|
||||
for device in devices:
|
||||
moveAgentToRelatedPolicy(api,device, str(direction))
|
||||
elif choice == "4":
|
||||
findAgents(api,False)
|
||||
elif choice == "5":
|
||||
@@ -96,8 +99,6 @@ def menu_main(api: AirlockAPIWrapper):
|
||||
else:
|
||||
print(colorText("Invalid choice. Please try again.", "red"))
|
||||
|
||||
|
||||
|
||||
def menu_policy_enforce(api: AirlockAPIWrapper):
|
||||
selected_policies = []
|
||||
destination_policy = []
|
||||
@@ -243,7 +244,6 @@ def menu_policy_enforce(api: AirlockAPIWrapper):
|
||||
else:
|
||||
print(colorText("Invalid choice. Please try again.", "red"))
|
||||
|
||||
|
||||
def menu_otp(api: AirlockAPIWrapper):
|
||||
working_dir = load_env("WORKING_DIR")
|
||||
while True:
|
||||
|
||||
Reference in New Issue
Block a user