luci-app-bmx6: Fix corner case in bmx6-info?tunnels 435/head
authorRoger Pueyo Centelles <roger.pueyo@guifi.net>
Sat, 8 Dec 2018 21:20:42 +0000 (22:20 +0100)
committerRoger Pueyo Centelles <roger.pueyo@guifi.net>
Sat, 8 Dec 2018 21:20:42 +0000 (22:20 +0100)
commit2cc3c50bed41bcbbbbfaffb85b2b98d0f1dad04e
treea9624b8f872c851ba244cc321907caad124f767c
parent9bc518e8c80a319c85ea7f85a5d1a5bdb1349daa
luci-app-bmx6: Fix corner case in bmx6-info?tunnels

The bmx6-info script will return null when no tunnels are known to BMX6.
However, the "Graph" and the "Tunnels" pages expect a JSON structure with an
array of tunnels. In case no tunnels are known to BMX6, bmx6-info now returns
'{ "tunnels" : [] }'.

Fixes #434

Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
luci-app-bmx6/bmx6/www/cgi-bin/bmx6-info