mirror of
https://gitlab.sectorq.eu/jaydee/portainer.git
synced 2026-01-28 20:39:45 +01:00
build
This commit is contained in:
6
main.py
6
main.py
@@ -682,8 +682,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)
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user