mirror of
https://gitlab.sectorq.eu/jaydee/portainer.git
synced 2025-12-14 10:44:52 +01:00
build
This commit is contained in:
15
portainer.py
15
portainer.py
@@ -251,14 +251,14 @@ def prompt_missing_args(args_in, defaults_in, fields, action=None,stacks=None):
|
|||||||
'authentik', 'bitwarden', 'bookstack', 'dockermon', 'fail2ban', 'gitea', 'gitlab', 'grafana',
|
'authentik', 'bitwarden', 'bookstack', 'dockermon', 'fail2ban', 'gitea', 'gitlab', 'grafana',
|
||||||
'home-assistant', 'homepage', 'immich', 'influxdb', 'jupyter', 'kestra', 'mailu3',
|
'home-assistant', 'homepage', 'immich', 'influxdb', 'jupyter', 'kestra', 'mailu3',
|
||||||
'mealie', 'mediacenter', 'mosquitto', 'motioneye', 'n8n', 'nebula', 'nextcloud', 'nginx',
|
'mealie', 'mediacenter', 'mosquitto', 'motioneye', 'n8n', 'nebula', 'nextcloud', 'nginx',
|
||||||
'node-red', 'octoprint', 'ollama', 'pihole', 'portainer-ce', 'rancher', 'registry',
|
'node-red', 'octoprint', 'ollama', 'onlyoffice', 'paperless-ngx', 'pihole', 'portainer-ce', 'rancher', 'registry',
|
||||||
'regsync', 'semaphore', 'unifibrowser', 'uptime-kuma', 'watchtower', 'wazuh', 'webhub',
|
'regsync', 'semaphore', 'unifibrowser', 'uptime-kuma', 'watchtower', 'wazuh', 'webhub', 'wordpress',
|
||||||
'wud', 'zabbix-server']
|
'wud', 'zabbix-server']
|
||||||
try:
|
try:
|
||||||
print(por.all_data['stacks'][defaults_in[f"PORTAINER_ENDPOINT_ID".upper()]]['by_name'].keys())
|
print(por.all_data['stacks'][defaults_in[f"PORTAINER_ENDPOINT_ID".upper()]]['by_name'].keys())
|
||||||
for s in por.all_data['stacks'][defaults_in[f"PORTAINER_ENDPOINT_ID".upper()]]['by_name'].keys():
|
for s in por.all_data['stacks'][defaults_in[f"PORTAINER_ENDPOINT_ID".upper()]]['by_name'].keys():
|
||||||
|
|
||||||
# print(s)
|
#print(s)
|
||||||
commands.remove(s)
|
commands.remove(s)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
print("No stacks found for endpoint", defaults_in[f"PORTAINER_ENDPOINT_ID".upper()])
|
print("No stacks found for endpoint", defaults_in[f"PORTAINER_ENDPOINT_ID".upper()])
|
||||||
@@ -286,6 +286,7 @@ def prompt_missing_args(args_in, defaults_in, fields, action=None,stacks=None):
|
|||||||
)
|
)
|
||||||
try:
|
try:
|
||||||
if field == "stack":
|
if field == "stack":
|
||||||
|
commands.sort()
|
||||||
commands_tuples = [(cmd, cmd) for cmd in commands]
|
commands_tuples = [(cmd, cmd) for cmd in commands]
|
||||||
commands_tuples.insert(0, ("__ALL__", "[Select ALL]"))
|
commands_tuples.insert(0, ("__ALL__", "[Select ALL]"))
|
||||||
value_in = checkboxlist_dialog(
|
value_in = checkboxlist_dialog(
|
||||||
@@ -293,13 +294,17 @@ def prompt_missing_args(args_in, defaults_in, fields, action=None,stacks=None):
|
|||||||
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:
|
if value_in is None:
|
||||||
print("Cancelled.")
|
print("Cancelled.")
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
elif "__ALL__" in value_in:
|
elif "__ALL__" in value_in:
|
||||||
# User selected "Select ALL"
|
# User selected "Select ALL"
|
||||||
value_in = commands # all real commands
|
value_in = commands # all real commands
|
||||||
value_in = value_in.sort()
|
|
||||||
|
|
||||||
|
value_in.sort()
|
||||||
|
|
||||||
if "pihole" in value_in:
|
if "pihole" in value_in:
|
||||||
if action == "delete_stack":
|
if action == "delete_stack":
|
||||||
value_in.remove("pihole")
|
value_in.remove("pihole")
|
||||||
@@ -341,7 +346,7 @@ def prompt_missing_args(args_in, defaults_in, fields, action=None,stacks=None):
|
|||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
# value_in = input_with_default(text, default, longest+2)
|
# value_in = input_with_default(text, default, longest+2)
|
||||||
|
value_in.sort()
|
||||||
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