Return-Path: X-Original-To: apmail-manifoldcf-commits-archive@www.apache.org Delivered-To: apmail-manifoldcf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CDB74184CE for ; Fri, 12 Jun 2015 22:54:46 +0000 (UTC) Received: (qmail 73221 invoked by uid 500); 12 Jun 2015 22:54:46 -0000 Delivered-To: apmail-manifoldcf-commits-archive@manifoldcf.apache.org Received: (qmail 73132 invoked by uid 500); 12 Jun 2015 22:54:46 -0000 Mailing-List: contact commits-help@manifoldcf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@manifoldcf.apache.org Delivered-To: mailing list commits@manifoldcf.apache.org Received: (qmail 72683 invoked by uid 99); 12 Jun 2015 22:54:46 -0000 Received: from eris.apache.org (HELO hades.apache.org) (140.211.11.105) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Jun 2015 22:54:46 +0000 Received: from hades.apache.org (localhost [127.0.0.1]) by hades.apache.org (ASF Mail Server at hades.apache.org) with ESMTP id 65FC3AC0E15 for ; Fri, 12 Jun 2015 22:54:46 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1685187 [15/18] - /manifoldcf/trunk/framework/crawler-ui/src/main/webapp/ Date: Fri, 12 Jun 2015 22:54:44 -0000 To: commits@manifoldcf.apache.org From: kishore@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20150612225446.65FC3AC0E15@hades.apache.org> Modified: manifoldcf/trunk/framework/crawler-ui/src/main/webapp/simplereport.jsp URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/crawler-ui/src/main/webapp/simplereport.jsp?rev=1685187&r1=1685186&r2=1685187&view=diff ============================================================================== --- manifoldcf/trunk/framework/crawler-ui/src/main/webapp/simplereport.jsp (original) +++ manifoldcf/trunk/framework/crawler-ui/src/main/webapp/simplereport.jsp Fri Jun 12 22:54:43 2015 @@ -2,25 +2,25 @@ <% - /* $Id$ */ +/* $Id$ */ /** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - boolean maintenanceUnderway = org.apache.manifoldcf.crawler.system.ManifoldCF.checkMaintenanceUnderway(); +* Licensed to the Apache Software Foundation (ASF) under one or more +* contributor license agreements. See the NOTICE file distributed with +* this work for additional information regarding copyright ownership. +* The ASF licenses this file to You under the Apache License, Version 2.0 +* (the "License"); you may not use this file except in compliance with +* the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +boolean maintenanceUnderway = org.apache.manifoldcf.crawler.system.ManifoldCF.checkMaintenanceUnderway(); %> @@ -30,823 +30,760 @@ - - - - <%=Messages.getBodyString(pageContext.getRequest().getLocale(), "simplereport.ApacheManifoldCFSimpleHistoryReport")%> - - - + //--> + - - - - - - - - -
-

<%=Messages.getBodyString(pageContext.getRequest().getLocale(), "simplereport.SimpleHistoryReport")%> -

- <% - if (maintenanceUnderway == false) { - int k; - - // Read the parameters. - String reportConnection = variableContext.getParameter("reportconnection"); - if (reportConnection == null) - reportConnection = ""; - String[] reportActivities; - if (variableContext.getParameter("reportactivities_posted") != null) { - reportActivities = variableContext.getParameterValues("reportactivities"); - if (reportActivities == null) - reportActivities = new String[0]; - } else - reportActivities = null; - - // Get the current time, so we can fill in default values where possible. - long currentTime = System.currentTimeMillis(); - - Long startTime = null; - Long endTime = null; - - // Get start time, if selected - String startYear = variableContext.getParameter("reportstartyear"); - String startMonth = variableContext.getParameter("reportstartmonth"); - String startDay = variableContext.getParameter("reportstartday"); - String startHour = variableContext.getParameter("reportstarthour"); - String startMinute = variableContext.getParameter("reportstartminute"); - - // Get end time, if selected. - String endYear = variableContext.getParameter("reportendyear"); - String endMonth = variableContext.getParameter("reportendmonth"); - String endDay = variableContext.getParameter("reportendday"); - String endHour = variableContext.getParameter("reportendhour"); - String endMinute = variableContext.getParameter("reportendminute"); - - if (startYear == null && startMonth == null && startDay == null && startHour == null && startMinute == null && - endYear == null && endMonth == null && endDay == null && endHour == null && endMinute == null) { - // Nobody has selected a time range yet. Pick the last hour. - endTime = null; - startTime = new Long(currentTime - 1000L * 60L * 60L); - } else { - // Get start time, if selected - if (startYear == null) - startYear = ""; - if (startMonth == null) - startMonth = ""; - if (startDay == null) - startDay = ""; - if (startHour == null) - startHour = ""; - if (startMinute == null) - startMinute = ""; - - // Get end time, if selected. - if (endYear == null) - endYear = ""; - if (endMonth == null) - endMonth = ""; - if (endDay == null) - endDay = ""; - if (endHour == null) - endHour = ""; - if (endMinute == null) - endMinute = ""; - - if (startYear.length() == 0 || startMonth.length() == 0 || startDay.length() == 0 || startHour.length() == 0 || startMinute.length() == 0) { - // Undetermined start - startTime = null; - } else { - // Convert the specified times to a long. - Calendar c = new GregorianCalendar(); - c.set(Calendar.YEAR, Integer.parseInt(startYear)); - c.set(Calendar.MONTH, Integer.parseInt(startMonth)); - c.set(Calendar.DAY_OF_MONTH, Integer.parseInt(startDay) + 1); - c.set(Calendar.HOUR_OF_DAY, Integer.parseInt(startHour)); - c.set(Calendar.MINUTE, Integer.parseInt(startMinute)); - startTime = new Long(c.getTimeInMillis()); - } - if (endYear.length() == 0 || endMonth.length() == 0 || endDay.length() == 0 || endHour.length() == 0 || endMinute.length() == 0) { - // Undetermined end - endTime = null; - } else { - // Convert the specified times to a long. - Calendar c = new GregorianCalendar(); - c.set(Calendar.YEAR, Integer.parseInt(endYear)); - c.set(Calendar.MONTH, Integer.parseInt(endMonth)); - c.set(Calendar.DAY_OF_MONTH, Integer.parseInt(endDay) + 1); - c.set(Calendar.HOUR_OF_DAY, Integer.parseInt(endHour)); - c.set(Calendar.MINUTE, Integer.parseInt(endMinute)); - endTime = new Long(c.getTimeInMillis()); - } - } - - // Now, turn the startTime and endTime back into fielded values. The values will be blank where there is no limit. - if (startTime == null) { - startYear = ""; - startMonth = ""; - startDay = ""; - startHour = ""; - startMinute = ""; - } else { - // Do the conversion - Calendar c = new GregorianCalendar(); - c.setTimeInMillis(startTime.longValue()); - startYear = Integer.toString(c.get(Calendar.YEAR)); - startMonth = Integer.toString(c.get(Calendar.MONTH)); - startDay = Integer.toString(c.get(Calendar.DAY_OF_MONTH) - 1); - startHour = Integer.toString(c.get(Calendar.HOUR_OF_DAY)); - startMinute = Integer.toString(c.get(Calendar.MINUTE)); - } - - if (endTime == null) { - endYear = ""; - endMonth = ""; - endDay = ""; - endHour = ""; - endMinute = ""; - } else { - // Do the conversion - Calendar c = new GregorianCalendar(); - c.setTimeInMillis(endTime.longValue()); - endYear = Integer.toString(c.get(Calendar.YEAR)); - endMonth = Integer.toString(c.get(Calendar.MONTH)); - endDay = Integer.toString(c.get(Calendar.DAY_OF_MONTH) - 1); - endHour = Integer.toString(c.get(Calendar.HOUR_OF_DAY)); - endMinute = Integer.toString(c.get(Calendar.MINUTE)); - } - - // Get the entity match string. - String entityMatch = variableContext.getParameter("reportentitymatch"); - if (entityMatch == null) - entityMatch = ""; - - // Get the resultcode match string. - String resultCodeMatch = variableContext.getParameter("reportresultcodematch"); - if (resultCodeMatch == null) - resultCodeMatch = ""; - - - // Read the other data we need. - IRepositoryConnectionManager connMgr = RepositoryConnectionManagerFactory.make(threadContext); - IRepositoryConnection[] connList = connMgr.getAllConnections(); - - // Query the legal list of activities. This will depend on the connection has been chosen, if any. - Map selectedActivities = null; - String[] activityList = null; - if (reportConnection.length() > 0) { - activityList = org.apache.manifoldcf.crawler.system.ManifoldCF.getActivitiesList(threadContext, reportConnection); - if (activityList == null) - reportConnection = ""; - else { - selectedActivities = new HashMap(); - String[] activitiesToNote; - int j = 0; - if (reportActivities == null) - activitiesToNote = activityList; - else - activitiesToNote = reportActivities; - - while (j < activitiesToNote.length) { - String activity = activitiesToNote[j++]; - selectedActivities.put(activity, activity); - } - } - } - - %> - -
- - - - - - - - - - <% - if (reportConnection.length() > 0) { - %> - - - <% - } else { - %> - - <% - } - %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
<%=Messages.getBodyString(pageContext.getRequest().getLocale(), "simplereport.Connection")%> - - - <%=Messages.getBodyString(pageContext.getRequest().getLocale(), "simplereport.Activities")%> - - - -
-
-
<%=Messages.getBodyString(pageContext.getRequest().getLocale(), "simplereport.StartTime")%> - - - - : - - <%=Messages.getBodyString(pageContext.getRequest().getLocale(), "simplereport.on")%> - - - - - , - - -
<%=Messages.getBodyString(pageContext.getRequest().getLocale(), "simplereport.EndTime")%> - - - - : - - <%=Messages.getBodyString(pageContext.getRequest().getLocale(), "simplereport.on")%> - - - - - , - - -
-
-
- <%=Messages.getBodyString(pageContext.getRequest().getLocale(), "simplereport.EntityMatch")%> - - - <%=Messages.getBodyString(pageContext.getRequest().getLocale(), "simplereport.ResultCodeMatch")%> - - -
-
-
- <% - if (reportConnection.length() > 0) { - %> - " onClick="javascript:Go()" alt="<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"simplereport.ExecuteThisQuery")%>"/> - <% - } else { - %> - " onClick="javascript:Continue()" alt="<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"simplereport.Continue")%>"/> - <% - } - %> -
-
-
- <% - if (reportConnection.length() > 0) { - // Run the report. - - // First, we need to gather the sort order object. - String sortOrderString = variableContext.getParameter("sortorder"); - SortOrder sortOrder; - if (sortOrderString == null || sortOrderString.length() == 0) - sortOrder = new SortOrder(); - else - sortOrder = new SortOrder(sortOrderString); - - // Now, gather the column header that was clicked on (if any) - String clickedColumn = variableContext.getParameter("clickcolumn"); - if (clickedColumn != null && clickedColumn.length() > 0) - sortOrder.clickColumn(clickedColumn); - - // Gather the start - String startRowString = variableContext.getParameter("startrow"); - int startRow = 0; - if (startRowString != null && startRowString.length() > 0) - startRow = Integer.parseInt(startRowString); - - // Gather the max - String maxRowCountString = variableContext.getParameter("rowcount"); - int rowCount = 20; - if (maxRowCountString != null && maxRowCountString.length() > 0) - rowCount = Integer.parseInt(maxRowCountString); - - String[] ourActivities = new String[selectedActivities.size()]; - Iterator iter = selectedActivities.keySet().iterator(); - int zz = 0; - while (iter.hasNext()) { - ourActivities[zz++] = (String) iter.next(); - } - - RegExpCriteria entityMatchObject = null; - if (entityMatch.length() > 0) - entityMatchObject = new RegExpCriteria(entityMatch, true); - RegExpCriteria resultCodeMatchObject = null; - if (resultCodeMatch.length() > 0) - resultCodeMatchObject = new RegExpCriteria(resultCodeMatch, true); - FilterCriteria criteria = new FilterCriteria(ourActivities, startTime, endTime, entityMatchObject, resultCodeMatchObject); - - IResultSet set = connMgr.genHistorySimple(reportConnection, criteria, sortOrder, startRow, rowCount + 1); - - %> - - - - - - - - - - - - - - - <% - zz = 0; - - boolean hasMoreRows = (set.getRowCount() > rowCount); - int iterCount = hasMoreRows ? rowCount : set.getRowCount(); - while (zz < iterCount) { - IResultRow row = set.getRow(zz); - String startTimeString = org.apache.manifoldcf.ui.util.Formatter.formatTime(Converter.asLong(row.getValue("starttime"))); - String resultCode = ""; - Object resultCodeObject = row.getValue("resultcode"); - if (resultCodeObject != null) - resultCode = resultCodeObject.toString(); - String resultDescription = ""; - Object resultDescriptionObject = row.getValue("resultdesc"); - resultDescriptionObject = row.getValue("resultdesc"); - if (resultDescriptionObject != null) - resultDescription = resultDescriptionObject.toString(); - String[] identifierBreakdown = org.apache.manifoldcf.ui.util.Formatter.formatString(row.getValue("identifier").toString(), 64, true, true); - %> - > - - - - - - - - - <% - zz++; - } - %> -
- <%=Messages.getBodyString(pageContext.getRequest().getLocale(), "simplereport.StartTime")%> - - - <%=Messages.getBodyString(pageContext.getRequest().getLocale(), "simplereport.Activity")%> - - - <%=Messages.getBodyString(pageContext.getRequest().getLocale(), "simplereport.Identifier")%> - - - <%=Messages.getBodyString(pageContext.getRequest().getLocale(), "simplereport.ResultCode")%> - - - <%=Messages.getBodyString(pageContext.getRequest().getLocale(), "simplereport.Bytes")%> - - - <%=Messages.getBodyString(pageContext.getRequest().getLocale(), "simplereport.Time")%> - - - <%=Messages.getBodyString(pageContext.getRequest().getLocale(), "simplereport.ResultDescription")%> - -
- <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(startTimeString)%> - - - <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(row.getValue("activity").toString())%> - - - <% - int q = 0; - while (q < identifierBreakdown.length) { - %> - <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(identifierBreakdown[q++])%> - -
- <% - } - %> -
<%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(resultCode)%> - <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(row.getValue("bytes").toString())%> - <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(row.getValue("elapsedtime").toString())%> - <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(resultDescription)%> -
- - - - - - -
- - <% - if (startRow == 0) { - %> - <%=Messages.getBodyString(pageContext.getRequest().getLocale(), "simplereport.Previous")%> - <% - } else { - %> - "><%=Messages.getBodyString(pageContext.getRequest().getLocale(), "simplereport.Previous")%> - - <% - } - %> - - - <% - if (hasMoreRows == false) { - %> - <%=Messages.getBodyString(pageContext.getRequest().getLocale(), "simplereport.Next")%> - <% - } else { - %> - "><%=Messages.getBodyString(pageContext.getRequest().getLocale(), "simplereport.Next")%> - - <% - } - %> - - - <%=Messages.getBodyString(pageContext.getRequest().getLocale(), "simplereport.Rows")%> - - <%=Integer.toString(startRow)%>-<%=(hasMoreRows ? Integer.toString(startRow + rowCount - 1) : "END")%> - - - <%=Messages.getBodyString(pageContext.getRequest().getLocale(), "simplereport.RowsPerPage")%> - - -
- - <% - } else { - %> - - - - -
<%=Messages.getBodyString(pageContext.getRequest().getLocale(), "simplereport.PleaseSelectAConnection")%> -
- <% - } - %> -
- <% - } else { - %> - - - - - - - -
-
-
<%=Messages.getBodyString(pageContext.getRequest().getLocale(), "simplereport.PleaseTryAgainLater")%> -
- <% - } - %> -
+ + + + + +
+

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.SimpleHistoryReport")%>

+<% +if (maintenanceUnderway == false) +{ + int k; + + // Read the parameters. + String reportConnection = variableContext.getParameter("reportconnection"); + if (reportConnection == null) + reportConnection = ""; + String[] reportActivities; + if (variableContext.getParameter("reportactivities_posted") != null) + { + reportActivities = variableContext.getParameterValues("reportactivities"); + if (reportActivities == null) + reportActivities = new String[0]; + } + else + reportActivities = null; + + // Get the current time, so we can fill in default values where possible. + long currentTime = System.currentTimeMillis(); + + Long startTime = null; + Long endTime = null; + + // Get start time, if selected + String startYear = variableContext.getParameter("reportstartyear"); + String startMonth = variableContext.getParameter("reportstartmonth"); + String startDay = variableContext.getParameter("reportstartday"); + String startHour = variableContext.getParameter("reportstarthour"); + String startMinute = variableContext.getParameter("reportstartminute"); + + // Get end time, if selected. + String endYear = variableContext.getParameter("reportendyear"); + String endMonth = variableContext.getParameter("reportendmonth"); + String endDay = variableContext.getParameter("reportendday"); + String endHour = variableContext.getParameter("reportendhour"); + String endMinute = variableContext.getParameter("reportendminute"); + + if (startYear == null && startMonth == null && startDay == null && startHour == null && startMinute == null && + endYear == null && endMonth == null && endDay == null && endHour == null && endMinute == null) + { + // Nobody has selected a time range yet. Pick the last hour. + endTime = null; + startTime = new Long(currentTime - 1000L * 60L * 60L); + } + else + { + // Get start time, if selected + if (startYear == null) + startYear = ""; + if (startMonth == null) + startMonth = ""; + if (startDay == null) + startDay = ""; + if (startHour == null) + startHour = ""; + if (startMinute == null) + startMinute = ""; + + // Get end time, if selected. + if (endYear == null) + endYear = ""; + if (endMonth == null) + endMonth = ""; + if (endDay == null) + endDay = ""; + if (endHour == null) + endHour = ""; + if (endMinute == null) + endMinute = ""; + + if (startYear.length() == 0 || startMonth.length() == 0 || startDay.length() == 0 || startHour.length() == 0 || startMinute.length() == 0) + { + // Undetermined start + startTime = null; + } + else + { + // Convert the specified times to a long. + Calendar c = new GregorianCalendar(); + c.set(Calendar.YEAR,Integer.parseInt(startYear)); + c.set(Calendar.MONTH,Integer.parseInt(startMonth)); + c.set(Calendar.DAY_OF_MONTH,Integer.parseInt(startDay) + 1); + c.set(Calendar.HOUR_OF_DAY,Integer.parseInt(startHour)); + c.set(Calendar.MINUTE,Integer.parseInt(startMinute)); + startTime = new Long(c.getTimeInMillis()); + } + if (endYear.length() == 0 || endMonth.length() == 0 || endDay.length() == 0 || endHour.length() == 0 || endMinute.length() == 0) + { + // Undetermined end + endTime = null; + } + else + { + // Convert the specified times to a long. + Calendar c = new GregorianCalendar(); + c.set(Calendar.YEAR,Integer.parseInt(endYear)); + c.set(Calendar.MONTH,Integer.parseInt(endMonth)); + c.set(Calendar.DAY_OF_MONTH,Integer.parseInt(endDay) + 1); + c.set(Calendar.HOUR_OF_DAY,Integer.parseInt(endHour)); + c.set(Calendar.MINUTE,Integer.parseInt(endMinute)); + endTime = new Long(c.getTimeInMillis()); + } + } + + // Now, turn the startTime and endTime back into fielded values. The values will be blank where there is no limit. + if (startTime == null) + { + startYear = ""; + startMonth = ""; + startDay = ""; + startHour = ""; + startMinute = ""; + } + else + { + // Do the conversion + Calendar c = new GregorianCalendar(); + c.setTimeInMillis(startTime.longValue()); + startYear = Integer.toString(c.get(Calendar.YEAR)); + startMonth = Integer.toString(c.get(Calendar.MONTH)); + startDay = Integer.toString(c.get(Calendar.DAY_OF_MONTH)-1); + startHour = Integer.toString(c.get(Calendar.HOUR_OF_DAY)); + startMinute = Integer.toString(c.get(Calendar.MINUTE)); + } + + if (endTime == null) + { + endYear = ""; + endMonth = ""; + endDay = ""; + endHour = ""; + endMinute = ""; + } + else + { + // Do the conversion + Calendar c = new GregorianCalendar(); + c.setTimeInMillis(endTime.longValue()); + endYear = Integer.toString(c.get(Calendar.YEAR)); + endMonth = Integer.toString(c.get(Calendar.MONTH)); + endDay = Integer.toString(c.get(Calendar.DAY_OF_MONTH)-1); + endHour = Integer.toString(c.get(Calendar.HOUR_OF_DAY)); + endMinute = Integer.toString(c.get(Calendar.MINUTE)); + } + + // Get the entity match string. + String entityMatch = variableContext.getParameter("reportentitymatch"); + if (entityMatch == null) + entityMatch = ""; + + // Get the resultcode match string. + String resultCodeMatch = variableContext.getParameter("reportresultcodematch"); + if (resultCodeMatch == null) + resultCodeMatch = ""; + + + // Read the other data we need. + IRepositoryConnectionManager connMgr = RepositoryConnectionManagerFactory.make(threadContext); + IRepositoryConnection[] connList = connMgr.getAllConnections(); + + // Query the legal list of activities. This will depend on the connection has been chosen, if any. + Map selectedActivities = null; + String[] activityList = null; + if (reportConnection.length() > 0) + { + activityList = org.apache.manifoldcf.crawler.system.ManifoldCF.getActivitiesList(threadContext,reportConnection); + if (activityList == null) + reportConnection = ""; + else + { + selectedActivities = new HashMap(); + String[] activitiesToNote; + int j = 0; + if (reportActivities == null) + activitiesToNote = activityList; + else + activitiesToNote = reportActivities; + + while (j < activitiesToNote.length) + { + String activity = activitiesToNote[j++]; + selectedActivities.put(activity,activity); + } + } + } + +%> + +
+ + + + + + + + +<% + if (reportConnection.length() > 0) + { +%> + +<% + } + else + { +%> + +<% + } +%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.Connection")%> + + <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.Activities")%> + + +

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.StartTime")%> + : + <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.on")%> + + , + +
<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.EndTime")%> + : + <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.on")%> + + , + +

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.EntityMatch")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.ResultCodeMatch")%>

+<% + if (reportConnection.length() > 0) + { +%> + " onClick="javascript:Go()" alt="<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"simplereport.ExecuteThisQuery")%>"/> +<% + } + else + { +%> + " onClick="javascript:Continue()" alt="<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"simplereport.Continue")%>"/> +<% + } +%> +

+<% + if (reportConnection.length() > 0) + { + // Run the report. + + // First, we need to gather the sort order object. + String sortOrderString = variableContext.getParameter("sortorder"); + SortOrder sortOrder; + if (sortOrderString == null || sortOrderString.length() == 0) + sortOrder = new SortOrder(); + else + sortOrder = new SortOrder(sortOrderString); + + // Now, gather the column header that was clicked on (if any) + String clickedColumn = variableContext.getParameter("clickcolumn"); + if (clickedColumn != null && clickedColumn.length() > 0) + sortOrder.clickColumn(clickedColumn); + + // Gather the start + String startRowString = variableContext.getParameter("startrow"); + int startRow = 0; + if (startRowString != null && startRowString.length() > 0) + startRow = Integer.parseInt(startRowString); + + // Gather the max + String maxRowCountString = variableContext.getParameter("rowcount"); + int rowCount = 20; + if (maxRowCountString != null && maxRowCountString.length() > 0) + rowCount = Integer.parseInt(maxRowCountString); + + String[] ourActivities = new String[selectedActivities.size()]; + Iterator iter = selectedActivities.keySet().iterator(); + int zz = 0; + while (iter.hasNext()) + { + ourActivities[zz++] = (String)iter.next(); + } + + RegExpCriteria entityMatchObject = null; + if (entityMatch.length() > 0) + entityMatchObject = new RegExpCriteria(entityMatch,true); + RegExpCriteria resultCodeMatchObject = null; + if (resultCodeMatch.length() > 0) + resultCodeMatchObject = new RegExpCriteria(resultCodeMatch,true); + FilterCriteria criteria = new FilterCriteria(ourActivities,startTime,endTime,entityMatchObject,resultCodeMatchObject); + + IResultSet set = connMgr.genHistorySimple(reportConnection,criteria,sortOrder,startRow,rowCount+1); + +%> + + + + + + + + + + + + + + +<% + zz = 0; + + boolean hasMoreRows = (set.getRowCount() > rowCount); + int iterCount = hasMoreRows?rowCount:set.getRowCount(); + while (zz < iterCount) + { + IResultRow row = set.getRow(zz); + String startTimeString = org.apache.manifoldcf.ui.util.Formatter.formatTime(Converter.asLong(row.getValue("starttime"))); + String resultCode = ""; + Object resultCodeObject = row.getValue("resultcode"); + if (resultCodeObject != null) + resultCode = resultCodeObject.toString(); + String resultDescription = ""; + Object resultDescriptionObject = row.getValue("resultdesc"); + resultDescriptionObject = row.getValue("resultdesc"); + if (resultDescriptionObject != null) + resultDescription = resultDescriptionObject.toString(); + String[] identifierBreakdown = org.apache.manifoldcf.ui.util.Formatter.formatString(row.getValue("identifier").toString(),64,true,true); +%> + > + + + + + + + + +<% + zz++; + } +%> +
<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.StartTime")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.Activity")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.Identifier")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.ResultCode")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.Bytes")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.Time")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.ResultDescription")%>
<%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(startTimeString)%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(row.getValue("activity").toString())%> +<% + int q = 0; + while (q < identifierBreakdown.length) + { +%> + <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(identifierBreakdown[q++])%>
+<% + } +%> +
<%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(resultCode)%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(row.getValue("bytes").toString())%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(row.getValue("elapsedtime").toString())%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(resultDescription)%>
+ + + + + + +
+ +<% + if (startRow == 0) + { +%> + <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.Previous")%> +<% + } + else + { +%> + "><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.Previous")%> +<% + } +%> + + +<% + if (hasMoreRows == false) + { +%> + <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.Next")%> +<% + } + else + { +%> + "><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.Next")%> +<% + } +%> + + + <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.Rows")%> + <%=Integer.toString(startRow)%>-<%=(hasMoreRows?Integer.toString(startRow+rowCount-1):"END")%> + + <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.RowsPerPage")%> + +
+ +<% + } + else + { +%> +
<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.PleaseSelectAConnection")%>
+<% + } +%> +
+<% +} +else +{ +%> + + + +

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.PleaseTryAgainLater")%>
+<% +} +%> +