Adding a cgi-bin script which allows to query a node's respondd over HTTP.
This is especially useful when the response is expected to be large and
a UDP response would lead to an unreliable transfer of multiple IP
fragments, like for the upcoming "statistics-extended" respondd
provider. HTTP/TCP is then the more reliable approach.
Query examples with HTTP GET:
$ curl --compressed "http://<IP6ADDR>/cgi-bin/respondd"
-> defaults to nodeinfo
$ curl --compressed "http://<IP6ADDR>/cgi-bin/respondd?nodeinfo+statistics"
Query examples with HTTP POST:
$ curl --data "" --compressed "http://<IP6ADDR>/cgi-bin/respondd"
-> defaults to nodeinfo
$ curl --data "nodeinfo statistics" --compressed "http://<IP6ADDR>/cgi-bin/respondd"
Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
The network.wireless status ubus call only returns the configured
channel from UCI, breaking the status page in outdoor mode, where the
configuration contains 'auto' instead of a number.
Fixes: 0d3fa6b59b ("gluon-status-page: use ubus to get radio channels")
Closes#2336
In js `return` does behave like `continue` in a forEach() iteration.
The fixed function was intended to return nothing on error and does so
now, instead of a shorter (useless) array like before.
Fixes the display of client counts, which are numbers and not strings
in the respondd data.
Fixes: 3a885a1b22 ("gluon-status-page: make "gateway nexthop" a link (#2278)")
Do not depend on the respondd-airtime module just to get the configured
channels. This removes the display of the frequency in addition to the
channel, as it is not readily available.
In addition, the translation string is improved to allow for text after
the channel number.
This code is usually running on an embedded CPU without FPU. In
addtition to its inefficience, the algorithm is also much harder to
understand.
Replace the logarithm formula with a simple loop.
This adds the wireless client count for 2.4GHz and 5 GHz radios to the
status page. Previously, only the total client count advertised by
the mesh protocol was visible.
This reverts commits
- caf2dd037b.
- 07ebac6a49
- 55eff45f96
I accidentally pushed these commits as I had them lying around on a
dirty checkout I did testing on.