mirror of
https://gitlab.sectorq.eu/jaydee/portainer.git
synced 2026-05-04 14:49:49 +02:00
build
This commit is contained in:
Binary file not shown.
@@ -1258,6 +1258,7 @@ class PortainerApi:
|
||||
|
||||
"""Stop one stack or all stacks on an endpoint."""
|
||||
# print(f"Stopping stack {stack}")
|
||||
protected_stack = ['hashicorp','nginx','pihole',]
|
||||
ok = "\033[92m✔\033[0m"
|
||||
ok2 = "\033[93m✔\033[0m"
|
||||
err = "\033[91m✖\033[0m"
|
||||
@@ -1274,6 +1275,10 @@ class PortainerApi:
|
||||
size = size + 5
|
||||
self.stack_ids = list(dict.fromkeys(self.stack_ids))
|
||||
for stck in self.stack_ids:
|
||||
if self.stacks_all[self.endpoint_id]['by_id'] in protected_stack:
|
||||
ans = input(f"Really stop {self.stacks_all[self.endpoint_id]['by_id'][stck]} ? ") or "n"
|
||||
if ans != "y":
|
||||
continue
|
||||
print(
|
||||
f"Stopping stack {self.stacks_all[self.endpoint_id]['by_id'][stck][:size].ljust(size)}",
|
||||
end="",
|
||||
|
||||
Reference in New Issue
Block a user