diff --git a/portainer.py b/portainer.py index b5643a9..2dbfdfb 100755 --- a/portainer.py +++ b/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', 'home-assistant', 'homepage', 'immich', 'influxdb', 'jupyter', 'kestra', 'mailu3', 'mealie', 'mediacenter', 'mosquitto', 'motioneye', 'n8n', 'nebula', 'nextcloud', 'nginx', - 'node-red', 'octoprint', 'ollama', 'pihole', 'portainer-ce', 'rancher', 'registry', - 'regsync', 'semaphore', 'unifibrowser', 'uptime-kuma', 'watchtower', 'wazuh', 'webhub', + 'node-red', 'octoprint', 'ollama', 'onlyoffice', 'paperless-ngx', 'pihole', 'portainer-ce', 'rancher', 'registry', + 'regsync', 'semaphore', 'unifibrowser', 'uptime-kuma', 'watchtower', 'wazuh', 'webhub', 'wordpress', 'wud', 'zabbix-server'] try: 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(): - # print(s) + #print(s) commands.remove(s) except KeyError: 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: if field == "stack": + commands.sort() commands_tuples = [(cmd, cmd) for cmd in commands] commands_tuples.insert(0, ("__ALL__", "[Select ALL]")) 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:", values=commands_tuples, ).run() + if value_in is None: print("Cancelled.") sys.exit(0) elif "__ALL__" in value_in: # User selected "Select ALL" value_in = commands # all real commands - value_in = value_in.sort() + + + value_in.sort() + if "pihole" in value_in: if action == "delete_stack": value_in.remove("pihole") @@ -341,7 +346,7 @@ def prompt_missing_args(args_in, defaults_in, fields, action=None,stacks=None): sys.exit(0) # value_in = input_with_default(text, default, longest+2) - + value_in.sort() if por._debug: print("Value entered:", value_in) defaults_in[f"PORTAINER_{field}".upper()] = value_in