(function(e){var g=new function(){this.System=function(){this.category="Device";this.name="System";this.subnavigationicon="sec-nav-verlauf.png";var c=void 0;this.Init=function(){c=this;if(void 0==c||null==c)return!1;c.setCycleTime(2E3);c.setCommunicationObj(e.DevMan.getCommunicationModule(e.DevMan.CommunicationType.mdp));c.addParameter("GENERAL_Device_Name",!0);c.addParameter("TIME_Property_Textual_DateTime_presentation",!0);c.addParameter("OS_Header_Property_OSName",!1);c.addParameter("EWF_VolumeName_Property_Len",
!1);c.addParameter("EWF_State_Property_Len",!0);c.addParameter("FBWF_CurrentState_Property_State",!0);c.addParameter("RAID_Property_ControllerInfo_State",!0);c.addParameter("UPS_Information_Property_PowerStatus",!0);c.addParameter("UPS_Information_Property_CommunicationStatus",!0);c.addParameter("UPS_Information_Property_BatteryStatus",!0);c.addParameter("CPU_Property_Current_CPU_Usage",!0);winxp?(c.addParameter("Memory_Property_Program_Memory_Allocated_64",!0),c.addParameter("Memory_Property_Program_Memory_Available_64",
!0)):(c.addParameter("Memory_Property_Program_Memory_Allocated",!0),c.addParameter("Memory_Property_Program_Memory_Available",!0));c.addParameter("CPU_Property_Current_CPU_Temperature",!0);c.addParameter("Mainboard_Information_Property_MinBoardTemperature",!0);c.addParameter("Mainboard_Information_Property_MaxBoardTemperature",!0);c.addParameter("Mainboard_Information_Property_MainboardTemperature",!0);c.addParameter("Fan_Property_AdapterName",!1);c.addParameter("Fan_Properties_Property_Speed",!0);
c.addParameter("DEVICE_IPC_Serial_Number",!0);c.addParameter("Mainboard_VoltageInformationLocation_Property_Len",!1);c.addParameter("Mainboard_VoltageInformationVoltage_Property_Len",!0);c.addParameter("GENERAL_OS_and_Image_Version",!1);c.addParameter("GENERAL_Hardware_Version",!1);c.setOnInitStaticPage(g);c.setOnDisplayValues(h);c.setOnWriteFailed(k);c.setOnWriteResult(l);return!0};var g=function(b){var a="";if(void 0!=e.ProductName||b[0].getHasValues()||b[1].getHasValues()||b[2].getHasValues()||
b[19].getHasValues()||b[21].getHasValues()||b[22].getHasValues()||b[23].getHasValues())b[0].getHasValues()?(a+='<table style="margin-bottom: 5px"><tr><td class="td_trans"><h3>Device</h3></td>',a+='<td class="td_Action_trans">'+(new ControlLib.SmallButton).Create("btnWriteComputername","save","Save Computername")+(new ControlLib.SmallButton).Create("btnWriteComputername_Cancel","delete")+"</td>",a+="</tr></table>",a+="<table>",a+='<tr><td class="td_FirstColumn">Name</td><td>'+(new ControlLib.Textbox).Create(b[0].parameterName)+
"</td></tr> "):(a+="<h3>Device</h3>",a+="<table>"),b[1].getHasValues()&&(a+='<tr><td class="td_FirstColumn">Date Time</td><td><div id="'+b[1].parameterName+'"></div></td></tr> '),b[2].getHasValues()&&(a+='<tr><td class="td_FirstColumn">Operating System</td><td><div id="'+b[2].parameterName+'"></div></td></tr> '),b[22].getHasValues()&&0<e.Helper.getOsAndImageVersion(b[22].values[0].data).length&&(a+='<tr><td class="td_FirstColumn">Image Version</td><td><div id="'+b[22].parameterName+'"></div></td></tr> '),
b[23].getHasValues()&&0<e.Helper.getHardwareVersion(b[23].values[0].data).length&&(a+='<tr><td class="td_FirstColumn">Hardware Version</td><td><div id="'+b[23].parameterName+'"></div></td></tr> '),b[19].getHasValues()&&(a+='<tr><td class="td_FirstColumn">Serial number of IPC</td><td><div id="'+b[19].parameterName+'"></div></td></tr> '),void 0!=e.ProductName&&void 0!=e.ProductMajor&&void 0!=e.ProductMinor&&void 0!=e.ProductRevision&&void 0!=e.ProductBuild&&(a+='<tr><td class="td_FirstColumn">Device Manager Version</td><td>'+
e.ProductMajor+"."+e.ProductMinor+"."+e.ProductRevision+"."+e.ProductBuild+"</div></td></tr> "),a+="</table>",a+="<br/>";if(b[10].getHasValues()||b[11].getHasValues()||b[12].getHasValues()||b[13].getHasValues()||b[14].getHasValues()||b[15].getHasValues()||b[16].getHasValues()){a+='<div id="graphs" style="overflow:auto;min-width:250px;">';if(b[10].getHasValues()||b[11].getHasValues()&&b[12].getHasValues())a+='   <div id="workloads" style="float:left;">',a+="   <h3>Workload</h3>",b[10].getHasValues()&&
(a+='       <div id="'+b[10].parameterName+'"></div>'),b[11].getHasValues()&&b[12].getHasValues()&&(winxp?-1!=b[11].values[0].data&&-1!=b[12].values[0].data&&(a+='       <div id="'+b[11].parameterName+'"></div>'):a+='       <div id="'+b[11].parameterName+'"></div>'),a+="   </div>";if(b[13].getHasValues()||b[16].getHasValues())a+='   <div id="temperatures" style="float:left;">',a+="       <h3>Temperature</h3>",b[13].getHasValues()&&(a+='       <div id="'+b[13].parameterName+'"></div>'),b[16].getHasValues()&&
(a+='       <div id="'+b[16].parameterName+'"></div>'),a+="   </div>";a+='<div style="clear:both"></div>';a+="</div>"}if(b[17].getHasValues()||b[18].getHasValues()){for(var a=a+"<h3>FAN</h3>",a=a+"<table>",d=Math.max(b[17].moduleCount,b[18].moduleCount),f=0;f<d;f++)a+="<tr>",a+='<td class="td_FirstColumn"><div id="'+b[17].parameterName+f+'"></div></td>',a+='<td><div id="'+b[18].parameterName+f+'"></div></td>',a+="</tr>";a+="</table>";a+="<br/>"}if(b[7].getHasValues()||b[8].getHasValues()||b[9].getHasValues())a+=
"<h3>UPS</h3>",a+="<table>",b[7].getHasValues()&&(a+='<tr><td class="td_FirstColumn">Power Status</td><td><div id="'+b[7].parameterName+'"></div></td></tr> '),b[8].getHasValues()&&(a+='<tr><td class="td_FirstColumn">Communication Status</td><td><div id="'+b[8].parameterName+'"></div></td></tr> '),b[9].getHasValues()&&(a+='<tr><td class="td_FirstColumn">Battery Status</td><td><div id="'+b[9].parameterName+'"></div></td></tr> '),a+="</table>",a+="<br/>";b[6].getHasValues()&&(a+="<div>",a+="<h3>RAID</h3>",
a+="<table >",a+='<tr><td class="td_FirstColumn">Controller Status</td><td><div id="'+b[6].parameterName+'"></div></td></tr> ',a+="</table>",a+="</div>",a+="<br/>");if(b[20].getHasValues()&&b[21].getHasValues())for(d=b[20].values[0].length,f=0;f<d;f++)if(13==b[20].values[0][f].data&&b[21].values[0].length>f){a+="<h3>Voltage</h3>";a+="<table>";a+='<td class="td_FirstColumn">Battery (mV)</td>';a+='<td><div id="'+b[21].parameterName+'"></div></td>';a+="</table>";a+="<br/>";break}if(b[3].getHasValues()&&
b[4].getHasValues()||b[5].getHasValues()){a+="<h3>WriteFilter</h3>";if(b[3].getHasValues()||b[4].getHasValues())a+="<div id=WriteFilter_EWF></div>";b[5].getHasValues()&&(a+="<h4>Filebased Write Filter (FBWF)</h4>",a+="<table>",a+='<tr><td class="td_FirstColumn">FBWF Status</td><td><div id="'+b[5].parameterName+'"></div></td></tr> ',a+="</table>");a+="<br/>"}a+='<div id="status"></div>';c.writeActivePage(a);c.setElementOnClick("btnWriteComputername",function(a){return function(){var a=[],b=[],d=[],
e=c.getRequestParamIDs();if(c.isLocked(e[0].parameterName)){var f=c.getElementValue(e[0].parameterName);a.push(e[0].parameterName);b.push(0);d.push(f)}0<a.length&&(c.Write(a,b,d),Helper.ShowLoading())}}(0));c.setElementOnClick("btnWriteComputername_Cancel",function(a){return function(){var a=c.getRequestParamIDs();c.removeLock(a[0].parameterName)}}(0));c.addLockListener(b[0].parameterName);return!0},h=function(b){b[0].getHasValues()&&c.setElementValue(b[0].parameterName,b[0].values[0].data);if(b[1].getHasValues()){var a=
new Helper.TextualDateTime_ISO8601(b[1].values[0].data);a.isValidDate&&(a=a.getDateString()+" "+a.getTimeString(),c.writeElement(b[1].parameterName,a))}b[2].getHasValues()&&c.writeElement(b[2].parameterName,b[2].values[0].data);b[22].getHasValues()&&(a=e.Helper.getOsAndImageVersion(b[22].values[0].data),0<a.length&&c.writeElement(b[22].parameterName,a));b[23].getHasValues()&&(a=e.Helper.getHardwareVersion(b[23].values[0].data),0<a.length&&c.writeElement(b[23].parameterName,a));b[19].getHasValues()&&
c.writeElement(b[19].parameterName,b[19].values[0].data);if(b[3].getHasValues()&&b[4].getHasValues()){var a="<h4>Enhanced Write Filter (EWF)</h4><table>",a=a+'<tr><th style="width:150px">Volume name</th><th>State</th></tr>',d=0;b[3].getHasValues()&&(d=b[3].values[0].length);var f=0;b[4].getHasValues()&&(f=b[4].values[0].length);f=Math.max(d,f);for(d=0;d<f;d++){a+="<tr>";try{a+='<td class="td_FirstColumn"><div id="'+b[3].parameterName+d+'">'+b[3].values[0][d].getOutput()+"</div></td>"}catch(m){a+=
'<td class="td_FirstColumn"></td>'}try{a+='<td><div id="'+b[4].parameterName+d+'">'+e.Helper.getEWFStatusString(b[4].values[0][d].getOutput())+"</div></td>"}catch(g){a+="<td></td>"}a+="</tr>"}a+="</table>";a+="<br/>";c.writeElement("WriteFilter_EWF",a)}b[5].getHasValues()&&c.writeElement(b[5].parameterName,e.Helper.getStatusString(b[5].values[0].data));b[6].getHasValues()&&c.writeElement(b[6].parameterName,e.Helper.getRaidState(b[6].values[0].data));b[7].getHasValues()&&c.writeElement(b[7].parameterName,
e.Helper.getUPSPowerStatusInfo(b[7].values[0].data));b[8].getHasValues()&&c.writeElement(b[8].parameterName,e.Helper.getUPSCommunicationStatusInfo(b[8].values[0].data));b[9].getHasValues()&&c.writeElement(b[9].parameterName,e.Helper.getUPSBatteryStatusInfo(b[9].values[0].data));b[10].getHasValues()&&c.writeElement(b[10].parameterName,(new ControlLib.Bargraph).CreateDefaultBar("res/modules/cpu/kachelicons-sw-groesse-1-cpu_32.png","CPU","%",100,b[10].values[0].data));b[11].getHasValues()&&b[12].getHasValues()&&
(winxp?-1!=b[11].values[0].data&&-1!=b[12].values[0].data&&c.writeElement(b[11].parameterName,(new ControlLib.Bargraph).CreateDefaultBar("res/modules/ram/kachelicons-sw-groesse-1-ram_32.png","Memory","%",100,e.Helper.getMemoryUsagePercent(b[11].values[0].data,b[12].values[0].data))):c.writeElement(b[11].parameterName,(new ControlLib.Bargraph).CreateDefaultBar("res/modules/ram/kachelicons-sw-groesse-1-ram_32.png","Memory","%",100,e.Helper.getMemoryUsagePercent(b[11].values[0].data,b[12].values[0].data))));
b[13].getHasValues()&&c.writeElement(b[13].parameterName,(new ControlLib.Bargraph).CreateDefaultBar("res/modules/cpu/kachelicons-sw-groesse-1-cpu_32.png","CPU","\u00b0C",100,b[13].values[0].data));b[15].getHasValues()&&b[16].getHasValues()&&c.writeElement(b[16].parameterName,(new ControlLib.Bargraph).CreateDefaultBar("res/modules/mainboard/kachelicons-sw-groesse-1-mainboard32.png","Mainboard","\u00b0C",100,b[16].values[0].data));if(b[17].getHasValues()||b[18].getHasValues())for(f=Math.max(b[17].moduleCount,
b[18].moduleCount),d=0;d<f;d++)b[17].values.length>d&&c.writeElement(b[17].parameterName+d,b[17].values[d].getOutput()+" (rpm)"),b[18].values.length>d&&c.writeElement(b[18].parameterName+d,b[18].values[d].getOutput());if(b[20].getHasValues()&&b[21].getHasValues())for(a=b[20].values[0].length,d=0;d<a;d++)if(13==b[20].values[0][d].data&&b[21].values[0].length>d){c.writeElement(b[21].parameterName,b[21].values[0][d].getOutput());break}},k=function(b){Helper.HideLoading();e.DevMan.getErrorQueue().AddError(b.requestStatus,
b.requestStatusText);c.clearLocks()},l=function(b,a){Helper.HideLoading();for(var d=0;d<b.length;d++)0<a[d]&&e.DevMan.getErrorQueue().AddError(a[d]);for(d=0;d<b.length;d++)c.removeLock(b[d].name);for(d=0;d<b.length;d++)if(0==a[d]&&"GENERAL_Device_Name"==b[d].name&&confirm("You must restart your computer to apply these changes.\nDo you really want to reboot the computer?")){var f=c.getCommunicationObj().getServiceTransferParameterSize("MISC_Function_Reboot"),g=[];g.push(f);g.push(0);Helper.RebootActive();
c.executeCommand("MISC_Function_Reboot",0,g)}}};this.System.prototype=new e.Page_Template.Template};e.DevMan.RegisterModule(new g.System,e.DevMan.ModuleType.Website)})(window);
