diff options
Diffstat (limited to 'usr')
-rw-r--r-- | usr/local/www/javascript/index/ajax.js | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/usr/local/www/javascript/index/ajax.js b/usr/local/www/javascript/index/ajax.js index 50e0145..d2ac90e 100644 --- a/usr/local/www/javascript/index/ajax.js +++ b/usr/local/www/javascript/index/ajax.js @@ -150,12 +150,16 @@ function updateInterfaces(x){ interfaces_split = x.split("~"); interfaces_split.each(function(iface){ details = iface.split(","); + if (details[2] == '') + ipv4_details = ''; + else + ipv4_details = details[2] + '<br />'; switch(details[1]) { case "up": jQuery('#' + details[0] + '-up').css("display","inline"); jQuery('#' + details[0] + '-down').css("display","none"); jQuery('#' + details[0] + '-block').css("display","none"); - jQuery('#' + details[0] + '-ip').html(details[2]); + jQuery('#' + details[0] + '-ip').html(ipv4_details); jQuery('#' + details[0] + '-ipv6').html(details[3]); jQuery('#' + details[0] + '-media').html(details[4]); break; @@ -163,14 +167,14 @@ function updateInterfaces(x){ jQuery('#' + details[0] + '-down').css("display","inline"); jQuery('#' + details[0] + '-up').css("display","none"); jQuery('#' + details[0] + '-block').css("display","none"); - jQuery('#' + details[0] + '-ip').html(details[2]); + jQuery('#' + details[0] + '-ip').html(ipv4_details); jQuery('#' + details[0] + '-ipv6').html(details[3]); jQuery('#' + details[0] + '-media').html(details[4]); break; case "block": - jQuery('#' + details[0] + '-block').css("display","inline"); - jQuery('#' + details[0] + '-down').css("display","none"); - jQuery('#' + details[0] + '-up').css("display","none"); + jQuery('#' + details[0] + '-block').css("display","inline"); + jQuery('#' + details[0] + '-down').css("display","none"); + jQuery('#' + details[0] + '-up').css("display","none"); break; } }); |