mirror of
https://gitlab.sectorq.eu/jaydee/portainer.git
synced 2025-12-14 18:44:53 +01:00
build
This commit is contained in:
23
portainer.py
23
portainer.py
@@ -18,6 +18,7 @@ from tabulate import tabulate
|
|||||||
from port import Portainer
|
from port import Portainer
|
||||||
from prompt_toolkit import prompt
|
from prompt_toolkit import prompt
|
||||||
from prompt_toolkit.completion import WordCompleter
|
from prompt_toolkit.completion import WordCompleter
|
||||||
|
from prompt_toolkit.shortcuts import checkboxlist_dialog
|
||||||
|
|
||||||
VERSION = "0.1.3"
|
VERSION = "0.1.3"
|
||||||
|
|
||||||
@@ -270,14 +271,22 @@ def prompt_missing_args(args_in, defaults_in, fields):
|
|||||||
commands, ignore_case=True, match_middle=False
|
commands, ignore_case=True, match_middle=False
|
||||||
)
|
)
|
||||||
try:
|
try:
|
||||||
value_in = (
|
if field == "stack":
|
||||||
prompt(
|
result = checkboxlist_dialog(
|
||||||
f" >> {prompt_text}",
|
title="Select Services",
|
||||||
completer=completer,
|
text="Choose one or more services:",
|
||||||
placeholder=default,
|
values=commands,
|
||||||
|
).run()
|
||||||
|
input(result)
|
||||||
|
else:
|
||||||
|
value_in = (
|
||||||
|
prompt(
|
||||||
|
f" >> {prompt_text}",
|
||||||
|
completer=completer,
|
||||||
|
placeholder=default,
|
||||||
|
)
|
||||||
|
or default
|
||||||
)
|
)
|
||||||
or default
|
|
||||||
)
|
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print("\n^C received — exiting cleanly.")
|
print("\n^C received — exiting cleanly.")
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|||||||
Reference in New Issue
Block a user