Edit C:\galaxie\deploy\Tomcat6\webapps\galaxie\admin\slaalarm\embedded_list.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.text.*,java.util.*"%> <%@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()); String contextPath = (String) session.getAttribute("contextPath"); FlContext context = null; if (contextPath!=null) { context = Frontline.getContext(contextPath); } else { context = Frontline.getContext(request.getContextPath()); } DataDictionary dico = context.getDataDictionary(); String id = Utils.getRequestParameter(context, request, "id"); String nbStr = Utils.getRequestParameter(context, request, "nb"); boolean isPopup = Utils.getRequestParameter(context, request, "popup") != null; String[] fields = {"SllID", "SllDate", "SllTalID", "SllSlsID", "SllSlsID:SlsLabel", "SllDelayHour", "SllDelayDay", "SllDelayMin", "SllCause"}; String[][] query = {{"SllObjetID = " + Utils.formatToSQL(context, id)}}; String[] orderBy = {"SllCrDt DESC"}; Vector list = new Vector(); boolean all = true; int nb = 5; try { nb = Integer.parseInt(nbStr); all = false; } catch (NumberFormatException e) { } if (!all) { list = SLAAlarmBean.listSummary(session, fields, query, orderBy, 0, nb); } else { list = SLAAlarmBean.listSummary(session, fields, query, orderBy); } DecimalFormat moneyFormat = FlLocale.getInstance(session).getDecimalFormat("#,##0.00"); DecimalFormat intFormat = FlLocale.getInstance(session).getDecimalFormat("#,##0");%> <% if (isPopup) { %> <html> <head> <title><fl:getMessage code="L6024" alt="Opportunités"/></title> <% } %> <script language="javascript"> <% if (!isPopup) { %> function viewSLAAlarms(){ window.open('<fl:webapp/>/admin/slaalarm/embedded_list.jsp?popup=1<%= id != null ? "&id=" + id : "" %>', 'listSll','menubar=no,status=no,toolbar=no,scrollbars=yes,resizable=yes,width=640,height=480'); } <% } %> function showAlarm(id) { <% if (isPopup) { %> window.top.opener.parent.location = '<fl:webapp/>/admin/slaalarm/read.jsp?id=' + id; window.top.close(); <% } else { %> window.parent.location = '<fl:webapp/>/admin/slaalarm/read.jsp?id=' + id; <% } %> } function showState(id) { <% if (isPopup) { %> window.top.opener.parent.location = '<fl:webapp/>/admin/slastate/read.jsp?id=' + id; window.top.close(); <% } else { %> window.parent.location = '<fl:webapp/>/admin/slastate/read.jsp?id=' + id; <% } %> } </script> <% if (isPopup) { %> </head> <body> <% } %> <% if (list != null && list.size() >0) { %> <table border="0" cellspacing="3" cellpadding="3" width="95%" align="center"> <% if (!isPopup) { %> <tr valign="top"> <th colspan="5" class="title" style="text-align: left"><fl:getMessage code="L638F" alt="Alarmes SLA"/> <a href="javascript:viewSLAAlarms();"><img src="<fl:webapp/>/icons/loupesmall_inv.gif" border="0" width="15" height="15" alt="<fl:getMessage code="L6390" alt="Voir toutes les alarmes"/>"></a></th> </tr> <% } %> <tr valign="top"> <th><fl:getMessage code="F2019" alt="Date"/></th> <th><fl:getMessage code="F1023" alt="Type"/></th> <th><fl:getMessage code="L6389" alt="Etat SLA"/></th> <th><fl:getMessage code="F611C" alt="Cause"/></th> <th><fl:getMessage code="F6119" alt="Délai avant dépassement"/></th> </tr> <% String alertID = dico.getRefIdByCode("SllTalID", "ALERTE"); for (int i=0; i< list.size();i++) { Hashtable row = (Hashtable) list.elementAt(i); String sllID = (String)row.get("SllID"); Date sllDate = (Date)row.get("SllDate"); String sllTalID = (String)row.get("SllTalID"); String slsID = (String)row.get("SllSlsID"); String slsLabel = (String)row.get("SllSlsID:SlsLabel"); Number sllDelayHour = (Number)row.get("SllDelayHour"); Number sllDelayDay = (Number)row.get("SllDelayDay"); Number sllDelayMin = (Number)row.get("SllDelayMin"); String sllCause = (String)row.get("SllCause"); %> <tr> <td valign="top" nowrap> <a href="javascript:showAlarm('<%= sllID %>');"><%= Utils.formatToWeb(sllDate, false) %></a> </td> <td valign="top" nowrap> <%= sllTalID != null ? Utils.formatToWeb(dico.getRefDisp(session, "SllTalID", sllTalID), false) : " "%> </td> <td valign="top" nowrap> <a href="javascript:showState('<%= slsID %>');"><%= Utils.formatToWeb(slsLabel, false) %></a> </td> <td valign="top" nowrap> <%= sllCause != null ? Utils.formatToWeb(dico.getRefDisp(session, "SllCause", sllCause), false) : " "%> </td> <td valign="top" nowrap style="text-align: right"> <% if (alertID.equals(sllTalID)) { %> <%= sllDelayDay != null ? intFormat.format(sllDelayDay.intValue()) : "0" %> <fl:getMessage code="L6048" alt="j"/> <%= sllDelayHour != null ? intFormat.format(sllDelayHour.intValue()) : "0" %> <fl:getMessage code="L6063" alt="h"/> <%= sllDelayMin != null ? intFormat.format(sllDelayMin.intValue()) : "0" %> <fl:getMessage code="L638E" alt="min"/> <% } else { %> <% } %> </td> </tr> <% } %> </table> <% } %> <% if (isPopup) { %> </body> </html> <% } %> <% /****************************************************************************** * CVS Log File - This is no longer maintained! * * Revision 1.1 2004/07/23 18:20:28 brian * Initial Revision * *****************************************************************************/ %>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de