home *** CD-ROM | disk | FTP | other *** search
Wrap
/* ====================================================================== DESC: Common Alert Functions for the Administer/Analyze Operations PLATFORMS: >= MS IE 4.0 USAGE NOTES: ====================================================================== */ var WatchTypes = new Array("","CounterWatch","EventLogWatch","WinServiceWatch", "FileWatch","SNMPTrapWatch","SyslogWatch","ServerWatch","ProcessWatch"); var WatchTypeImage = new Array("","Objects","sEventViewer","WinServices", "NewImg","SNMPTrapDisplaySm","SyslogDisplaySm","sAdminServers","ProcessWatch"); var COUNTER_WATCH = 1; var EVENTLOG_WATCH = 2; var WINSERVICE_WATCH = 3; var FILE_WATCH = 4; var SNMPTRAP_WATCH = 5; var SYSLOG_WATCH = 6; var SERVER_WATCH = 7; var PROCESS_WATCH = 8; var WatchDetailsArr = new Array(); var WatchDetailsIx = 0; var CurrentWatchReportType = 0; var CurrentAT_Save; var WRCount = 0; function processWatchReportButton() { SetButtonState(WatchReportButton,"1"); CurrentAT_Save = CurrentAT; CurrentAT = WatchReportType; PopUpContextOpen(); PopUpSelectDiv.style.display = ""; // enable Pop-Up AL_CCOneWatchReport.innerHTML = ""; processInitialLookup("WatchReport"); } var WRComputerCountTotal = 0; var WRComputerCountCurrent = 0; function processWRSelectDoneButton() { var CompSelectedArr = ""; // reset if ( !createElmArray() ) { alert("Please select one or more servers/devices for the Watch/Alert Report"); return; } CompSelectedArr = ELM_Ar.join(","); WRComputerCountTotal = ELM_Ar.length; WRComputerCountCurrent = 0; PopUpSelectDiv.style.display = "none"; PopUpContextClose(); SetButtonState(UUpdateButton,"1"); SetButtonState(UResetButton,"1"); CurrentAT = CurrentAT_Save; AL_CCOneWatchReport.innerHTML = ""; SetCursor("wait"); top.banner.processStartComm(); top.Rstatus.Pstat("One moment while Watch/Alert Details are retrieved and displayed",true); RpmCC_AL.NetStatFunction("GetWatchDetails~"+CompSelectedArr); CounterUI.style.display="none"; SchedUI.style.display="none"; ActsUI.style.display="none"; WatchReport.style.display = ""; SetButtonState(WatchRepOKButton,"1"); SetButtonState(WatchRepPrintButton,"1"); var dtb = document.all["repwatch"]; dtb.style.display = ""; dtb.innerHTML = ""; // clear details } function processWRSelectCancelButton() { PopUpSelectDiv.style.display = "none"; PopUpContextClose(); SetButtonState(UUpdateButton,"1"); SetButtonState(UResetButton,"1"); CurrentAT = CurrentAT_Save; AL_CCOneWatchReport.innerHTML = ""; SetButtonState(WatchReportButton,"0"); } function processWatchRepOKButton() { top.Rstatus.Pstat(""); WatchReport.style.display = "none"; processGeneralClick(CounterTab); } function processWatchReportBegin() { WatchDetailsArr.length = 0; WatchDetailsIx = 0; WRCount = 0; WOIx = 0; WatchReportEndReceived = false; /* Format Details for output */ var sob = ""; sob += "<center><table border='1' cellpadding='0' cellSpacing='0' width='620'>"; sob += "<tr><td width='100%' colspan='2' align='center' style='background-color:activeborder' class='optextb'>"; sob += "Watch/Alert Report" sob += "</td></tr></table></center>"; var dtb = document.all["repwatch"]; dtb.insertAdjacentHTML("beforeEnd",sob); dtb.style.overflow = (dtb.scrollHeight >= dtb.clientHeight) ? "scroll" : ""; WRTid = setTimeout("processWatchReportOutputThread()",100); } function processWatchReportData(csArg) { WatchDetailsArr[ WatchDetailsIx ] = csArg; WatchDetailsIx++ } var WRTid = null; var WOIx = 0; var WatchReportEndReceived = false; function processWatchReportOutputThread() { WRTid = null; //reset while ( WOIx < WatchDetailsIx ) { processWatchReportOutput(WOIx); ++WOIx; } if ( WatchReportEndReceived == false ) { WRTid = setTimeout("processWatchReportOutputThread()",100); return; } SetCursor("auto"); top.banner.processStopCommX(); SetButtonState(WatchReportButton,"0"); SetButtonState(WatchRepOKButton,"0"); SetButtonState(WatchRepPrintButton,"0"); top.Rstatus.Pstat("Done",true); var sob = ""; sob += "<center><table border='0' cellpadding='0' cellSpacing='3' width='620'>"; sob += "<tr height='3'><td width='100%' class='optext'><hr size='2' style='color:c8c8c8'></td></tr></table>"; var dtb = document.all["repwatch"]; dtb.insertAdjacentHTML("beforeEnd",sob); dtb.style.overflow = (dtb.scrollHeight >= dtb.clientHeight) ? "scroll" : ""; } function processWatchReportEnd() { WatchReportEndReceived = true; } function processWatchReportOutput(windex) { var warr = new Array(); var i = windex; var sob = ""; warr = WatchDetailsArr[i].split("~"); switch ( warr[1] ) { case "ComputerInfo" : ++WRComputerCountCurrent; top.Rstatus.Pstat("One moment while Watch/Alert Details are retrieved; Processing "+WRComputerCountCurrent+" of "+WRComputerCountTotal,true); if ( i > 0 ) { sob += "<center><table border='0' cellpadding='0' cellSpacing='3' width='620'>"; sob += "<tr height='3'><td width='100%' class='optext'><hr size='2' style='color:c8c8c8'></td></tr></table>"; sob += "<center style='page-break-before: always'><table border='1' cellpadding='0' cellSpacing='0' width='620'>"; sob += "<tr><td width='100%' colspan='2' align='center' style='background-color:activeborder' class='optextb'>"; sob += "Watch/Alert Report" sob += "</td></tr></table></center>"; } sob += "<center><table border='0' cellpadding='0' cellSpacing='3' width='620'>"; sob += "<tr height='3'><td width='100%' class='optext'><hr size='2' style='color:c8c8c8'></td></tr></table>"; sob += "<center><table border='1' cellpadding='0' cellSpacing='0' width='620'>"; sob += "<tr style='background-color:c8c8c8'>"; sob += "<td style='border-width:0' width='60' align='left' class='optextn'> Name</td>" sob += "<td style='font-size:11pt; border-width:0' width='*' align='left' class='optext'>: " + warr[5] +"</td></tr>"; sob += "<tr style='background-color:c8c8c8'>"; sob += "<td style='border-width:0' width='60' align='left' class='optextn'> Descr</td>" sob += "<td style='font-size:11pt; border-width:0' width='*' align='left' class='optext'>: " + warr[6] +"</td></tr>"; sob += "<tr style='background-color:c8c8c8'>"; sob += "<td style='border-width:0' width='60' align='left' class='optextn'> Addr</td>" sob += "<td style='font-size:11pt; border-width:0' width='*' align='left' class='optext'>: " + warr[10] +"</td></tr>"; sob += "<tr style='background-color:c8c8c8'>"; sob += "<td style='border-width:0' width='60' align='left' class='optextn'> OS Ver</td>" sob += "<td style='font-size:11pt; border-width:0' width='*' align='left' class='optext'>: " + warr[7] +"</td></tr>"; sob += "<tr style='background-color:c8c8c8'>"; sob += "<td style='border-width:0' width='60' align='left' class='optextn'> Agent</td>" sob += "<td style='font-size:11pt; border-width:0' width='*' align='left' class='optext'>: " + warr[8] +"</td></tr>"; sob += "<tr style='background-color:c8c8c8'>"; sob += "<td style='border-width:0' width='60' align='left' class='optextn'> Domain</td>" sob += "<td style='font-size:11pt; border-width:0' width='*' align='left' class='optext'>: " + warr[9] +"</td></tr>"; sob += "</table></center>"; break; case "NewWatch" : CurrentWatchReportType = parseInt(warr[2],10); sob += "<center><table border='0' cellpadding='0' cellSpacing='3' width='620'>"; sob += "<tr height='3'><td width='100%' class='optext'><hr size='2' style='color:c8c8c8'></td></tr></table>"; sob += "<center><table border='1' cellpadding='0' cellSpacing='0' width='620'>"; sob += "<tr style='background-color:d8d8d8'><td width='20' align='center' style='border-width:0'>"; sob += "<img src='images/" + WatchTypeImage[CurrentWatchReportType] +".gif' align='absmiddle' height='16' width='16'></td>"; sob += "<td width='*' align='left' class='optextb' style='border-width:0'> "; sob += WatchTypes[CurrentWatchReportType] + "</td></tr></table></center>"; WRCount = 0; break; default : sob += "<center><table border='0' cellpadding='0' cellSpacing='3' width='620'>"; sob += "<tr height='3'><td width='100%' class='optext'><hr size='2' style='color:c8c8c8'></td></tr></table>"; var bgColor var parr = new Array(); var garr = new Array(); var marr = new Array(); parr = WatchDetailsArr[i].split("<+>"); garr = parr[1].split("~"); var garrd = new Array(); var garrs = new Array(); garrs = garr[2].split("]["); garrd = garrs[0].split("[]"); marr = parr[2].split("~"); sob += "<center><table border='0' cellpadding='0' cellSpacing='3' width='620'>"; bgColor = ( ++WRCount % 2 == 0 ) ? "e0e0e0" : "white"; sob += "<tr style='background-color:"+bgColor+"' >"; sob += "<td width='50' align='left' class='optext'> Name</td>"; sob += "<td width='*' align='left' class='optext'>: " + garr[1] +"</td></tr>"; bgColor = ( ++WRCount % 2 == 0 ) ? "e0e0e0" : "white"; sob += "<tr style='background-color:"+bgColor+"' >"; sob += "<td width='50' align='left' class='optext'> Descr</td>"; sob += "<td width='*' align='left' class='optext'>: " + garrd[0] +"</td></tr>"; bgColor = ( ++WRCount % 2 == 0 ) ? "e0e0e0" : "white"; sob += "<tr style='background-color:"+bgColor+"' >"; sob += "<td width='50' align='left' class='optext'> Severity</td>"; var sevvalue = (garrs.length > 5) ? parseInt(garrs[5],10) : 1; sob += "<td width='*' align='left' class='optext'>: " + SeverityArray[ sevvalue ] +"</td></tr>"; bgColor = ( ++WRCount % 2 == 0 ) ? "e0e0e0" : "white"; sob += "<tr style='background-color:"+bgColor+"' >"; sob += "<td width='50' align='left' class='optext'>"; sob += " Details</td>"; sob += "<td width='*' align='left' class='optext'>"; switch ( CurrentWatchReportType ) { case SERVER_WATCH : if ( marr[8] == "1" ) { sob += ": *****CURRENTLY SUSPENDED*****<br>"; } sob += ": IP Service = " + ((marr[0] == "SQLCONNECT")?"SQL":marr[0]) +"<br>"; if ( marr[0] != "AGENT" ) { if ( marr[0] == "PING" || marr[0] == "SQLCONNECT" || marr[0] == "ORACLE" || marr[0] == "SNMP" ) { sob += ": TimeOut= "+marr[1]+"; Retry Count= "+marr[2]+"<br>"; } else { sob += ": Port= "+marr[3]+"; TimeOut= "+marr[1]; sob += "; Retry Count= "+marr[2]+"<br>"; } } if ( marr[0] == "HTTP" ) { if ( marr[11] != "" ) { sob += ": Look For= "+marr[11]; if ( marr[10] != "" ) sob += "; Page Name= "+marr[10]; sob += "<br>"; } else if ( marr[10] != "" ) { sob += ": Page Name= "+marr[10]+"<br>"; } } else if ( marr[0] == "DNS" ) { if ( marr[9] != "" ) { sob += ": Resolve Name= "+marr[9]+"<br>"; } } else if ( marr[0] == "USER" ) { if ( marr[10] != "" ) { sob += ": Request= "+marr[10]; if ( marr[11] != "" ) sob += "; Response= "+marr[11]; sob += "<br>"; } else if ( marr[11] != "" ) { sob += ": Response= "+marr[11]+"<br>"; } } else if ( marr[0] == "SNMP" ) { var snmpparr = new Array(); snmpparr = marr[10].split(","); if ( snmpparr.length > 3 && snmpparr[3] != "" ) { sob += ": Look For= "+snmpparr[3]; if ( snmpparr[0] != "" ) sob += "; Read Community= "+snmpparr[0]; sob += "<br>"; } else if ( snmpparr[0] != "" ) { sob += ": Read Community= "+snmpparr[0]+"<br>"; } if ( snmpparr.length > 3 && snmpparr[4] != "" ) { sob += ": OIDs= "+snmpparr[4]+"<br>"; } } else if ( marr[0] == "ORACLE" || marr[0] == "SQLCONNECT") { var sqlparr = new Array(); sqlparr = marr[10].split(","); if ( sqlparr[0] != "" ) { sob += ": Server Name= "+sqlparr[0]; if ( sqlparr[3] != "" ) sob += "; Database= "+sqlparr[3]; sob += "<br>"; } else if ( sqlparr[3] != "" ) { sob += ": Database= "+sqlparr[3]+"<br>"; } if ( sqlparr[1] != "" ) { sob += ": User Name= "+sqlparr[1]; if ( sqlparr[2] != "" ) sob += "; Password= "+sqlparr[2]; sob += "<br>"; } else if ( sqlparr[2] != "" ) { sob += ": Password= "+sqlparr[2]+"<br>"; } } else if ( marr[0] == "AGENT" ) { var aparr = new Array(); aparr = marr[10].split(","); sob += ": Memory Threshold= "+aparr[0]+"%; Logical Drive Threshold= "+aparr[1]+"%<br>"; } break; case SYSLOG_WATCH : if ( marr[5] != "" ) { var tagarr = new Array(); tagarr = marr[5].split("`"); if ( tagarr[3] == "0" ) { sob += ": *****CURRENTLY SUSPENDED*****<br>"; } } if ( marr[0] != "" ) { var fac = ""; var facarr = new Array(); facarr = marr[0].split(","); for ( var j=0; j<facarr.length; j++ ) { if ( j != 0 ) { fac += ", " } fac += GetFacility( facarr[j] ); } sob += ": Facility= " + fac +"<br>"; } if ( marr[1] != "" ) { var sev = ""; var sevarr = new Array(); sevarr = marr[1].split(","); for ( var k=0; k<sevarr.length; k++ ) { if ( k != 0 ) { sev += ", " } sev += GetSeverity( sevarr[k] ); } sob += ": Severity= " + sev +"<br>"; } if ( marr[5] != "" ) { if ( tagarr[0] != "" ) sob += ": Tag= " + tagarr[0] +"<br>"; if ( tagarr[1] != "" ) sob += ": Content= " + tagarr[1] +"<br>"; } sob += ": Precedence= "+ (parseInt(marr[4],10)+1); if ( marr[2] == "1" ) sob += "; AND Params"; sob += "<br>"; break; case PROCESS_WATCH : var prarr = new Array(); prarr = marr[13].split("[+]"); if ( prarr.length <= 1 ) { prarr[0] = prarr[1] = prarr[2] = prarr[3] = ""; } if ( marr[2] == "0" ) { sob += ": *****CURRENTLY SUSPENDED*****<br>"; } sob += ": Process Name= "+marr[0]+"<br>"; if ( marr[1] != "" ) sob += ": Process Path= "+marr[1]+"<br>"; fp = ": Thresholds: "; if ( prarr[0] != "" && parseInt(prarr[0],10) > 0 ) fp += "Duration (Mins)= "+prarr[0]+"; "; if ( marr[3] != "" && parseInt(marr[3],10) > 0 ) fp += "CPU %= "+marr[3]+"; "; if ( marr[4] != "" && parseInt(marr[4],10) > 0 ) fp += "Memory(KB)= "+marr[4]+"; "; if ( marr[5] != "" && parseInt(marr[5],10) > 0 ) fp += "PagedPool(KB)= "+marr[5]+"; "; if ( marr[6] != "" && parseInt(marr[6],10) > 0 ) fp += "NonPagedPool(KB)= "+marr[6]+"; "; if ( marr[7] != "" && parseInt(marr[7],10) > 0 ) fp += "PageFile(KB)= "+marr[7]+"; "; if ( fp.length > 23 ) sob += fp + "<br>"; if ( prarr[1] != "" && parseInt(prarr[1],10) > 0 ) { sob += ": Instance Count= "+prarr[1]+"; "; if ( prarr[3] != "" ) { sob += "Exclude From WildCard= "+prarr[3]; } sob += "<br>"; } else if ( prarr[3] != "" ) { sob += ": Exclude From WildCard= "+prarr[3]+"<br>"; } sob += ": "; if ( marr[9] == "1") sob += "Should NOT Be Running; "; else sob += "Should BE Running; "; if ( marr[10] == "1") sob += "Notify Only; "; else if ( marr[11] != "") sob += "Restart "; else sob += "Terminate "; sob += "<br>"; break; case SNMPTRAP_WATCH : if ( marr[0] == "0" ) { sob += ": *****CURRENTLY SUSPENDED*****<br>"; } var trapoid = ""; for ( var l=1; l<marr.length; l++ ) { if ( l > 1 ) { trapoid += ", " } trapoid += marr[l]; } sob += ": Trap OID(s)= " + trapoid +"<br>"; break; case FILE_WATCH : if ( marr[2] == "0" ) { sob += ": *****CURRENTLY SUSPENDED*****<br>"; } var farr = new Array(); farr = marr[1].split("`"); sob += ": File Path Name= "+marr[0]; if ( farr[3] == "1") sob += "; D/T Change"; if ( farr[2] == "1") sob += "; Size Change"; sob += "<br>"; var fp = ": "; if ( farr[1] != "") fp += "Maximum Size(KB)= "+farr[1]+"; "; if ( farr[0] != "") fp += "Search String= "+farr[0]; if ( fp.length > 7 ) sob += fp + "<br>"; fp = ": "; if ( farr[4] == "1") fp += "AND Params; "; if ( farr[5] == "1") fp += "NOT Check; "; if ( farr[6] != "") fp += "Duration (Hours)= "+farr[6]; if ( fp.length > 7 ) sob += fp + "<br>"; break; case WINSERVICE_WATCH : if ( marr[5] == "0" ) { sob += ": *****CURRENTLY SUSPENDED*****<br>"; } var sr = ""; if ( marr[6] == "0" ) { sr = ": Attempt Service Restart;"; } else { sr = ": Notify Only;"; } sob += sr + " Windows Service(s)=<br>"; for ( var m=0; m<marr.length-1; m+=7 ) { sob += " -" + marr[m+2] + " ("+marr[m+1]+")<br>"; } break; case EVENTLOG_WATCH : if ( marr[0] == "0" ) { sob += ": *****CURRENTLY SUSPENDED*****<br>"; } sob += ": Log Name= "+marr[1]; if ( marr[2] != "" ) { for ( var p=0; p<TypeTable.length; p++ ) { if ( marr[2] == TypeTable[p] ) { sob += "; Type= "+AL_EvLogType.options[ p ].text; } } } if ( marr[5] != "") sob += "; EventID(s)= "+marr[5]; sob += "<br>"; var fp = ": "; if ( marr[3] != "") fp += "Source= "+marr[3]+"; "; if ( marr[4] != "") fp += "Category= "+marr[4]+"; "; if ( marr[6] != "") { var warr = new Array(); warr = marr[6].split("\x09"); if ( warr.length > 1 ) { marr[6] = warr.join("&T"); } fp += "Description= "+marr[6]; } if ( fp.length > 7 ) sob += fp + "<br>"; sob += ": Precedence= "+ (parseInt(marr[14],10)+1); if ( marr[13] == "1" ) sob += "; AND Params"; if ( marr[12] == "0" ) sob += "; NOT Check"; if ( marr[15] == "1" ) sob += "; Exclude"; sob += "<br>"; break; case COUNTER_WATCH : sob += ": Object= "+marr[0]+" "+marr[1]+"; Counter= "+marr[2]+"<br>"; sob += ": Threshold= "+garr[3]+"; "+((garr[4] == "1")?"OVER":"BELOW")+" Threshold"; sob += "; Duration= "+garr[6]+"<br>"; break; } sob += "</td></tr>"; bgColor = ( ++WRCount % 2 == 0 ) ? "e0e0e0" : "white"; sob += "<tr style='background-color:"+bgColor+"' >"; sob += "<td width='50' align='left' class='optext'> Schedule</td>"; sob += "<td width='*' align='left' class='optext'>"; if ( CurrentWatchReportType == COUNTER_WATCH ) { if ( garr[5] == "0" ) { sob += ": Alert Every Time<br>"; } else { /* Determine Schedule */ var Ia = new Array(); var CDUnits, CDCount; Ia = garr[19].split(","); if ( (CDCount = Ia[1]) != 0 ) { CDUnits = 2; // default to hours } else { if ( (CDCount = Ia[3]) == 0 ) { ++CDCount; } CDUnits = Ia[2]; } sob += ": Minimum Notification Interval= "+(CDCount + " " + SchedTxtArray[CDUnits])+"<br>"; // } sob += ": Maximum Alert Notifications= "+garrs[3]+"<br>"; if ( garrs[4] == "1" ) { sob += ": Notify On Restore<br>"; } } else { if ( garr[5] == "1" ) { sob += ": Alert Every Time<br>"; } else { /* Determine Schedule */ var Ia = new Array(); var CDUnits, CDCount; Ia = garr[19].split(","); if ( (CDCount = Ia[1]) != 0 ) { CDUnits = 2; // default to hours } else { if ( (CDCount = Ia[3]) == 0 ) { ++CDCount; } CDUnits = Ia[2]; } sob += ": Minimum Notification Interval= "+(CDCount + " " + SchedTxtArray[CDUnits])+"<br>"; // } } if ( CurrentWatchReportType == SERVER_WATCH ) { sob += ": Maximum Alert Notifications= "+garr[3]+"<br>"; if ( marr[4] != "0" ) { SrvUnits = 0; SrvCount = parseInt(marr[4],10); } else if ( marr[5] != "0" ) { SrvUnits = 1; SrvCount = parseInt(marr[5],10); } else if ( marr[6] != "0" ) { SrvUnits = 2; SrvCount = parseInt(marr[6],10); } else if ( marr[7] != "0" ) { SrvUnits = 3; SrvCount = parseInt(marr[7],10); } var SrvFreq = SrvCount + " " + SchedTxtArray[SrvUnits]; sob += ": Server Check Frequency= "+SrvFreq+"<br>"; if ( garrd[1] != "" ) { sob += ": Watch/Alert Dependency= "+getOnlyAlertName(garrd[1])+" <br>"; } if ( garrs.length > 1 && garrs[1] != "" ) { var Suppress1 = new Array(); var Supp1 = "", Supp2 = ""; Suppress1 = garrs[1].split("^"); if ( Suppress1.join(",") != "0,0,0,0,0,0" ) { Supp1 = InactDaysArray[ Suppress1[0] ]; Supp1 += "-"+InactDaysArray[ Suppress1[1] ]; Supp1 += " "+ ((Suppress1[2] < 10) ? "0"+Suppress1[2] : Suppress1[2]); Supp1 += ":"+ ((Suppress1[4] < 10) ? "0"+Suppress1[4] : Suppress1[4]); Supp1 += " - "+ ((Suppress1[3] < 10) ? "0"+Suppress1[3] : Suppress1[3]); Supp1 += ":"+ ((Suppress1[5] < 10) ? "0"+Suppress1[5] : Suppress1[5]); } Suppress1 = garrs[2].split("^"); if ( Suppress1.join(",") != "0,0,0,0,0,0" ) { Supp2 = InactDaysArray[ Suppress1[0] ]; Supp2 += "-"+InactDaysArray[ Suppress1[1] ]; Supp2 += " "+ ((Suppress1[2] < 10) ? "0"+Suppress1[2] : Suppress1[2]); Supp2 += ":"+ ((Suppress1[4] < 10) ? "0"+Suppress1[4] : Suppress1[4]); Supp2 += " - "+ ((Suppress1[3] < 10) ? "0"+Suppress1[3] : Suppress1[3]); Supp2 += ":"+ ((Suppress1[5] < 10) ? "0"+Suppress1[5] : Suppress1[5]); } if ( Supp1 != "" ) { sob += ": Suppress Monitoring= "+Supp1; if ( Supp2 != "" ) sob += " and "+Supp2; sob += "<br>"; } else if ( Supp2 != "" ) { sob += ": Suppress Monitoring= "+Supp2+ "<br>"; } } } sob += "</td></tr>"; bgColor = ( ++WRCount % 2 == 0 ) ? "e0e0e0" : "white"; sob += "<tr style='background-color:"+bgColor+"' >"; sob += "<td width='50' align='left' class='optext'> Actions</td>" sob += "<td width='*' align='left' class='optext'>" if ( garr[7] != "1" && garr[10] != "1" && garr[13] != "1" && garr[16] != "1" ) { sob += ": No Actions"; } else { if ( garr[7] == "1" ) { sob += ": Run Program; Program Name= "+garr[8]+"; Programs Args= "+garr[9]+"<br>"; } if ( garr[10] == "1" ) { var warr = new Array(); warr = garr[12].split("[+]"); sob += ": Send Email; Email Addr= "+garr[11]+"; Email Subj= "+warr[0]; if ( warr[1].length != 0 ) { sob += "<br> Custom Email Text= "+warr[1]; } sob += "<br>"; } if ( garr[13] == "1" ) { var narr1 = new Array(); var narr2 = new Array(); var narr3 = new Array(); var narr4 = new Array(); narr1 = garr[14].split("^"); narr2 = narr1[0].split("[+]"); narr3 = narr1[1].split(";"); narr4 = narr3[1].split("[+]"); sob += ": Dial Pager/PCS; Access Number(s)= "+narr2.join(";"); sob += "<br> PIN/Pager Numnber(s)= "+narr4.join(";"); if (narr3[0] != "") sob += "; Password= "+narr3[0]; sob += "<br> Text-To-Send= "+garr[15]+"<br>"; } if ( garr[16] == "1" ) { sob += ": Dial Beeper; Number= "+garr[17]+"; Numeric TTS= "+garr[18]+"<br>"; } } sob += "</td></tr></table>"; } var dtb = document.all["repwatch"]; dtb.insertAdjacentHTML("beforeEnd",sob); dtb.style.overflow = (dtb.scrollHeight >= dtb.clientHeight) ? "scroll" : ""; } function processPrintWatchReport() { if ( !top.banner.IE55orBetter ) { alert("Print requires IE 5.5/SP1 or greater. Download current, free IE update from Microsoft's web site"); return; } var DiscStatWindow = null; FakeBut.click(); // simulate event to call "savePageCoord(...)" var wprop = "height="+top.banner.bCh+",width="+top.banner.bCw; wprop += ",top="+(top.banner.bY-28)+",left="+(top.banner.bX-4)+",scrollbars"; var rName = ""+Math.random(); // use Random number to get unique Window name rName = rName.substring(2,rName.length); DiscStatWindow = window.open("",rName,wprop); if ( DiscStatWindow == null ) { return; } var dh = "<html><head><title>MonitorIT - Watch/Alert Report</title>"; dh += "<link rel='stylesheet' type='text/css' href='css/Rpmstyle.css'>"; dh += "</head><body"; dh += " title='Exit to Close Window when Printing is complete'>"; dh += repwatch.innerHTML; dh += "</body></html>"; DiscStatWindow.document.open(); DiscStatWindow.document.write(dh) DiscStatWindow.document.close(); DiscStatWindow.print(); } function processProcNameChange() { processProcNotify(); }