98 |
var session = $(this).find('session').text(); |
var session = $(this).find('session').text(); |
99 |
var os = $(this).find('os').text(); |
var os = $(this).find('os').text(); |
100 |
var cpuavg = $(this).find('cpuavg').text(); |
var cpuavg = $(this).find('cpuavg').text(); |
101 |
|
var curmem = $(this).find('curmem').text(); |
102 |
|
var maxmem = $(this).find('maxmem').text(); |
103 |
|
|
104 |
|
var mempercent = Math.round( (curmem*100) / maxmem ); |
105 |
|
|
106 |
name = name.replace(" ", "_"); |
name = name.replace(" ", "_"); |
107 |
name = name.replace(".", "_"); |
name = name.replace(".", "_"); |
125 |
vm.find('.cpu_graph').show(); |
vm.find('.cpu_graph').show(); |
126 |
vm.find('.cpu_graph').attr('src', 'usagebar.php?usage=' + cpuavg); |
vm.find('.cpu_graph').attr('src', 'usagebar.php?usage=' + cpuavg); |
127 |
vm.find('.cpu_graph').attr('title', cpuavg + '%'); |
vm.find('.cpu_graph').attr('title', cpuavg + '%'); |
128 |
|
|
129 |
vm.find('.mem_graph').show(); |
vm.find('.mem_graph').show(); |
130 |
|
vm.find('.mem_graph').attr('src', 'usagebar.php?usage=' + mempercent); |
131 |
|
vm.find('.mem_graph').attr('title', curmem + ' / ' + maxmem + ' MB' ); |
132 |
} else { |
} else { |
133 |
if (state == "Halted") { |
if (state == "Halted") { |
134 |
vm.find('.state').css("background-image", "url('gfx/vps_topred.png')"); |
vm.find('.state').css("background-image", "url('gfx/vps_topred.png')"); |