(function(e){var k=new function(){this.HDD=function(){this.category="Hardware";this.name="HDD";this.subnavigationicon="sec-nav-hdd.png";var d=void 0;this.Init=function(){d=this;if(void 0==d||null==d)return!1;d.setCycleTime(2E3);d.setCommunicationObj(e.DevMan.getCommunicationModule(e.DevMan.CommunicationType.mdp));d.addParameter("DiskManagement_DriveLetter_Property_Len",!0);d.addParameter("DiskManagement_VolumeLabel_Property_Len",!0);d.addParameter("DiskManagement_FileSystem_Property_Len",!0);d.addParameter("DiskManagement_DriveType_Property_Len",
!0);d.addParameter("SiliconDrive_Information_Property_TotalEraseCounts",!1);d.addParameter("SiliconDrive_Information_Property_DriveUsage",!1);d.addParameter("SiliconDrive_Information_Property_NumberOfSpares",!1);d.addParameter("SiliconDrive_Information_Property_SparesUsed",!1);d.addParameter("FlashDriveMonitoring_Serialnumber_Property_Len",!0);d.addParameter("FlashDriveMonitoring_Slot_Property_Len",!0);d.addParameter("FlashDriveMonitoring_DriveLetters_Property_Len",!0);d.addParameter("FlashDriveMonitoring_DriveName_Property_Len",
!0);d.addParameter("FlashDriveMonitoring_DriveType_Property_Len",!0);d.addParameter("FlashDriveMonitoring_EraseCountAverage_Property_Len",!0);d.addParameter("FlashDriveMonitoring_EraseCountTotal_Property_Len",!0);d.addParameter("FlashDriveMonitoring_CyclesLeft_Property_Len",!0);d.addParameter("FlashDriveMonitoring_SpareBlocksRemaining_Property_Len",!0);d.addParameter("FlashDriveMonitoring_SpareBlocksInitial_Property_Len",!0);d.addParameter("FlashDriveMonitoring_SpareBlocksLeft_Property_Len",!0);d.setOnInitStaticPage(k);
d.setOnDisplayValues(m);return!0};var k=function(b){var a="";if(b[0].getHasValues()||b[1].getHasValues()||b[2].getHasValues()||b[3].getHasValues()||!winxp)winxp?(a+='<table style="margin-bottom: 5px"><tr><td class="td_trans"><h3>Drives</h3></td>',a+='<td class="td_Action_trans">'+(new ControlLib.SmallButton).Create("btnEditVolumeLabels","configure","Configure Volume Labels")+"</td>",a+="</tr></table>"):a+="<h3>Drives</h3>",a+='<div id="drives"></div>';if(b[4].getHasValues()||b[5].getHasValues()||
b[6].getHasValues()||b[7].getHasValues())a+="<h3>Silicon Drives</h3>",a+="<table>",b[4].getHasValues()&&(a+='<tr><td class="td_FirstColumn">Total Erase Counts</td><td><div id="'+b[4].parameterName+'"></div></td></tr> '),b[5].getHasValues()&&(a+='<tr><td class="td_FirstColumn">Drive Usage (%)</td><td><div id="'+b[5].parameterName+'"></div></td></tr> '),b[6].getHasValues()&&(a+='<tr><td class="td_FirstColumn">Number Of Spares</td><td><div id="'+b[6].parameterName+'"></div></td></tr> '),b[7].getHasValues()&&
(a+='<tr><td class="td_FirstColumn">Spares Used</td><td><div id="'+b[7].parameterName+'"></div></td></tr> '),a+="</table>",a+="<br>";b[8].getHasValues()&&(a+="<h3>S.M.A.R.T.</h3>",a+="<table>",a+='<tr><td class="td_FirstColumn_Important">Warning</td>',a+="<td>",a+="You must replace your drives every 10 years!<br>...<br>......<br>...<br>......",a+="</td></tr>",a+="</table>",a+="<br>",a+='<div id="div_smart"></div>');a+='<div id="status"></div>';d.writeActivePage(a);(b[0].getHasValues()||b[1].getHasValues()||
b[2].getHasValues()||b[3].getHasValues())&&winxp&&d.setElementOnClick("btnEditVolumeLabels",function(a){return function(){d.ChangePage("Software","File System")}}(0));return!0},m=function(b){if(b[0].getHasValues()||b[1].getHasValues()||b[2].getHasValues()||b[3].getHasValues()||!winxp){var a;a="<table><tr><th>Volume</th><th>Label</th><th>File System</th><th>Type</th></tr>";var f=0;b[0].getHasValues()&&(f=b[0].values[0].length);var c=0;b[1].getHasValues()&&(c=b[1].values[0].length);var g=0;b[2].getHasValues()&&
(g=b[2].values[0].length);var h=0;b[3].getHasValues()&&(h=b[3].values[0].length);f=Math.min(f,c,g,h);for(c=0;c<f;c++){a+="<tr>";try{a+='<td class="td_FirstColumn"><div id="'+b[0].parameterName+c+'">'+b[0].values[0][c].getOutput()+"</div></td>"}catch(k){a+="<td></td>"}try{a+='<td><div id="'+b[1].parameterName+c+'">'+b[1].values[0][c].getOutput()+"</div></td>"}catch(m){a+="<td></td>"}try{a+='<td><div id="'+b[2].parameterName+c+'">'+b[2].values[0][c].getOutput()+"</div></td>"}catch(n){a+="<td></td>"}try{a+=
'<td><div id="'+b[3].parameterName+c+'">'+e.Helper.getDriveType(b[3].values[0][c].getOutput())+"</div></td>"}catch(p){a+="<td></td>"}a+="</tr>"}a+="</table>";a+="<br>";d.writeElement("drives",a)}b[4].getHasValues()&&d.writeElement(b[4].parameterName,b[4].values[0].data);b[5].getHasValues()&&d.writeElement(b[5].parameterName,b[5].values[0].data);b[6].getHasValues()&&d.writeElement(b[6].parameterName,b[6].values[0].data);b[7].getHasValues()&&d.writeElement(b[7].parameterName,b[7].values[0].data);if(b[8].getHasValues()){a=
"";f=b[8].values[0].length;for(c=0;c<f;c++)if(!b[8].values[0][c].getHasError()){var l=h=g=!1;a+="<h4>";a=b[11].values[0][c].getHasError()?a+("(SNM: "+b[8].values[0][c].data):a+(b[11].values[0][c].data+" (SNM: "+b[8].values[0][c].data);b[12].values[0][c].getHasError()||(a+=", "+b[12].values[0][c].data);b[9].values[0][c].getHasError()||(a+=", Port: "+b[9].values[0][c].data);b[10].values[0][c].getHasError()||(a+=", Volumes: "+b[10].values[0][c].data);a+=")";a+="</h4>";b[13].values[0][c].getHasError()||
b[14].values[0][c].getHasError()||b[15].values[0][c].getHasError()||(g=!0,a+="<table>",a+="<tr>",a+='<td class="td_FirstColumn">Erase Count Average</td>',a+='<td><div id="'+b[13].parameterName+c+'">'+b[13].values[0][c].data+"</div></td>",a+="</tr>",a+="<tr>",a+='<td class="td_FirstColumn">Erase Count Specified</td>',a+='<td><div id="'+b[14].parameterName+c+'">'+b[14].values[0][c].data+"</div></td>",a+="</tr>",a+="<tr>",a+='<td class="td_FirstColumn">Cycles Left</td>',a+='<td><div id="'+b[15].parameterName+
c+'">'+b[15].values[0][c].data+" %</div></td>",a+="</tr>",a+="</table>",a+="<br>");b[16].values[0][c].getHasError()||b[17].values[0][c].getHasError()||b[18].values[0][c].getHasError()?b[16].values[0][c].getHasError()?b[18].values[0][c].getHasError()||(l=!0,a+="<table>",a+="<tr>",a+='<td class="td_FirstColumn">Spare Blocks Left</td>',a+='<td><div id="'+b[18].parameterName+c+'">'+b[18].values[0][c].data+" %</div></td>",a+="</tr>",a+="</table>",a+="<br>"):(l=!0,a+="<table>",a+="<tr>",a+='<td class="td_FirstColumn">Spare Blocks Remaining</td>',
a+='<td><div id="'+b[16].parameterName+c+'">'+b[16].values[0][c].data+"</div></td>",a+="</tr>",a+="</table>",a+="<br>"):(h=!0,a+="<table>",a+="<tr>",a+='<td class="td_FirstColumn">Spare Blocks Remaining</td>',a+='<td><div id="'+b[16].parameterName+c+'">'+b[16].values[0][c].data+"</div></td>",a+="</tr>",a+="<tr>",a+='<td class="td_FirstColumn">Spare Blocks Initial</td>',a+='<td><div id="'+b[17].parameterName+c+'">'+b[17].values[0][c].data+"</div></td>",a+="</tr>",a+="<tr>",a+='<td class="td_FirstColumn">Spare Blocks Left</td>',
a+='<td><div id="'+b[18].parameterName+c+'">'+b[18].values[0][c].data+" %</div></td>",a+="</tr>",a+="</table>",a+="<br>");g||h||l||(a+="<table>",a+="<tr>",a+='<td class="td_FirstColumn">Information</td>',a+="<td>No data available!</td>",a+="</tr>",a+="</table>",a+="<br>")}d.writeElement("div_smart",a)}}};this.HDD.prototype=new e.Page_Template.Template};e.DevMan.RegisterModule(new k.HDD,e.DevMan.ModuleType.Website)})(window);
