mirror of https://git.48k.eu/ogcp
Adapt MAC retrieving to support several ogServers
Clients pills show MACs regardless of the ogServer they belong to. Flask GET /client/mac API uses "get_server_from_clients()" function to send the command to the correct ogServer.async-tree
parent
083caf00c6
commit
083cb7af7f
|
@ -387,7 +387,8 @@ def scopes_status():
|
|||
def get_client_mac():
|
||||
ip = parse_elements(request.args.to_dict())
|
||||
payload = {'client': list(ip)}
|
||||
resp = g.server.get('/client/info', payload)
|
||||
server = get_server_from_clients(list(ip))
|
||||
resp = server.get('/client/info', payload)
|
||||
client_info = resp.json()
|
||||
mac = client_info.get('mac')
|
||||
pretty_mac = (':'.join(mac[i:i+2] for i in range(0, 12, 2))).upper()
|
||||
|
|
Loading…
Reference in New Issue