Edit C:\galaxie\deploy\Tomcat6\webapps\galaxie\admin\fltask\read.jsp
<%@page import="com.edeal.frontline.display.FlDate"%> <%@page import="com.edeal.frontline.helper.custom.ActorHelper"%> <%@page import="com.edeal.frontline.tasks.ETaskStatus"%> <% /****************************************************************************** * 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"%> <%@ page import="com.edeal.frontline.navigation.FlRequest" %> <%@ page import="com.edeal.frontline.FlContext" %> <%@ page import="com.edeal.frontline.Utils" %> <%@ page import="com.edeal.frontline.FieldNotInitializedException" %> <%@ page import="com.edeal.frontline.DataDictionary" %> <%@ page import="com.edeal.frontline.EnterpriseBean" %> <%@ page import="java.util.Date" %> <%@ page import="java.util.Hashtable" %> <%@ page import="com.edeal.frontline.FrontlineException" %> <%@ page import="com.edeal.frontline.ActorBean" %> <%@ page import="java.util.Vector" %> <%@ page import="com.edeal.frontline.LicenceManager" %> <%@ page import="com.edeal.frontline.SiteBean" %> <%@ page import="com.edeal.frontline.MenuByRoleBean" %> <%@ page import="com.edeal.frontline.MenuBean" %> <%@ page import="com.edeal.frontline.tasks.FlTaskAction" %> <%@ page import="com.edeal.frontline.RecurrencePattern" %> <%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <%@ page isELIgnored="false"%> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <jsp:useBean class="com.edeal.frontline.FlTaskBean" id="FlTask" scope="request"/> <% final org.apache.commons.logging.Log logger = org.apache.commons.logging.LogFactory.getLog(getClass()); FlRequest flRequest = new FlRequest(request); FlContext context = flRequest.getContext(); DataDictionary dico = context.getDataDictionary(); String params = ""; try { params = FlTask.getTskParameters();} catch (FieldNotInitializedException e) {} String id = null; try { id = FlTask.getID(); } catch (FieldNotInitializedException e) {} String dateTxt = ""; RecurrencePattern rp = FlTask.getRecurrencePattern(); Date prochaine = null; try { prochaine = rp.getNextScheduled(); } catch (Exception e) { } if (prochaine != null) { FlDate date = new FlDate(prochaine, ActorHelper.getSessionLocale(session)); dateTxt = date.toStringForWeb(); } else { dateTxt = Utils.getMessage(session, "L6079", "Non définie") ; } String valID = (String) FlTask.getTskRepetition(); String valCode = dico.getRefCode("TskRepetition" , valID); String nbRowSpan = ""; if ("HOURLY".equals(valCode) || "MONTHLY_B".equals(valCode) || "YEARLY_B".equals(valCode)) nbRowSpan = "6"; else if ("DAILY_A".equals(valCode) || "DAILY_B".equals(valCode)) nbRowSpan = "4"; else if ("WEEKLY".equals(valCode) || "MONTHLY_A".equals(valCode) || "YEARLY_A".equals(valCode)) nbRowSpan = "5"; String taskID = null; try { taskID = FlTask.getID(); } catch (FieldNotInitializedException fnie) {} int taskStatus = 99; try { taskStatus = context.getScheduler().getTaskStatus(taskID); } catch (FrontlineException fex) { } String tskStatus = "--"; if (taskStatus == 99) { tskStatus = Utils.getMessage(session, "L60A1", "Pas dans la table"); } else if (taskStatus == ETaskStatus.STATUS_NOSCHED.getCode()) { tskStatus = Utils.getMessage(session, "L60A2", "Pas de prochaine exécution"); } else if (taskStatus == ETaskStatus.STATUS_RUNNING.getCode()) { tskStatus = Utils.getMessage(session, "L60A3", "En cours d\'exécution"); } else if (taskStatus == ETaskStatus.STATUS_WAITING.getCode()) { tskStatus = Utils.getMessage(session, "L60A4", "En attente d\'exécution"); } %> <script type="text/javascript" language="javascript"> function doDeleteLog(logId) { if (confirm('<fl:getMessage code="M2004" alt="Etes-vous sûr de vouloir supprimer?" js="true"/>')) { doAjax('<fl:webapp/>/delete_object_ajax.fl?type=FlTaskLog&id=' + logId, lnkDelReturn); } } function refreshLogs() { myAjaxURL_FlTaskLog = _grid__FlTaskLog_js_.getAjaxUrl(); var params={}; params["id"]='<%= id %>'; // params["FlTaskLog_$$preview"]='1'; params["FlTaskLog_$$nb"]=0; params["FlTaskLog_$$idx"]=0; _grid__FlTaskLog_js_.callAjaxForHtml(myAjaxURL_FlTaskLog,params,true,false,null,true); } function lnkDelReturn(arrIndex) { if (eDealXmlhttpArr[arrIndex].readyState == 4) { window.setTimeout(refreshLogs, 10); } } var paramJSON; var parameter = "<%= params %>" function addParametersTab() { if ($('#Sequence').attr('checked') != 'checked' ){ paramJSON = null; var urlAjax = "ajax_taskmethod_infos.fl?class=" + $('#TskJavaObject_value').text().trim(); var request = $.ajax({ type: "GET", url: urlAjax, timeout: 20000, dataType: "json", async: true, beforeSend :showWaiting, success: onInfosReceived, statusCode: { 404: Error404 } }); } } function onInfosReceived(response) { hideWaiting(); var jsonArr = response; paramJSON = jsonArr; var paramValues = parameter.split(" "); var parameterNb = 0; if (jsonArr["parameters"]) { parameterNb = jsonArr["parameters"].length; } if(parameterNb == 0) parameterNb = 1; if (jsonArr != null) { if (jsonArr["parameters"]) { for(var i=0; i < parameterNb; i++) { var value = ''; var jsonName; var jsonDescription; if (jsonArr["parameters"].length == 0) { classParam = false; jsonName = '<<fl:getMessage code="F2025" alt="Name" js="true"/>>'; jsonDescription = '<<fl:getMessage code="L2007" alt="Description" js="true"/>>'; value = parameter; } else if(paramValues.length == jsonArr["parameters"].length){ value = paramValues[i]; jsonName = jsonArr["parameters"][i].name; jsonDescription = jsonArr["parameters"][i].description; } else { classParam = false; jsonName = '<<fl:getMessage code="F2025" alt="Name" js="true"/>>'; jsonDescription = '<<fl:getMessage code="L2007" alt="Description" js="true"/>>'; value = parameter; parameterNb = 1; } createDynamicTable($("#params"),jsonName, jsonDescription, value); } $('#description td:nth-child(2)').text(jsonArr["description"]); } } } function createDynamicTable(tbody, name, description, value) { if (tbody == null || tbody.length < 1) return; var trow = $("<tr>").addClass("fieldline"); $("<td>").addClass("dataLabel").text(name).appendTo(trow); $("<td>").addClass("dataLabel").text(description).appendTo(trow); var cellValue = $("<td>"); if (value == "_NULL__") value = ""; $("<div>").text(value).addClass("dataValue").appendTo(cellValue); cellValue.appendTo(trow); trow.appendTo(tbody); } function isSequence(){ if($('#TskJavaObject_value').text().trim() =='com.edeal.frontline.tasks.FlTaskSequence'){ $('#Sequence').attr('checked','checked'); } $('#Sequence').attr('disabled','disabled'); } function changeSelectObject() { if ($('#Sequence').attr('checked') == 'checked') { $('td[id*="TskJavaObject"]').parent('tr').hide(); $('#description').hide(); $('td[id*="TskActions"]').parent('tr').show(); $('#parametre').hide(); } else { $('td[id*="TskJavaObject"]').parent('tr').show(); $('#description').show(); $('td[id*="TskActions"]').parent('tr').hide(); $('#parametre').show(); } } $(document).ready(isSequence); $(document).ready(changeSelectObject); $(document).ready(addParametersTab); </script> <link href="<fl:webapp/>/css/smalltabs_css.jsp" rel="stylesheet" type="text/css"> <fl:bigTabs objectTitle="<%=Utils.getMessage(session, \"L645B\", false, true, \"Tâche plannifiée\")%>" ou="<%= \"/read_fltask.fl\" + (id != null ? \"?id=\" + id : \"\") %>"> <table class="container" cellpadding="0"> <tr> <td colspan="3" class="titreFiche"> <fl:getProperty name="FlTask" property="TskName" alt=""/> </td> </tr> <tr class="ligne_separation"><td colspan="3"></td></tr> <tr> <td class="column2"> <table class="container" cellpadding="0"> <tr class="fieldline" > <td id="Sequence_label" class="dataLabel"> <div> <label title="Sequence"><fl:label code="F80A2" label="Enchainement"/></label> </div> </td> <td id="Sequence_value" class="dataValue"> <div class="input"> <input id="Sequence" name="isSequence" type="checkbox" value="true" class="checkbox" onclick="changeSelectObject()" > </div> </td> </tr> <!-- <fl:fieldRead property="TskBase"/> --> <fl:fieldRead property="TskJavaObject" /> <fl:fieldRead property="TskBase" bean="true"/> <tr class="fieldline" id="description"> <td class="dataLabel" > <div> <label title="description"><fl:label code="L2007" label="Description"/></label> </div> </td> <td class="dataValue" />" </tr> <fl:fieldRead property="TskActions" bean="true" href="true" disp="/read_fltask.fl"/> <fl:fieldRead property="TskPriority" /> <tr class="fieldline"> <td id="dateTxt_label" class="dataLabel"> <fl:label code="L6007"/> </td> <td id="dateTxt_value" class="dataValue"> <%= dateTxt %> </td> </tr> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column2"> <fieldset name="paramètres" id="parametre"> <legend align=top class="dataLabel" style="width:55px" ><fl:getMessage code="L6070" alt="Paramètres"/></legend> <table class="data_column" cellpadding="0" id="params"> </table> </fieldset> <table class="container" cellpadding="0"> <!-- <fl:fieldRead property="TskParameters"/> --> <tr class="fieldline"> <td id="dateTxt_label" class="dataLabel"> <div> <fl:label code="F206F"/> </div> </td> <td id="dateTxt_value" class="dataValue"> <%= tskStatus %> </td> </tr> </table> </td> </tr> <tr class="ligne_separation"><td></td></tr> <tr class="ligne_separation"><td></td></tr> </table> <fl:notes name="TskNotes" title="<%= Utils.getMessage(session, \"F2024\", \"Notes\") %>" nbPix="35"><fl:getProperty name="FlTask" property="TskNotes" alt=" " edit="false" /></fl:notes> <fl:smallTabs name="TskEdit"> <fl:sTab id="FLTASK" title="<%= Utils.getMessage(session, \"L6071\", false, true, \"Planification\")%>"> <table class="data_column" cellpadding="0" border="0"> <tr class="fieldline"> <td class="column2"> <table> <!-- fl:getProperty name="FlTask" property="TskRepetition" alt=" "/--> <fl:fieldRead property="TskRepetition"/> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column2" > <table class="data_column" cellpadding="0" border="0"> <% if("HOURLY".equals(valCode)) { %> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F6019" alt="Intervalle"/></td> <td class="dataValue"><fl:getProperty name="FlTask" property="TskInterval" alt=" " format="###0"/></td> </tr> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F601A" alt="Heure de début"/></td> <td class="dataValue"><fl:getProperty name="FlTask" property="TskStartTime" alt=" " format="time"/></td> </tr> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F601B" alt="Date d\'activation"/></td> <td class="dataValue"><fl:getProperty name="FlTask" property="TskStartDate" alt=" " format="date"/></td> </tr> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F601C" alt="Date de désactivation"/></td> <td class="dataValue"><fl:getProperty name="FlTask" property="TskEndDate" alt=" " format="date"/></td> </tr> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F601D" alt="Heure d\'arrêt"/></td> <td class="dataValue"><fl:getProperty name="FlTask" property="TskEndTime" alt=" " format="time"/></td> </tr> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F601E" alt="Jours"/></td> <td class="dataValue"><fl:getProperty name="FlTask" separator=", " property="TskDaysOfWeek" alt=" "/></td> </tr> <% } else if ("DAILY_A".equals(valCode)) { %> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F6019" alt="Intervalle"/></td> <td class="dataValue"><fl:getProperty name="FlTask" property="TskInterval" alt=" " format="###0"/></td> </tr> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F601A" alt="Heure de début"/></td> <td class="dataValue"><fl:getProperty name="FlTask" property="TskStartTime" alt=" " format="time"/></td> </tr> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F601B" alt="Date d\'activation"/></td> <td class="dataValue"><fl:getProperty name="FlTask" property="TskStartDate" alt=" " format="date"/></td> </tr> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F601C" alt="Date de désactivation"/></td> <td class="dataValue"><fl:getProperty name="FlTask" property="TskEndDate" alt=" " format="date"/></td> </tr> <% } else if("DAILY_B".equals(valCode)) { %> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F601A" alt="Heure de début"/></td> <td class="dataValue"><fl:getProperty name="FlTask" property="TskStartTime" alt=" " format="time"/></td> </tr> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F601B" alt="Date d\'activation"/></td> <td class="dataValue"><fl:getProperty name="FlTask" property="TskStartDate" alt=" " format="date"/></td> </tr> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F601C" alt="Date de désactivation"/></td> <td class="dataValue"><fl:getProperty name="FlTask" property="TskEndDate" alt=" " format="date"/></td> </tr> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F601E" alt="Jours"/></td> <td class="dataValue"><fl:getProperty name="FlTask" separator=", " property="TskDaysOfWeek" alt=" "/></td> </tr> <% } else if("WEEKLY".equals(valCode)) { %> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F6019" alt="Intervalle"/></td> <td class="dataValue"><fl:getProperty name="FlTask" property="TskInterval" alt=" " format="###0"/></td> </tr> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F601A" alt="Heure de début"/></td> <td class="dataValue"><fl:getProperty name="FlTask" property="TskStartTime" alt=" " format="time"/></td> </tr> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F601B" alt="Date d\'activation"/></td> <td class="dataValue"><fl:getProperty name="FlTask" property="TskStartDate" alt=" " format="date"/></td> </tr> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F601C" alt="Date de désactivation"/></td> <td class="dataValue"><fl:getProperty name="FlTask" property="TskEndDate" alt=" " format="date"/></td> </tr> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F601E" alt="Jours"/></td> <td class="dataValue"><fl:getProperty name="FlTask" separator=", " property="TskDaysOfWeek" alt=" "/></td> </tr> <% } else if("MONTHLY_A".equals(valCode)) { %> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F6019" alt="Intervalle"/></td> <td class="dataValue"><fl:getProperty name="FlTask" property="TskInterval" alt=" " format="###0"/></td> </tr> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F601A" alt="Heure de début"/></td> <td class="dataValue"><fl:getProperty name="FlTask" property="TskStartTime" alt=" " format="time"/></td> </tr> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F601B" alt="Date d\'activation"/></td> <td class="dataValue"><fl:getProperty name="FlTask" property="TskStartDate" alt=" " format="date"/></td> </tr> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F601C" alt="Date de désactivation"/></td> <td class="dataValue"><fl:getProperty name="FlTask" property="TskEndDate" alt=" " format="date"/></td> </tr> <% } else if("MONTHLY_B".equals(valCode)) { %> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F6019" alt="Intervalle"/></td> <td class="dataValue"><fl:getProperty name="FlTask" property="TskInterval" alt=" " format="###0"/></td> </tr> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F601A" alt="Heure de début"/></td> <td class="dataValue"><fl:getProperty name="FlTask" property="TskStartTime" alt=" " format="time"/></td> </tr> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F601B" alt="Date d\'activation"/></td> <td class="dataValue"><fl:getProperty name="FlTask" property="TskStartDate" alt=" " format="date"/></td> </tr> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F601C" alt="Date de désactivation"/></td> <td class="dataValue"><fl:getProperty name="FlTask" property="TskEndDate" alt=" " format="date"/></td> </tr> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F6020" alt="Position du jour dans le mois"/></td> <td class="dataValue"><fl:getProperty name="FlTask" property="TskInstance" alt=" "/></td> </tr> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F6021" alt="Jour"/></td> <td class="dataValue"><fl:getProperty name="FlTask" separator=", " property="TskDaysOfWeek" alt=" "/></td> </tr> <% } else if("YEARLY_A".equals(valCode)) { %> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F601A" alt="Heure de début"/></td> <td class="dataValue"><fl:getProperty name="FlTask" property="TskStartTime" alt=" " format="time"/></td> </tr> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F601B" alt="Date d\'activation"/></td> <td class="dataValue"><fl:getProperty name="FlTask" property="TskStartDate" alt=" " format="date"/></td> </tr> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F601C" alt="Date de désactivation"/></td> <td class="dataValue"><fl:getProperty name="FlTask" property="TskEndDate" alt=" " format="date"/></td> </tr> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F601F" alt="Jour du mois"/></td> <td class="dataValue"><fl:getProperty name="FlTask" property="TskDayOfMonth" alt=" " format="###0"/></td> </tr> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="L200B" alt="Mois"/></td> <td class="dataValue"><fl:getProperty name="FlTask" property="TskMonthOfYear" alt=" " format="###0"/></td> </tr> <% } else if("YEARLY_B".equals(valCode)) { %> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F601A" alt="Heure de début"/></td> <td class="dataValue"><fl:getProperty name="FlTask" property="TskStartTime" alt=" " format="time"/></td> </tr> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F601B" alt="Date d\'activation"/></td> <td class="dataValue"><fl:getProperty name="FlTask" property="TskStartDate" alt=" " format="date"/></td> </tr> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F601C" alt="Date de désactivation"/></td> <td class="dataValue"><fl:getProperty name="FlTask" property="TskEndDate" alt=" " format="date"/></td> </tr> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="L200B" alt="Mois"/> de l'année</td> <td class="dataValue"><fl:getProperty name="FlTask" property="TskMonthOfYear" alt=" " format="###0"/></td> </tr> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F6020" alt="Position du jour dans le mois"/></td> <td class="dataValue"><fl:getProperty name="FlTask" property="TskInstance" alt=" "/></td> </tr> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F6021" alt="Jour"/></td> <td class="dataValue"><fl:getProperty name="FlTask" separator=", " property="TskDaysOfWeek" alt=" "/></td> </tr> <% } %> </table> </td> </tr> </table> </fl:sTab> <fl:sTab id="LOGS" title="<%= Utils.getMessage(session, \"L6075\", false, true, \"Journal des exécutions\") %>" onselect="refreshLogs();"> <div style="overflow:auto"> <fl:grid height="250px" width="100%" name="FlTaskLog" ajaxUrl="/list_custom_logtask_ajax.fl"/> </div> </fl:sTab> </fl:smallTabs> </fl:bigTabs>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de