mirror of https://github.com/aredn/aredn.git
Implement nodes=1 in sysinfo.json to return number of mesh nodes (#951)
* Implement nodes=1 in sysinfo.json to return number of mesh nodes Fixes #950 * Bump api_version in sysinfo.json Introduce new parameter nodes=1
This commit is contained in:
parent
48ee7595ce
commit
84ea30184c
|
@ -55,7 +55,7 @@ end
|
||||||
info={}
|
info={}
|
||||||
|
|
||||||
-- API version
|
-- API version
|
||||||
info['api_version']="1.11"
|
info['api_version']="1.12"
|
||||||
|
|
||||||
|
|
||||||
-- NODE name
|
-- NODE name
|
||||||
|
@ -194,6 +194,11 @@ if string.find(nixio.getenv("QUERY_STRING"):lower(),"lqm=1") then
|
||||||
info['lqm']=lqm
|
info['lqm']=lqm
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- MESH NODES COUNT
|
||||||
|
if string.find(nixio.getenv("QUERY_STRING"):lower(),"nodes=1") then
|
||||||
|
info['nodes']=aredn_info.getOLSRInfo()
|
||||||
|
end
|
||||||
|
|
||||||
-- Output the HTTP header for JSON
|
-- Output the HTTP header for JSON
|
||||||
json_header()
|
json_header()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue