63 |
}); |
}); |
64 |
|
|
65 |
function refreshData() { |
function refreshData() { |
66 |
|
$("#logo").hide(); |
67 |
$.get('ajaxdata.php', function(xml) { |
$.get('ajaxdata.php', function(xml) { |
68 |
$(xml).find('host').each(function() { |
$(xml).find('host').each(function() { |
69 |
var memtotal = $(this).find('memtotal').text(); |
var memtotal = $(this).find('memtotal').text(); |
120 |
vm.find('.cpu_graph').show(); |
vm.find('.cpu_graph').show(); |
121 |
vm.find('.cpu_graph').attr('src', 'usagebar.php?usage=' + cpuavg); |
vm.find('.cpu_graph').attr('src', 'usagebar.php?usage=' + cpuavg); |
122 |
vm.find('.cpu_graph').attr('title', cpuavg + '%'); |
vm.find('.cpu_graph').attr('title', cpuavg + '%'); |
123 |
|
vm.find('.mem_graph').show(); |
124 |
} else { |
} else { |
125 |
if (state == "Halted") { |
if (state == "Halted") { |
126 |
vm.find('.state').css("background-image", "url('gfx/vps_topred.png')"); |
vm.find('.state').css("background-image", "url('gfx/vps_topred.png')"); |
135 |
vm.find('.mem_graph').hide(); |
vm.find('.mem_graph').hide(); |
136 |
} |
} |
137 |
|
|
138 |
}) |
}); |
139 |
|
$('#logo').show(); |
140 |
}); |
}); |
141 |
} |
} |
142 |
|
|