luci-app-bmx7: fix displaying values
Suggested-by: FreifunkUFO <ufo@rund.freifunk.net> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
parent
f193364c2c
commit
0169410392
5 changed files with 11 additions and 11 deletions
|
@ -20,7 +20,7 @@
|
|||
|
||||
<script type="text/javascript" src="<%=resource%>/bmx7/js/polling.js"></script>
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
new TablePooler(10,"/cgi-bin/bmx7-info", {'$originators':''}, "nodes_div", function(st){
|
||||
new TablePooler(10,"/cgi-bin/bmx7-info", {'originators':''}, "nodes_div", function(st){
|
||||
var originators = st.originators;
|
||||
var res = Array();
|
||||
originators.forEach(function(originator,i){
|
||||
|
|
|
@ -92,7 +92,7 @@
|
|||
var displayExtraInfo = function ( id ) {
|
||||
document.getElementById('extra-info').innerHTML = document.getElementById(id).innerHTML;
|
||||
}
|
||||
new TablePooler(5,"/cgi-bin/bmx7-info", {'$originators':''}, "nodes_div", function(st){
|
||||
new TablePooler(5,"/cgi-bin/bmx7-info", {'originators':''}, "nodes_div", function(st){
|
||||
var infoicon = "<%=resource%>/bmx7/world_small.png";
|
||||
var originators = st.originators;
|
||||
var res = Array();
|
||||
|
|
|
@ -88,14 +88,14 @@
|
|||
</div>
|
||||
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
new TablePooler(1,"/cgi-bin/bmx7-info", {'$info':''}, "config_div", function(st){
|
||||
new TablePooler(10,"/cgi-bin/bmx7-info", {'info':''}, "config_div", function(st){
|
||||
var res = Array();
|
||||
var sta = st.info[0].status;
|
||||
res.push([sta.shortId, sta.name, sta.primaryIp, sta.nodeKey, sta.shortDhash, sta.revision]);
|
||||
return res;
|
||||
});
|
||||
|
||||
new TablePooler(1,"/cgi-bin/bmx7-info", {'$info':''}, "status_div", function(st){
|
||||
new TablePooler(10,"/cgi-bin/bmx7-info", {'info':''}, "status_div", function(st){
|
||||
var res = Array();
|
||||
var sta = st.info[0].status;
|
||||
var mem = st.info[3].memory.bmx7;
|
||||
|
@ -105,7 +105,7 @@
|
|||
return res;
|
||||
});
|
||||
|
||||
new TablePooler(1,"/cgi-bin/bmx7-info", {'$info':''}, "ifaces_div", function(st){
|
||||
new TablePooler(10,"/cgi-bin/bmx7-info", {'info':''}, "ifaces_div", function(st){
|
||||
var res = Array();
|
||||
var ifaces = st.info[1].interfaces;
|
||||
|
||||
|
@ -115,7 +115,7 @@
|
|||
return res;
|
||||
});
|
||||
|
||||
new TablePooler(1,"/cgi-bin/bmx7-info", {'$info':''}, "links_div", function(st){
|
||||
new TablePooler(10,"/cgi-bin/bmx7-info", {'info':''}, "links_div", function(st){
|
||||
var res = Array();
|
||||
links = st.info[2].links;
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
</div>
|
||||
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
new TablePooler(5,"/cgi-bin/bmx7-info", {'$tunnels':''}, "tunnels_div", function(st){
|
||||
new TablePooler(5,"/cgi-bin/bmx7-info", {'tunnels':''}, "tunnels_div", function(st){
|
||||
var tunicon = "<%=resource%>/icons/tunnel.png";
|
||||
var tunicon_dis = "<%=resource%>/icons/tunnel_disabled.png";
|
||||
var applyicon = "<%=resource%>/cbi/apply.gif";
|
||||
|
|
|
@ -90,7 +90,7 @@ if [ "${QUERY##*/}" == "all" ]; then
|
|||
QALL=1
|
||||
fi
|
||||
|
||||
if [ "$QUERY" == '$info' ]; then
|
||||
if [ "$QUERY" == 'info' ]; then
|
||||
echo '{ "info": [ '
|
||||
print_query status
|
||||
echo -n ","
|
||||
|
@ -100,7 +100,7 @@ if [ "$QUERY" == '$info' ]; then
|
|||
echo "] }"
|
||||
fi
|
||||
|
||||
if [ "$QUERY" == '$neighbours' ]; then
|
||||
if [ "$QUERY" == 'neighbours' ]; then
|
||||
QALL=1
|
||||
echo '{ "neighbours": [ '
|
||||
echo '{ "originators": '
|
||||
|
@ -111,11 +111,11 @@ if [ "$QUERY" == '$neighbours' ]; then
|
|||
echo "} ] }"
|
||||
exit 0
|
||||
|
||||
else if [ "$QUERY" == '$tunnels' ]; then
|
||||
else if [ "$QUERY" == 'tunnels' ]; then
|
||||
bmx7 -c --jshow tunnels /r=0
|
||||
exit 0
|
||||
|
||||
else if [ "$QUERY" == '$originators' ]; then
|
||||
else if [ "$QUERY" == 'originators' ]; then
|
||||
bmx7 -c --jshow originators /r=0
|
||||
exit 0
|
||||
|
||||
|
|
Loading…
Reference in a new issue