mirror of
https://gitlab.sectorq.eu/jaydee/portainer.git
synced 2025-12-14 18:44:53 +01:00
build
This commit is contained in:
10
portainer.py
10
portainer.py
@@ -272,11 +272,17 @@ def prompt_missing_args(args_in, defaults_in, fields):
|
|||||||
try:
|
try:
|
||||||
if field == "stack":
|
if field == "stack":
|
||||||
commands_tuples = [(cmd, cmd) for cmd in commands]
|
commands_tuples = [(cmd, cmd) for cmd in commands]
|
||||||
|
commands_tuples.insert(0, ("__ALL__", "[Select ALL]"))
|
||||||
value_in = checkboxlist_dialog(
|
value_in = checkboxlist_dialog(
|
||||||
title="Select Services",
|
title="Select Services",
|
||||||
text="Choose one or more services:",
|
text="Choose one or more services:",
|
||||||
values=commands_tuples,
|
values=commands_tuples,
|
||||||
).run()
|
).run()
|
||||||
|
if value_in is None:
|
||||||
|
print("Cancelled.")
|
||||||
|
elif "__ALL__" in value_in:
|
||||||
|
# User selected "Select ALL"
|
||||||
|
value_in = commands # all real commands
|
||||||
print(" >> Stacks :", ",".join(value_in))
|
print(" >> Stacks :", ",".join(value_in))
|
||||||
else:
|
else:
|
||||||
value_in = (
|
value_in = (
|
||||||
@@ -311,7 +317,9 @@ def prompt_missing_args(args_in, defaults_in, fields):
|
|||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
# value_in = input_with_default(text, default, longest+2)
|
# 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:
|
if por._debug:
|
||||||
print("Value entered:", value_in)
|
print("Value entered:", value_in)
|
||||||
defaults_in[f"PORTAINER_{field}".upper()] = value_in
|
defaults_in[f"PORTAINER_{field}".upper()] = value_in
|
||||||
|
|||||||
Reference in New Issue
Block a user