mirror of https://git.48k.eu/ogcp
Fetch clients from all ogServers in the dashboard
With this commit, ogcp fetch all clients lists an join them.async-tree
parent
af0a3255b4
commit
279184df5f
|
@ -117,10 +117,18 @@ def get_client_setup(ip):
|
|||
return db_partitions
|
||||
|
||||
def get_clients(state_filter=None):
|
||||
r = g.server.get('/clients')
|
||||
clients = r.json()
|
||||
responses = multi_request('get', '/clients')
|
||||
|
||||
clients_list = []
|
||||
for r in responses:
|
||||
clients_list = clients_list + r['json']['clients']
|
||||
|
||||
clients = {}
|
||||
clients['clients'] = clients_list
|
||||
|
||||
if state_filter:
|
||||
return filter(clients.items(), lambda c: c.state == state_filter)
|
||||
|
||||
return clients
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue