/[projects]/misc/xenconsole/index.php
ViewVC logotype

Diff of /misc/xenconsole/index.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1895 by torben, Sun Dec 9 19:57:00 2012 UTC revision 1896 by torben, Mon Dec 10 12:20:57 2012 UTC
# Line 98  function refreshData() { Line 98  function refreshData() {
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(".", "_");
# Line 121  function refreshData() { Line 125  function refreshData() {
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')");

Legend:
Removed from v.1895  
changed lines
  Added in v.1896

  ViewVC Help
Powered by ViewVC 1.1.20