Compare commits

...

9 Commits

Author SHA1 Message Date
8ba22f79b9 build 2026-01-24 21:07:26 +01:00
ddeb67750f build 2026-01-24 21:05:09 +01:00
12ff88f8e8 build 2026-01-24 21:03:32 +01:00
9d27e804a5 build 2026-01-24 21:02:34 +01:00
1f0a19b7b1 build 2026-01-24 21:00:19 +01:00
5adfbbcf3d build 2026-01-24 20:59:37 +01:00
0dda82be87 build 2026-01-24 20:57:21 +01:00
1a54c1e341 Merge branch 'main' of gitlab.sectorq.eu:jaydee/portainer 2026-01-24 20:55:55 +01:00
8d4bd382ee build 2026-01-24 20:55:51 +01:00
2 changed files with 11 additions and 9 deletions

11
main.py
View File

@@ -44,7 +44,7 @@ else:
raise Exception("Failed to authenticate with Vault")
# Specify the mount point of your KV engine
VERSION = "0.1.54"
VERSION = "0.1.55"
defaults = {
"endpoint_id": "vm01",
@@ -410,18 +410,13 @@ if __name__ == "__main__":
]
selected_action = radiolist_dialog(
title="Select one service",
title=f"Select one service - version: {VERSION}",
text="Choose a service:",
values=actions
).run()
print("Selected:", selected_action)
# print("Possible actions: \n")
# i = 1
# for a in actions:

View File

@@ -972,7 +972,14 @@ class PortainerApi:
def update_service(self):
all_services = self.get_services(self.get_endpoint_id())
#input(all_services)
if self.args.debug:
print(all_services)
if all_services == 503:
print("No services found on this endpoint.")
return False
if len(all_services) == 0:
print("No services found on this endpoint.")
return False
service_tuples = [(s['ID'], s['Spec']['Name']) for s in all_services]
service_tuples = sorted(service_tuples, key=lambda x: x[1])
service_dict = dict(service_tuples)