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
@@ -840,9 +840,9 @@ class Portainer:
|
||||
|
||||
def _delete_single_stack(self, stack_id, endpoint_id):
|
||||
path = f"/stacks/{stack_id}?endpointId={endpoint_id}&removeVolumes=true"
|
||||
|
||||
# print(path)
|
||||
try:
|
||||
out = self._api_delete(path)
|
||||
out = self._api_delete(path,timeout=240)
|
||||
except ValueError as e:
|
||||
msg = str(e)
|
||||
if "Conflict for url" in msg:
|
||||
|
||||
11
portainer.py
11
portainer.py
@@ -212,7 +212,7 @@ def wl(msg):
|
||||
print(msg)
|
||||
|
||||
|
||||
def prompt_missing_args(args_in, defaults_in, fields):
|
||||
def prompt_missing_args(args_in, defaults_in, fields, action=None):
|
||||
"""
|
||||
fields = [("arg_name", "Prompt text")]
|
||||
"""
|
||||
@@ -284,8 +284,12 @@ def prompt_missing_args(args_in, defaults_in, fields):
|
||||
# User selected "Select ALL"
|
||||
value_in = commands # all real commands
|
||||
if "pihole" in value_in:
|
||||
value_in.remove("pihole")
|
||||
value_in.insert(0, "pihole")
|
||||
if action == "create_stack":
|
||||
value_in.remove("pihole")
|
||||
value_in.insert(0, "pihole")
|
||||
elif action == "delete_stack":
|
||||
value_in.remove("pihole")
|
||||
value_in.append("pihole")
|
||||
print(" >> Stacks :", ",".join(value_in))
|
||||
else:
|
||||
value_in = (
|
||||
@@ -419,6 +423,7 @@ if __name__ == "__main__":
|
||||
("endpoint_id", "Endpoint ID"),
|
||||
("stack", "Stack name or ID"),
|
||||
],
|
||||
action="delete_stack",
|
||||
)
|
||||
|
||||
input(
|
||||
|
||||
Reference in New Issue
Block a user