X-Git-Url: http://wpitchoune.net/gitweb/?p=psensor-pkg-debian.git;a=blobdiff_plain;f=www%2Fpsensor.js;h=6f4ef7e4e4424deb24873f54fdef4fbd02a0cf57;hp=5870b2b86cc9f4547c4b4bba5741f5e56c37bf2c;hb=dcd813f21c83592155f712ff1acf450b483d8072;hpb=f055e7507526592d3a74c652f5f053701614c9c0 diff --git a/www/psensor.js b/www/psensor.js index 5870b2b..6f4ef7e 100644 --- a/www/psensor.js +++ b/www/psensor.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2011 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -46,23 +46,28 @@ function format_mem_size(s) { function type_to_str(stype) { var stype_str; - stype_str = "N/A"; - - if (stype & 0x0100) - stype_str = "Sensor"; - else if (stype & 0x0200) - stype_str = "NVidia"; - else if (stype & 0x0400) - stype_str = "HDD"; + if (stype & 0x0200) + stype_str = "NVidia "; else if (stype & 0x0800) - stype_str = "CPU Usage Percentage"; - else if (stype & 0x1000) - stype_str = "AMD"; + stype_str = "ATI/AMD "; + else + stype_str = ""; - if (stype & 0x0001) - stype_str += " Temperature"; + if (stype & 0x04000) + stype_str += "HDD "; + else if (stype & 0x08000) + stype_str += "CPU "; + else if (stype & 0x10000) + stype_str += "GPU "; + else if (stype & 0x20000) + stype_str += "Fan "; + + if (stype & 0x0001) + stype_str += "Temperature"; else if (stype & 0x0002) - stype_str += " Fan"; + stype_str += "RPM"; + else if (stype & 0x0004) + stype_str += "Load"; return stype_str; } @@ -163,19 +168,19 @@ function update_menu() { str = ""; - $.getJSON("/api/1.0/sensors", function(data) { + $.getJSON("/api/1.1/sensors", function(data) { str += "
  • Sensors\n"; str += "
  • CPU