Edit C:\Users\Administrator\Desktop\Back\galaxie - Copy\admin\connectionMonitoring.jsp
<% /****************************************************************************** * Copyright (c) 2000-2004 e-Deal * * e-Deal S.A. * 55 rue Brillat Savarin * 75013 Paris * France * * T: +33 (0)1 53 80 80 30 * F: +33 (0)1 73 01 69 77 * http://www.e-deal.com * * La diffusion de ce code source sous quelque forme que ce soit sans * l'autorisation de E-DEAL est interdite. * * Vous �tes autoris�s � modifier ce code source uniquement pour votre usage * propre et sous r�serve que les mentions de copyright demeurent intactes. * * Ce code est fourni en l'�tat. Aucune garantie d'aucune sorte, explicite ou * implicite n'est donn�e. En aucun cas E-DEAL ne pourra �tre tenu pour * responsable des dommages pouvant r�sulter de l'utilisation de ce code * source. * * ******************************************************************************/ %><%@page session="true" import="com.edeal.frontline.*,java.util.*"%> <%@ page import="com.edeal.frontline.navigation.FlRequest" %> <%@ page import="com.edeal.frontline.FlContext" %> <%@ page import="java.sql.Connection" %> <%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <% final org.apache.commons.logging.Log logger = org.apache.commons.logging.LogFactory.getLog(getClass()); FlRequest flRequest = new FlRequest(request); FlContext context = flRequest.getContext(); boolean isMissingOption = false; String missingOption = (String)flRequest.getAttribute("missingOption"); if ("true".equalsIgnoreCase(missingOption)) { isMissingOption = true; } FlDataSource flds=context.getFlDataSource(); EDealDataSource edds = (EDealDataSource)flds.getDataSource(); //isMissingOption = true; //Connection con = context.getConnection(); %> <html> <head> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/edeal/libraries/jquery/jquery.js"></script> <script language="javascript"> var missingOption = <%=isMissingOption%>; $(document).ready(function() { if (missingOption) { displayMessage("WARNING", "Connections monitoring needs an option to work. <br/>Please add or set the option <i>Admin.UnclosedConnectionMonitoringActivated</i> to value <i>true</i>.<br/>When done, reload options and open this page again."); } else { var url = "<fl:webapp/>/getConnectionsList.fl"; var aData = {}; $.ajax({ url: url, data: aData, context: this, dataType:"json", success: function(data) { drawConnectionEl(data); }, error: function(jqXHR, textStatus, errorThrown) { console.log("error :"); console.log("jqXHR :"); console.log(jqXHR); console.log("textStatus :"); console.log(textStatus); console.log("errorThrown :"); console.log(errorThrown); } }); } }); function drawConnectionEl(result) { var cEl = $("#connectionEl"); //console.log(result); var conArray = result.result; if (conArray.length == 0) { displayMessage("INFO", "No unclosed connection.") } else { displayMessage("WARNING", "It seems that some connections are not closed.<br/>You can find informations below on where and when these connections have been opened. ") for (var i=0; i<conArray.length; i++) { var aCon = conArray[i]; var line = $("<tr>"); var cell = $("<td>" + aCon.uuid + "</td>"); line.append(cell); var startDate = new Date(aCon.startDate); cell = $("<td style='text-align:right'>" + startDate.getHours() + ":" + startDate.getMinutes() + ":" + startDate.getSeconds() + "</td>"); line.append(cell); cell = $("<td style='text-align:right'>" + (((new Date()).getTime() - aCon.startDate) / 1000) + "</td>"); line.append(cell); cell = $("<td>" + aCon.callStack.replace(/(\r\n|\n|\r)/gm,"<br>") + "</td>"); line.append(cell); cEl.append(line); } $("#connectionElTitle").show(); cEl.show(); } } function displayMessage(type, content) { var el; if (type == "WARNING") { el = $("#warningZone"); } else { el = $("#notificationZone"); } el.html(content); el.show(); } </script> <style type="text/css"> #connectionEl { border: 1px solid black; margin: 0px; padding: 0px; vertical-align: top; } #connectionEl td { border: 1px solid black; margin: 0px; padding: 0px 2px 0px 2px; vertical-align: top; } .connectionTableHeader { background-color: #ebf2f1; font-weight: bold; text-align: center; } #warningZone { width: 95%; border: 4px solid #f2180d; background-color: #e06d68; margin: 0px 0px 30px 0px; padding: 10px; vertical-align: top; font-weight: bold; } #notificationZone { width: 95%; border: 4px solid #0aa720; background-color: #68e079; margin: 0px 0px 30px 0px; padding: 10px; vertical-align: top; } .title { font-size: 20px; width: 95%; text-align: center; font-weight: bold; margin: 0px 0px 20px 0px; padding: 0px; vertical-align: top; } .subtitle { font-size: 15px; width: 95%; text-align: left; font-weight: bold; margin: 0px 0px 10px 30px; padding: 0px; vertical-align: top; border-bottom: 1px solid black; } .refreshButton { opacity: 0.8; position: fixed; right: 0px; top:0px; color: black; padding: 3px 10px 3px 10px; text-decoration: none; border: 1px solid gainsboro; border: 1px solid rgba(0, 0, 0, 0.1); text-align: center; color: #444; font-size: 15px; font-weight: bold; -webkit-transition: all 0.218s; -moz-transition: all 0.218s; -o-transition: all 0.218s; transition: all 0.218s; background-color: #f5f5f5; background-image: -webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#f1f1f1)); background-image: -webkit-linear-gradient(top,#f5f5f5,#f1f1f1); background-image: -moz-linear-gradient(top,#f5f5f5,#f1f1f1); background-image: -ms-linear-gradient(top,#f5f5f5,#f1f1f1); background-image: -o-linear-gradient(top,#f5f5f5,#f1f1f1); background-image: linear-gradient(top,#f5f5f5,#f1f1f1); filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#f5f5f5',EndColorStr='#f1f1f1'); } .refreshButton:hover { opacity:1; } </style> </head> <!-- <body text="000000" bgcolor="ebf2f1" link="501123" alink="501123" vlink="501123"> --> <body> <a class="refreshButton" href="javascript:void(0);" onclick="window.location.reload();">Refresh</a> <p class="title">E-DEAL Connections Monitoring</p> <div id="warningZone" style="display:none;"></div> <div id="notificationZone" style="display:none;"></div> <p class="subtitle">Connections pool details</p> <p> <ul> <li>Available : <b><%= edds.getNbAvailableConn() %></b></li> <li>Open : <b><%= edds.getNbOpenConn() %></b></li> <li>Held in pool : <b><%= edds.getNbHoldConn() %></b></li> <li>Minimum in pool : <b><%= edds.getNbMinConn() %></b></li> <li>Maximum in pool : <b><%= edds.getNbMaxConn() %></b></li> </ul> </p> <p id="connectionElTitle" class="subtitle" style="display:none;">Unclosed connections list</p> <table id="connectionEl" border="1" cellspacing="0" cellpadding="0" style="display:none;"> <tr> <td class="connectionTableHeader" style="width:150px;">Connection UUID</td> <td class="connectionTableHeader" style="width:80px;">Start date (<i>hh:mm:ss</i>)</td> <td class="connectionTableHeader" style="width:80px;">Open since<br/>(<i>in seconds</i>)</td> <td class="connectionTableHeader" style="width:600px;">Call Stack</td> </tr> </table> </body> </html>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de