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 07FA218B1E for ; Wed, 8 Jul 2015 22:01:12 +0000 (UTC) Received: (qmail 64803 invoked by uid 500); 8 Jul 2015 22:01:11 -0000 Delivered-To: apmail-manifoldcf-commits-archive@manifoldcf.apache.org Received: (qmail 64676 invoked by uid 500); 8 Jul 2015 22:01:11 -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 64428 invoked by uid 99); 8 Jul 2015 22:01:11 -0000 Received: from eris.apache.org (HELO hades.apache.org) (140.211.11.105) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Jul 2015 22:01:11 +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 6A508AC0164 for ; Wed, 8 Jul 2015 22:01:11 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1689968 [7/14] - in /manifoldcf/branches/CONNECTORS-1196: ./ connectors/elasticsearch/ connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/ connectors/solr/connector/src/main/native2ascii/org/apache/manifoldcf/... Date: Wed, 08 Jul 2015 22:01:09 -0000 To: commits@manifoldcf.apache.org From: kishore@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20150708220111.6A508AC0164@hades.apache.org> Modified: manifoldcf/branches/CONNECTORS-1196/framework/crawler-ui/src/main/webapp/listoutputs.jsp URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1196/framework/crawler-ui/src/main/webapp/listoutputs.jsp?rev=1689968&r1=1689967&r2=1689968&view=diff ============================================================================== --- manifoldcf/branches/CONNECTORS-1196/framework/crawler-ui/src/main/webapp/listoutputs.jsp (original) +++ manifoldcf/branches/CONNECTORS-1196/framework/crawler-ui/src/main/webapp/listoutputs.jsp Wed Jul 8 22:01:08 2015 @@ -22,6 +22,23 @@ */ %> +<% +try +{ + // Check if authorized + if (!adminprofile.checkAllowed(threadContext,IAuthorizer.CAPABILITY_VIEW_CONNECTIONS)) + { + variableContext.setParameter("target","index.jsp"); +%> + +<% + } + // Get the output connection manager handle + IOutputConnectionManager manager = OutputConnectionManagerFactory.make(threadContext); + IOutputConnectorManager connectorManager = OutputConnectorManagerFactory.make(threadContext); + IOutputConnection[] connections = manager.getAllConnections(); +%> + @@ -37,15 +54,15 @@ @@ -54,35 +71,28 @@ - - - - - -
-

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listoutputs.ListOfOutputConnections")%>

-
- - - - -<% - try - { - // Get the output connection manager handle - IOutputConnectionManager manager = OutputConnectionManagerFactory.make(threadContext); - IOutputConnectorManager connectorManager = OutputConnectorManagerFactory.make(threadContext); - IOutputConnection[] connections = manager.getAllConnections(); -%> - - - - - - - - - - - +

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listoutputs.Name")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listoutputs.Description")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listoutputs.ConnectionType")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listoutputs.Max")%>
+ + + + + + + +
+

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listoutputs.ListOfOutputConnections")%>

+ + + + + + + + + + + + + + + + <% int i = 0; while (i < connections.length) @@ -100,44 +110,44 @@ int maxCount = connection.getMaxConnections(); %> - > - - - - - - + > + + + + + + <% } %> - - - - -

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listoutputs.Name")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listoutputs.Description")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listoutputs.ConnectionType")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listoutputs.Max")%>
- - <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listoutputs.View")%> - <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listoutputs.Edit")%> - <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listoutputs.Delete")%> - - <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(name)%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(description)%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(connectorName)%><%=Integer.toString(maxCount)%>
+ + <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listoutputs.View")%> + <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listoutputs.Edit")%> + <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listoutputs.Delete")%> + + <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(name)%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(description)%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(connectorName)%><%=Integer.toString(maxCount)%>

"><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listoutputs.AddaNewOutputConnection")%>
+

"><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listoutputs.AddaNewOutputConnection")%>
<% - } - catch (ManifoldCFException e) - { +} +catch (ManifoldCFException e) +{ e.printStackTrace(); variableContext.setParameter("text",e.getMessage()); variableContext.setParameter("target","index.jsp"); %> <% - } +} %> - -
+ + + + Modified: manifoldcf/branches/CONNECTORS-1196/framework/crawler-ui/src/main/webapp/listtransformations.jsp URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1196/framework/crawler-ui/src/main/webapp/listtransformations.jsp?rev=1689968&r1=1689967&r2=1689968&view=diff ============================================================================== --- manifoldcf/branches/CONNECTORS-1196/framework/crawler-ui/src/main/webapp/listtransformations.jsp (original) +++ manifoldcf/branches/CONNECTORS-1196/framework/crawler-ui/src/main/webapp/listtransformations.jsp Wed Jul 8 22:01:08 2015 @@ -22,6 +22,23 @@ */ %> +<% +try +{ + // Check if authorized + if (!adminprofile.checkAllowed(threadContext,IAuthorizer.CAPABILITY_VIEW_CONNECTIONS)) + { + variableContext.setParameter("target","index.jsp"); +%> + +<% + } + // Get the transformation connection manager handle + ITransformationConnectionManager manager = TransformationConnectionManagerFactory.make(threadContext); + ITransformationConnectorManager connectorManager = TransformationConnectorManagerFactory.make(threadContext); + ITransformationConnection[] connections = manager.getAllConnections(); +%> + @@ -37,15 +54,15 @@ @@ -54,35 +71,28 @@ - - - - - -
-

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listtransformations.ListOfTransformationConnections")%>

-
- - - - -<% - try - { - // Get the transformation connection manager handle - ITransformationConnectionManager manager = TransformationConnectionManagerFactory.make(threadContext); - ITransformationConnectorManager connectorManager = TransformationConnectorManagerFactory.make(threadContext); - ITransformationConnection[] connections = manager.getAllConnections(); -%> - - - - - - - - - - - +

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listtransformations.Name")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listtransformations.Description")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listtransformations.ConnectionType")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listtransformations.Max")%>
+ + + + + + + +
+

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listtransformations.ListOfTransformationConnections")%>

+ + + + + + + + + + + + + + + + <% int i = 0; while (i < connections.length) @@ -100,44 +110,44 @@ int maxCount = connection.getMaxConnections(); %> - > - - - - - - + > + + + + + + <% } %> - - - - -

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listtransformations.Name")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listtransformations.Description")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listtransformations.ConnectionType")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listtransformations.Max")%>
- - <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listtransformations.View")%> - <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listtransformations.Edit")%> - <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listtransformations.Delete")%> - - <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(name)%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(description)%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(connectorName)%><%=Integer.toString(maxCount)%>
+ + <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listtransformations.View")%> + <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listtransformations.Edit")%> + <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listtransformations.Delete")%> + + <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(name)%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(description)%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(connectorName)%><%=Integer.toString(maxCount)%>

"><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listtransformations.AddaNewTransformationConnection")%>
+

"><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listtransformations.AddaNewTransformationConnection")%>
<% - } - catch (ManifoldCFException e) - { +} +catch (ManifoldCFException e) +{ e.printStackTrace(); variableContext.setParameter("text",e.getMessage()); variableContext.setParameter("target","index.jsp"); %> <% - } +} %> - -
+ + + + Modified: manifoldcf/branches/CONNECTORS-1196/framework/crawler-ui/src/main/webapp/maxactivityreport.jsp URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1196/framework/crawler-ui/src/main/webapp/maxactivityreport.jsp?rev=1689968&r1=1689967&r2=1689968&view=diff ============================================================================== --- manifoldcf/branches/CONNECTORS-1196/framework/crawler-ui/src/main/webapp/maxactivityreport.jsp (original) +++ manifoldcf/branches/CONNECTORS-1196/framework/crawler-ui/src/main/webapp/maxactivityreport.jsp Wed Jul 8 22:01:08 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(),"maxactivityreport.ApacheManifoldCFMaximumActivityReport")%> - - - - - - - - - - - - - - -
-

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxactivityreport.MaximumActivityReport")%>

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

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

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxactivityreport.MaximumActivityReport")%>

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

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

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

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

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

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

+ , + +

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

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

<% if (reportConnection.length() > 0) { %> - " onClick="javascript:Go()" alt="<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"maxactivityreport.ExecuteThisQuery")%>"/> + " onClick="javascript:Go()" alt="<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"maxactivityreport.ExecuteThisQuery")%>"/> <% } else { %> - " onClick="javascript:Continue()" alt="<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"maxactivityreport.Continue")%>"/> + " onClick="javascript:Continue()" alt="<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"maxactivityreport.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,119 +751,119 @@ if (maintenanceUnderway == false) %> - - - - - - - +
<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxactivityreport.IdentifierClass")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxactivityreport.HighestActivityRate")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxactivityreport.StartTime")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxactivityreport.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"))); - double activityCount = Converter.asDouble(row.getValue("activitycount")); - double activityRate = activityCount * 60000.0 / intervalMilliseconds; - -%> - > - - - - - + 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"))); + double activityCount = Converter.asDouble(row.getValue("activitycount")); + double activityRate = activityCount * 60000.0 / intervalMilliseconds; + +%> + > + + + + + <% zz++; } %> -
<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxactivityreport.IdentifierClass")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxactivityreport.HighestActivityRate")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxactivityreport.StartTime")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxactivityreport.EndTime")%>
<%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(idBucketString)%><%=new Double(activityRate).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(activityRate).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(),"maxactivityreport.Previous")%> + <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxactivityreport.Previous")%> <% } else { %> - "><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxactivityreport.Previous")%> + "><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxactivityreport.Previous")%> <% } %> - - + + <% if (hasMoreRows == false) { %> - <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxactivityreport.Next")%> + <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxactivityreport.Next")%> <% } else { %> - "><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxactivityreport.Next")%> + "><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxactivityreport.Next")%> <% } %> - - - <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxactivityreport.Rows")%> - <%=Integer.toString(startRow)%>-<%=(hasMoreRows?Integer.toString(startRow+rowCount-1):"END")%> - - <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxactivityreport.RowsPerPage")%> - -
+
+
+ <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxactivityreport.Rows")%> + <%=Integer.toString(startRow)%>-<%=(hasMoreRows?Integer.toString(startRow+rowCount-1):"END")%> + + <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxactivityreport.RowsPerPage")%> + +
<% } else { %> -
<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxactivityreport.PleaseSelectAConnection")%>
+
<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxactivityreport.PleaseSelectAConnection")%>
<% } %> -
+ <% } -else +catch (ManifoldCFException e) { + e.printStackTrace(); + variableContext.setParameter("text",e.getMessage()); + variableContext.setParameter("target","index.jsp"); %> - - - -

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