var NUT = { // UPS table DOM ids listID: "#ups_list", listBodyID: "#ups_list_body", // Field names fields: [ "manufacturer", "device-type", "support-level", "model", "comment", "driver" ], // Actual HTML table columns columns: [ ["manufacturer"], ["model","comment"], ["driver"], ["support-level"], ], // driver => connection type mappings driverMap: function(driver) { if(driver.match(/bcmxcp_usb|blazer_usb|richcomm_usb|tripplite_usb|usbhid-ups/)) return "USB"; if(driver.match(/snmp-ups|netxml-ups/)) return "Network"; return "Serial"; }, // Support level => CSS class mappings supportLevelClasses: { 0: "", 1: "red", 2: "orange", 3: "yellow", 4: "blue", 5: "green" }, tableCache: false, // Parse GET parameters from window url and return them as a hash // The call format is: // stable-hcl.html?= // Refer to docs/website/stable-hcl.txt for examples parseGetParameters: function() { var url = window.location.href; url = url.replace(/#$/, ""); var fieldPos = url.indexOf("?"); var get = {}; if(fieldPos > -1) { var fileName = url.substring(0, fieldPos); var getList = url.substring(fieldPos + 1).split("&"); for(var i = 0; i