mirror of
https://gitlab.sectorq.eu/jaydee/portainer.git
synced 2025-12-14 02:34:53 +01:00
build
This commit is contained in:
4
port.py
4
port.py
@@ -858,13 +858,11 @@ class Portainer:
|
||||
self._resolve_endpoint(endpoint_id)
|
||||
endpoint_id = self.endpoint_id
|
||||
|
||||
|
||||
|
||||
|
||||
if stack == "all":
|
||||
return self._delete_all_stacks(endpoint_id)
|
||||
else:
|
||||
for s in stack:
|
||||
print(f" >> Deleting stack {s} from endpoint {self.endpoint_name}")
|
||||
stack_id = self._resolve_stack_id(s, endpoint_id)
|
||||
self._delete_single_stack(stack_id, endpoint_id)
|
||||
return "Done"
|
||||
|
||||
@@ -283,6 +283,9 @@ def prompt_missing_args(args_in, defaults_in, fields):
|
||||
elif "__ALL__" in value_in:
|
||||
# User selected "Select ALL"
|
||||
value_in = commands # all real commands
|
||||
if "pihole" in value_in:
|
||||
value_in.remove("pihole")
|
||||
value_in.insert(0, "pihole")
|
||||
print(" >> Stacks :", ",".join(value_in))
|
||||
else:
|
||||
value_in = (
|
||||
@@ -317,9 +320,7 @@ def prompt_missing_args(args_in, defaults_in, fields):
|
||||
sys.exit(0)
|
||||
|
||||
# value_in = input_with_default(text, default, longest+2)
|
||||
if "pihole" in value_in:
|
||||
value_in.remove("pihole")
|
||||
value_in.insert(0, "pihole")
|
||||
|
||||
if por._debug:
|
||||
print("Value entered:", value_in)
|
||||
defaults_in[f"PORTAINER_{field}".upper()] = value_in
|
||||
@@ -421,7 +422,7 @@ if __name__ == "__main__":
|
||||
)
|
||||
|
||||
input(
|
||||
f"Delete stack {args.stack} on endpoint {args.endpoint_id}. Press ENTER to continue..."
|
||||
f"\nDelete stack {','.join(args.stack)} on endpoint {args.endpoint_id}. Press ENTER to continue..."
|
||||
)
|
||||
por.delete_stack(
|
||||
args.endpoint_id,
|
||||
|
||||
Reference in New Issue
Block a user