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 8368A1802E for ; Sat, 4 Jul 2015 12:55:33 +0000 (UTC) Received: (qmail 83302 invoked by uid 500); 4 Jul 2015 12:55:33 -0000 Delivered-To: apmail-manifoldcf-commits-archive@manifoldcf.apache.org Received: (qmail 83195 invoked by uid 500); 4 Jul 2015 12:55:33 -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 83165 invoked by uid 99); 4 Jul 2015 12:55:33 -0000 Received: from eris.apache.org (HELO hades.apache.org) (140.211.11.105) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Jul 2015 12:55:33 +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 E6C2AAC08E5 for ; Sat, 4 Jul 2015 12:55:32 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1689152 [3/6] - in /manifoldcf/branches/CONNECTORS-1131/framework/crawler-ui/src/main/webapp: documentstatus.jsp maxactivityreport.jsp maxbandwidthreport.jsp queuestatus.jsp resultreport.jsp simplereport.jsp Date: Sat, 04 Jul 2015 12:55:32 -0000 To: commits@manifoldcf.apache.org From: kwright@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20150704125532.E6C2AAC08E5@hades.apache.org> Modified: manifoldcf/branches/CONNECTORS-1131/framework/crawler-ui/src/main/webapp/maxbandwidthreport.jsp URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1131/framework/crawler-ui/src/main/webapp/maxbandwidthreport.jsp?rev=1689152&r1=1689151&r2=1689152&view=diff ============================================================================== --- manifoldcf/branches/CONNECTORS-1131/framework/crawler-ui/src/main/webapp/maxbandwidthreport.jsp (original) +++ manifoldcf/branches/CONNECTORS-1131/framework/crawler-ui/src/main/webapp/maxbandwidthreport.jsp Sat Jul 4 12:55:31 2015 @@ -20,158 +20,27 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -boolean maintenanceUnderway = org.apache.manifoldcf.crawler.system.ManifoldCF.checkMaintenanceUnderway(); - %> - - - - - - - - - - <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxbandwidthreport.ApacheManifoldCFMaximumBandwidthReport")%> - - - - - - - - - - - - - - -
-

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxbandwidthreport.MaximumBandwidthReport")%>

+%> + <% -if (maintenanceUnderway == false) -{ + } + int k; // Read the parameters. @@ -367,17 +236,164 @@ if (maintenanceUnderway == false) } %> -
- - - - - - - -

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

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxbandwidthreport.MaximumBandwidthReport")%>

+ + + + + + + + + + + <% if (reportConnection.length() > 0) { %> - + + <% } else { %> - + <% } %> - - - - - - - + + + + + + - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + -

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

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxbandwidthreport.StartTime")%> -

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

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

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxbandwidthreport.IdentifierClassDescription")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxbandwidthreport.SlidingWindowSize")%>

+ , + +

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

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxbandwidthreport.IdentifierClassDescription")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxbandwidthreport.SlidingWindowSize")%>

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


+
<% if (reportConnection.length() > 0) { @@ -706,9 +728,9 @@ if (maintenanceUnderway == false) resultCodeMatchObject = new RegExpCriteria(resultCodeMatch,true); FilterCriteria criteria = new FilterCriteria(ourActivities,startTime,endTime,entityMatchObject,resultCodeMatchObject); %> - - - + + + <% long count = connMgr.countHistoryRows(reportConnection,criteria); long maxCount = connMgr.getMaxRows(); @@ -717,7 +739,7 @@ if (maintenanceUnderway == false) { hasMoreRows = false; %> -
You have selected <%=new Long(count).toString()%> rows. Maximum allowed is <%=new Long(maxCount).toString()%>.
+
You have selected <%=new Long(count).toString()%> rows. Maximum allowed is <%=new Long(maxCount).toString()%>.
<% } else @@ -729,66 +751,66 @@ if (maintenanceUnderway == false) %> - - - - - - - +
<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxbandwidthreport.IdentifierClass")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxbandwidthreport.HighestBandwidth")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxbandwidthreport.StartTime")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxbandwidthreport.EndTime")%>
+ + + + + + <% zz = 0; hasMoreRows = (set.getRowCount() > rowCount); int iterCount = hasMoreRows?rowCount:set.getRowCount(); while (zz < iterCount) { - IResultRow row = set.getRow(zz); - Object idBucketObject = row.getValue("idbucket"); - String idBucketString; - if (idBucketObject == null) - idBucketString = ""; - else - idBucketString = idBucketObject.toString(); - String startTimeString = org.apache.manifoldcf.ui.util.Formatter.formatTime(Converter.asLong(row.getValue("starttime"))); - String endTimeString = org.apache.manifoldcf.ui.util.Formatter.formatTime(Converter.asLong(row.getValue("endtime").toString())); - double byteCount = Converter.asDouble(row.getValue("bytecount")); + IResultRow row = set.getRow(zz); + Object idBucketObject = row.getValue("idbucket"); + String idBucketString; + if (idBucketObject == null) + idBucketString = ""; + else + idBucketString = idBucketObject.toString(); + String startTimeString = org.apache.manifoldcf.ui.util.Formatter.formatTime(Converter.asLong(row.getValue("starttime"))); + String endTimeString = org.apache.manifoldcf.ui.util.Formatter.formatTime(Converter.asLong(row.getValue("endtime").toString())); + double byteCount = Converter.asDouble(row.getValue("bytecount")); double bandwidth = byteCount * 1000.0 / intervalMilliseconds; %> - > - - - - - + > + + + + + <% zz++; } %> -
<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxbandwidthreport.IdentifierClass")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxbandwidthreport.HighestBandwidth")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxbandwidthreport.StartTime")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxbandwidthreport.EndTime")%>
<%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(idBucketString)%><%=new Double(bandwidth).toString()%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(startTimeString)%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(endTimeString)%>
<%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(idBucketString)%><%=new Double(bandwidth).toString()%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(startTimeString)%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(endTimeString)%>
+
<% } %> - - - + + + +
- + + + - - - -
+ <% if (startRow == 0) { %> - <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxbandwidthreport.Previous")%> + <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxbandwidthreport.Previous")%> <% } else { %> - "><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxbandwidthreport.Previous")%> + "><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxbandwidthreport.Previous")%> <% } %> - - + + <% if (hasMoreRows == false) { @@ -799,48 +821,48 @@ if (maintenanceUnderway == false) else { %> - "><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxbandwidthreport.Next")%> + "><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxbandwidthreport.Next")%> <% } %> - - - <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxbandwidthreport.Rows")%> - <%=Integer.toString(startRow)%>-<%=(hasMoreRows?Integer.toString(startRow+rowCount-1):"END")%> - - <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxbandwidthreport.RowsPerPage")%> - -
+
+
+ <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxbandwidthreport.Rows")%> + <%=Integer.toString(startRow)%>-<%=(hasMoreRows?Integer.toString(startRow+rowCount-1):"END")%> + + <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxbandwidthreport.RowsPerPage")%> + +
<% } else { %> -
<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxbandwidthreport.PleaseSelectAConnection")%>
+
<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxbandwidthreport.PleaseSelectAConnection")%>
<% } %> -
+ <% } -else +catch (ManifoldCFException e) { + e.printStackTrace(); + variableContext.setParameter("text",e.getMessage()); + variableContext.setParameter("target","index.jsp"); %> - - - -

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