home *** CD-ROM | disk | FTP | other *** search
Wrap
<html> <head> <title>MonitorIT Server Log</title> <link rel="stylesheet" type="text/css" href="css/rpmstyle.css"> <style> #MonMainBox { border: none; background-color : activeborder; position:absolute; margin:0; height:100%; width:100% } #MonTextBox { border-style : solid; border-width : 1px; overflow : scroll; background-color:white; } #MonTextBox { border-top-color : graytext; border-left-color : graytext; border-bottom-color : white; border-right-color : white} #MonTextBox { position:absolute; margin:0; top:48; left:4; } #StMainBox { border: solid 0px graytext; border-top : one; background-color : activeborder; height: 30px; position:absolute; margin:0; top:505} #StMainBox { border-left-color : #E8E8E8; } </style> </head> <body class="bodyc" scroll=no style="margin:3px; overflow: none" language="JavaScript" RPMHostIP="!BreakoutBot:MonitorIP!" RPMHostPort="!BreakoutBot:MonitorPort!" RPMUserName="!BreakoutBot:UserName!" BOBDone="!BreakoutBot:Done!" onload="top.banner.savePageCoord(event,document.body,'AdminMonServer'); InitMonitor()" onbeforeunload="DiscoMonitor()" onresize="processSizeChange()" onclick="checkClick()" onkeydown="processBSP()"> <script LANGUAGE="JavaScript"> var bdH = 30; // Send Text height; must match value in #ButtonDiv style above var byM = null; var borderSz = 2; // Thin Bord is 2pixels var LUser = ""; var lthLUser = 0; var MessageCount = 0; var LastMessageCount = 0; var Tid = null, OTid = null; var Ostrg = ""; // Output string var WaitMessage = false; var ReconnectEvent = false; var Hp = null; // Host Port var Pause = false; // Capture and ignore script errors window.onerror = wwScrErr; function wwScrErr() { return true; } function InitMonitor() { Tid = null; // reset if set // Wait until Banner page is completed loading before proceeding if ( top.BannerLoaded == false ) { Tid = setTimeout("InitMonitor()",500); // Not complete, delay 500 ms. then check again return; // exit and wait } top.MainLoaded = true; // Flag that Main is now loaded Bobj = document.body; // get BODY object LUser = "{" + Bobj.RPMUserName + "}"; // get local user name and encluse with <> lthLUser = LUser.length; // length of string byM = 2*parseFloat(document.body.style.margin); processSizeChange(); // go set Window sizes Hp = parseInt(document.body.RPMHostPort,10); RpmCC.Connect(document.body.RPMHostIP,Hp, ""); } function processReconnect() { Tid = null; if ( RpmCC.IsConnected() ) { Tid = setTimeout("processConnectionCheck()",10000); // Delay 10 secs then check connection return; } RpmCC.Connect(document.body.RPMHostIP,Hp, ""); } function processConnectConfirmed() { top.Rstatus.Pstat("Connected"); if ( Tid != null ) { clearTimeout(Tid); // stop timeout routine } Tid = setTimeout("processConnectionCheck()",30000); // Delay 30 secs then check connection RpmCC.OpenMessageFloodgate(); RpmCC.NetStatFunction("DiskLogStatus"); //RpmCC.SendTextStatus(LUser + " has joined monitoring"); Ostrg = "<span class='clocal'>Please Wait While Server Log is Downloaded!</span><br>"; MessageCount = LastMessageCount = 1; // reset message counts processOutput(); // set Output thread going WaitMessage = true; // flag wait message being displayed top.banner.processStartComm(); } function processConnectionCheck() { Tid = null; RpmCC.SendKeepAlive("Check"); Tid = setTimeout("processConnectionCheck()",30000); // Delay 30 secs then check connection } function processSizeChange() { // Display Height and Width bCh = document.body.clientHeight; bCw = document.body.clientWidth; // Minimums bCh = (bCh < bdH+byM+120) ? bdH+byM+120 : bCh; bCw = (bCw < 330) ? 330 : bCw; document.body.scroll = (bCw <= 330 || bCh <= bdH+byM+120) ? "yes" : "no"; //PopUpContext Menu PopUpContextSize(bCw); // Set Height/Widths for Chart and Button areas MonMainBox.style.height = bCh-(bdH+byM-borderSz); MonMainBox.style.width = bCw-byM; StMainBox.style.top = bCh-(bdH+byM-borderSz); StMainBox.style.width = bCw-byM; MonTextBox.style.height = MonMainBox.style.posHeight-TitleDivSize; MonTextBox.style.width = MonMainBox.style.posWidth-12; MonMainBox.style.display = ""; // insure visible StMainBox.style.display = ""; } function DiscoMonitor() { //RpmCC.SendTextStatus(LUser + " is no longer monitoring"); if ( Tid != null ) { clearTimeout(Tid); // stop timeout routine } if ( OTid != null ) { clearTimeout(OTid); // stop timeout routine } top.BannerMenuShow(); RpmCC.Disconnect(); top.banner.processStopCommX(); } // Print Log var DiscStatWindow = null; function processPrintStatus() { if ( !top.banner.IE55orBetter ) { alert("Print requires IE 5.5/SP1 or greater. Download current, free IE update from Microsoft's web site"); return; } 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 - Server Log Report</title>"; dh += "<link rel='stylesheet' type='text/css' href='css/rpmstyle.css'></head><body"; dh += " title='Exit to Close Window when Printing is complete'>"; dh += SrvMonWindow.innerHTML; dh += "</body></html>"; DiscStatWindow.document.open(); DiscStatWindow.document.write(dh) DiscStatWindow.document.close(); DiscStatWindow.focus(); DiscStatWindow.print(); } function procRcv(tlth, tstrg) { if (tstrg != "") { // determine type of string and set class accordingly for output style if (tstrg.substring(0,6) == "System") { ts = "<span class='csystem'>"; } else if (tstrg.substring(0,7) == "Request") { ts = "<span class='crequest'>"; } else if (tstrg.substring(0,lthLUser) == LUser) { ts = "<span class='clocal'>"; } else { ts = "<span class='cnormal'>"; } ts += tstrg + "</span><br>"; // form complete output string ts += Ostrg; // put new string first Ostrg = ts; // save concatenated string ++MessageCount; // bump message count } } function processPauseStatus() { Pause = ( Pause ) ? false : true; if ( Pause ) { StatusPauseButtonText.innerText = " Resume"; StatusPauseImage.src = "images/apply.gif"; } else { StatusPauseButtonText.innerText = " Pause"; StatusPauseImage.src = "images/reset.gif"; ++MessageCount; // force update } } var PauseOutput = ""; function processOutput() { OTid = null; // reset if ( ((MessageCount == LastMessageCount) && (MessageCount != 0)) || (MessageCount > 500) ) { // if no new messages, then output var os = Ostrg; // get output string Ostrg = ""; // reset MessageCount = 0; // reset counts MWobj = document.all["SrvMonWindow"]; // get monitor window object if ( WaitMessage ) { // clear it MWobj.innerText = ""; WaitMessage = false; top.banner.processStopCommX(); } if ( Pause ) { if ((PauseOutput.length + os.length) > 200000) { //max characters in window is 200K if ( os.length < 200000 ) { // if new string < 200K os = os + PauseOutput.substr(0,100000); } else { // just most recent part of new string os = os.substr(0,100000); } PauseOutput = ""; // clear } PauseOutput = os + PauseOutput; // save it } else { if ( PauseOutput.length > 0 ) { os += PauseOutput; PauseOutput = ""; } if ((MWobj.innerHTML.length + os.length) > 200000) { //max characters in window is 200K if ( os.length < 200000 ) { // if new string < 100K os = os + MWobj.innerHTML.substr(0,100000); } else { // just most recent part of new string os = os.substr(0,100000); } MWobj.innerText = ""; // clear current window } MWobj.insertAdjacentHTML("afterBegin",os); // append to the monitor window } EnableClearLocal(); // enable the Clear Local button } LastMessageCount = MessageCount; // set to determine now new messages have arrived in last 250ms. OTid = setTimeout("processOutput()",250); // keep Output thread going } function ClearLocalMonitor_Click() { MWobj = document.all["SrvMonWindow"]; MWobj.innerText = "" //StatusPrintButton.className = "BoxButtonD"; // disable button StatusPrintButton.disabled = "disabled"; // disable button } function ClearServerMonitor_Click() { RpmCC.ClearTextStatus(); } function EnableClearLocal() { //ButtonClearLocalMonitor.className = "BoxButton"; ButtonClearLocalMonitor.disabled = ""; //StatusPrintButton.className = "BoxButton"; // enable button StatusPrintButton.disabled = ""; // enable button } function processLogEnableClick() { if ( LogEnabled.checked ) { if ( confirm("This is a global setting that will START writing the MonitorIt Server log data to disk.\nThe file is 'MonitoriTServer.log' and is in the '...\\MonitorIT\\Bin' folder.\n\nAre you sure you want to start writing the log data to disk?") ) { // Enable Disk logging RpmCC.NetStatFunction("EnableDiskLog"); } else { LogEnabled.checked = ""; } } else { if ( confirm("This is a global setting that will STOP writing the MonitorIt Server log data to disk.\n\nAre you sure you want to stop writing the log data to disk?") ) { // Disable Disk logging RpmCC.NetStatFunction("DisableDiskLog"); } else { LogEnabled.checked = "checked"; } } } /* Process key press/down and ennable or disable SendText button accordingly */ function processKKeyDown() { /* EmptyStrg = (event.type == "keypress") ? 0 : 1; if ( event.keyCode == 13 ) { // if Enter key if (event.srcElement.value.length != EmptyStrg) { processSendTextClick(); // go process typed string } } else { if (event.keyCode == 8 && event.srcElement.value.length == EmptyStrg) { document.all.ButtonSendText.className = "BoxButtonD"; document.all.ButtonSendText.disabled = "disabled"; } else { document.all.ButtonSendText.className = "BoxButton"; document.all.ButtonSendText.disabled = ""; } } */ } function processSendTextClick() { /* Sobj = document.all["InputSendText"]; if (Sobj.value != "") { RpmCC.SendTextStatus(LUser + " " + Sobj.value); Sobj.value = ""; } document.all.ButtonSendText.className = "BoxButtonD"; document.all.ButtonSendText.disabled = "disabled"; Sobj.focus(); */ } // Process to Toggle the Hide and Show of the Banner & Menu Frames var hideToggle = 0; var TitleDivSize = 52; function processBannerMenu() { if ( hideToggle == 0 ) { top.BannerMenuHide(); hideToggle = 1; ServerLogTitleDiv.style.display = "none"; TitleDivSize = 4; MTB_Top = 0; } else { top.BannerMenuShow(); hideToggle = 0; ServerLogTitleDiv.style.display = ""; TitleDivSize = 52; MTB_Top = 48; } MonTextBox.style.top = MTB_Top; } function PopUpContextOpen() { } function PopUpContextClose() { } </script> <script LANGUAGE="JavaScript" FOR="RpmCC" EVENT="NetStatNotify(csArg)"> <!-- var wrkarr = new Array(); wrkarr = csArg.split("~"); if ( wrkarr[0] == "LogToDiskStatus" ) { if ( wrkarr[1] == "1" ) { LogEnabled.checked = "checked"; } else { LogEnabled.checked = ""; } } //--> </script> <script LANGUAGE="JavaScript" src="js/MiscFunc.js"></script> <script LANGUAGE="JavaScript" FOR="RpmCC" EVENT="Connected()"> <!-- processConnectConfirmed(); //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC" EVENT="Disconnected()"> <!-- top.Rstatus.Pstat("Disconnected",true); if ( Tid != null ) { clearTimeout(Tid); // stop timeout routine } Tid = setTimeout("processReconnect()",4000); // Not complete, delay 4 secs then check again //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC" EVENT="ReceiveText(nLength, szText)"> <!-- procRcv(nLength, szText); //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC" EVENT="StartCommunication()"> <!-- //top.banner.processStartComm(); //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC" EVENT="StopCommunication()"> <!-- top.banner.processStopCommX(); //--> </script> <script LANGUAGE="JavaScript" src="js/PopUpMenuFunc.js"></script> <object ID="RpmCC" NAME="RpmCC" WIDTH="355" HEIGHT="150" style="display: none" CLASSID="clsid:D88C2358-FC83-11D1-BF49-00104B2D6F80" codebase="controls/RPMComm.cab#version=5,2,0,0"> <param name="_Version" value="65536"> <param name="_ExtentX" value="2646"> <param name="_ExtentY" value="1341"> <param name="_StockProps" value="0"> </object> <!-- Invisible Object to Support Simulated Click Event --> <button id="FakeBut" style="display:none" onclick="top.banner.savePageCoord(event,document.body,'AdminMonServer')"> </button> <div id="MonMainBox" style="display:none"> <div id="ServerLogTitleDiv"> <table border="1" borderColor="activeborder" align="left"> <tr><td borderColorDark="graytext" borderColorLight="white" style="font-weight:800; font-size:12pt; background-color:threedhighlight; color:windowtext"> <img src="images/sMonitorServerActivity.gif" align="absmiddle" height="16" width="16"> MonitorIT Server Log </td></tr> </table> <BR CLEAR=ALL><HR align="left"> </div> <div id="MonTextBox" noWrap="nowrap"><span ID="SrvMonWindow"></span></div> </div> <div id="StMainBox" style="display:none"> <div align="center"> <table width="100%" border="1" cellspacing="1" cellpadding="1"> <tr> <td width="23%" align="left" class="inputlabel"><button onclick="processBannerMenu()" title="Press to Toggle Hide/Show of Menu and Banner Frames" style="cursor:hand"><img src="images/FullView.gif" align="absmiddle" height="16" width="16"></button></td> <td align="center" width ="54%"> <button id="ButtonClearLocalMonitor" title="Press to Clear This Local Display of the MonitorIT Server Log Only" style="width:85px; height:25px" style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand" onclick="ClearLocalMonitor_Click(); this.disabled='disabled'" disabled><img src="images/unselectall.gif" align="absmiddle" height="15" width="14"> Clear Log</button> <button id="StatusPrintButton" title="Print MonitorIT Server Log" onclick="if (this.bdis == '0') processPrintStatus();" bdis="0" style="width:85px; height:25px" style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand" DISABLED><img src="images/Printer.gif" align="absmiddle" height="15" width="17"> Print</button> <button id="StatusPauseButton" title="Pause/Resume MonitorIT Server Log" onclick="if (this.bdis == '0') processPauseStatus();" bdis="0" style="width:85px; height:25px" style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand"><img id="StatusPauseImage" src="images/reset.gif" align="absmiddle" height="15" width="15"><span id="StatusPauseButtonText"> Pause</span></button></td> <td width="23%" align="right"><span class="inputlabel" title="Global setting to enable/disable writing Log information to 'MonitorITServer.log' in the '...\MonitorIT\Bin' folder"><INPUT TYPE="checkbox" NAME="LogEnabled" id="LogEnabled" onclick="processLogEnableClick()" style="cursor:hand">Log To Disk </span></td></tr></table> </div> <!--<center> <fieldset style="width:80%"><legend class="inputlabel" >Send Text To MonitorIT Server</legend> <form method="POST" name="TextToServer" onsubmit="processSendTextClick(); return false"> <div align="center"><button id="ButtonSendText" class="BoxButtonD" style="width:85px; height:25px" onclick="processSendTextClick()" disabled ><img src="images/apply.gif" align="absmiddle" height="16" width="16">Send Text</button> <input type="text" name="InputSendText" id="InputSendText" onkeydown="processKKeyDown()" onkeypress="processKKeyDown()" size="60" maxLength="120"></div> </form> </fieldset> </center>--> </div> </body> </html>