mirror of
https://gitlab.sectorq.eu/jaydee/portainer.git
synced 2026-03-14 23:00:01 +01:00
build
This commit is contained in:
@@ -1025,6 +1025,7 @@ class PortainerApi:
|
||||
#print(longest)
|
||||
ok = "\033[92m✔\033[0m"
|
||||
err = "\033[91m✖\033[0m"
|
||||
service_to_update = []
|
||||
for service_id in service_ids:
|
||||
print("\033[?25l", end="")
|
||||
print(f"{service_dict[service_id]:<{longest}} ", end="", flush=True)
|
||||
@@ -1037,20 +1038,23 @@ class PortainerApi:
|
||||
return []
|
||||
|
||||
if resp['Status'] == "outdated":
|
||||
service_to_update.append(service_dict[service_id])
|
||||
if pull:
|
||||
if service_dict[service_id] in self.args.excluded:
|
||||
continue
|
||||
self.restart_srv(service_id, pull)
|
||||
#print(f"Service {service_dict[service_id]:<{longest}} : updated")
|
||||
self.gotify_message(f"Service {service_dict[service_id]} updated")
|
||||
print(f"{ok} updated")
|
||||
else:
|
||||
print(f"\r\033[4m{service_dict[service_id]:<{longest}}\033[0m ", end="", flush=True)
|
||||
#print(f"\033[4m{service_dict[service_id]:<{longest}} {err}\033[0m")
|
||||
self.gotify_message(f"Service update available for {service_dict[service_id]}")
|
||||
print(err)
|
||||
else:
|
||||
print(ok)
|
||||
if pull:
|
||||
self.gotify_message(f"Services updated: {', '.join(service_to_update)}")
|
||||
else:
|
||||
self.gotify_message(f"Service update available: {', '.join(service_to_update)}")
|
||||
self.gotify_message(f"Service update process finished")
|
||||
print("\033[?25h", end="")
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user