diff --git a/main.py b/main.py index 9739e1d..fe5fc02 100755 --- a/main.py +++ b/main.py @@ -250,10 +250,10 @@ def prompt_missing_args(args_in, defaults_in, fields, action=None,stacks=None): # input(json.dumps(stacks, indent=2)) commands = [ 'authentik', 'bitwarden', 'bookstack', 'dockermon', 'duplicati', 'fail2ban', 'gitea', 'gitlab', 'grafana', 'grocy', - 'hashicorp', 'home-assistant', 'homebox','homepage', 'immich', 'influxdb', 'jupyter', 'kestra', 'mailu3', + 'hashicorp', 'home-assistant', 'homebox','homepage', 'immich', 'influxdb', 'jupyter', 'kestra', 'kopia', 'mailu3', 'mealie', 'mediacenter', 'mosquitto', 'motioneye', 'n8n', 'nebula', 'nextcloud', 'nginx', 'node-red', 'octoprint', 'ollama', 'onlyoffice', 'paperless-ngx', 'pihole', 'portainer-ce', 'rancher', 'registry', - 'regsync', 'semaphore', 'unifibrowser', 'uptime-kuma', 'watchtower', 'wazuh', 'webhub', 'wordpress', + 'regsync', 'searxng','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()) @@ -683,8 +683,4 @@ if __name__ == "__main__": sys.exit() if args.action == "refresh_status": - if args.stack == "all": - print("Stopping all stacks...") - stcks = por.get_stacks(endpoint_id=args.endpoint_id) - else: - por.refresh_status(args.stack_id) + por.refresh_status(args) \ No newline at end of file diff --git a/portainer/api.py b/portainer/api.py index 8864401..10dc7ea 100644 --- a/portainer/api.py +++ b/portainer/api.py @@ -141,6 +141,13 @@ class PortainerApi: self.get_endpoints() self.get_stacks() + def refresh_status(self, args): + for s in self.all_data['stacks']['m-s']['by_id']: + path = f'/stacks/{s}/images_status?refresh=true' + + print(path) + res = self._api_get(path, timeout=args.timeout) + def _is_number(self, s): """Check if the input string is a number.""" try: