Local modifications to ClusterLabs/Anvil by Alteeve
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

30 lines
1.1 KiB

// $.ajaxSetup({
// cache: false
// });
$(function() {
var say_up = $('#network_link_state').data('up');
var say_down = $('#network_link_state').data('down');
var say_speed_suffix = $('#network_link_speed').data('mbps');
//console.log('say_up: ['+say_up+'], say_down: ['+say_down+'], say_speed_suffix: ['+say_speed_suffix+']');
if($("#network_status").length) {
//alert('network status exists.');
setInterval(function() {
$.getJSON('/status/network.json', { get_param: 'value' }, function(data) {
$.each(data.networks, function(index, element) {
//console.log('entry: ['+index+'], name: ['+element.name+'], mac: ['+element.mac+'], link: ['+element.link+']');
var link = say_up;
if (element.link == 0) {
link = say_down;
}
$("#"+element.name+"_mac").text(element.mac);
$("#"+element.name+"_link").text(link);
$("#"+element.name+"_speed").text(element.speed+' '+say_speed_suffix);
});
});
}, 1000);
}
if($("#disk_status").length) {
//alert('disk status exists.');
//$("#bar").text('B');
}
});