[30/51] [partial] incubator-nifi git commit: Initial code contribution
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/nar-bundles/execute-script-bundle/execute-script-processors/src/test/resources/readTest.js -- diff --git a/nar-bundles/execute-script-bundle/execute-script-processors/src/test/resources/readTest.js b/nar-bundles/execute-script-bundle/execute-script-processors/src/test/resources/readTest.js new file mode 100644 index 000..f5d3ecc --- /dev/null +++ b/nar-bundles/execute-script-bundle/execute-script-processors/src/test/resources/readTest.js @@ -0,0 +1,30 @@ +/* + * 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. + */ +with (Scripting) { + +var instance = new ReaderScript({ +route: function (input) { +str = IOUtils.toString(input); +if (str.match(/sed do/i)) { +return Script.FAIL_RELATIONSHIP; +} else { +return Script.SUCCESS_RELATIONSHIP; +} +} +}); +logger.debug(Got a logger and properties + properties); +} http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/nar-bundles/execute-script-bundle/execute-script-processors/src/test/resources/readTest.py -- diff --git a/nar-bundles/execute-script-bundle/execute-script-processors/src/test/resources/readTest.py b/nar-bundles/execute-script-bundle/execute-script-processors/src/test/resources/readTest.py new file mode 100644 index 000..91e6ca7 --- /dev/null +++ b/nar-bundles/execute-script-bundle/execute-script-processors/src/test/resources/readTest.py @@ -0,0 +1,32 @@ +# 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. +import os, re, subprocess + +class SimpleJythonReader(ReaderScript): +def route(self, input): +logger.info(In route) +returnid = os.system(c:\\cygwin\\bin\\echo GOOD) +fname = self.getAttribute(filename) +counter = self.getAttribute(counter) +fname = fname + '.' + counter +self.setAttribute(filename, fname) +for line in FileUtil.wrap(input): +if re.match(^sed,line): return self.FAIL_RELATIONSHIP + +return self.SUCCESS_RELATIONSHIP + + + +instance = SimpleJythonReader() http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/nar-bundles/execute-script-bundle/execute-script-processors/src/test/resources/readTest.rb -- diff --git a/nar-bundles/execute-script-bundle/execute-script-processors/src/test/resources/readTest.rb b/nar-bundles/execute-script-bundle/execute-script-processors/src/test/resources/readTest.rb new file mode 100644 index 000..c10765d --- /dev/null +++ b/nar-bundles/execute-script-bundle/execute-script-processors/src/test/resources/readTest.rb @@ -0,0 +1,30 @@ +# 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
[28/51] [partial] incubator-nifi git commit: Initial code contribution
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/admin/service/UserService.java -- diff --git a/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/admin/service/UserService.java b/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/admin/service/UserService.java new file mode 100644 index 000..76e54d6 --- /dev/null +++ b/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/admin/service/UserService.java @@ -0,0 +1,148 @@ +/* + * 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. + */ +package org.apache.nifi.admin.service; + +import java.util.Collection; +import java.util.Set; +import org.apache.nifi.authorization.Authority; +import org.apache.nifi.user.NiFiUser; +import org.apache.nifi.user.NiFiUserGroup; + +/** + * Manages NiFi user accounts. + */ +public interface UserService { + +/** + * Creates a new user account using the specified dn and justification. + * + * @param dn + * @param justification + * @return + */ +NiFiUser createPendingUserAccount(String dn, String justification); + +/** + * Determines if there are any PENDING user accounts present. + * + * @return + */ +Boolean hasPendingUserAccount(); + +/** + * Updates a user group using the specified group comprised of the specified + * users. Returns all the users that are currently in the specified group. + * + * @param group + * @param userIds + * @param authorities + * @return + */ +NiFiUserGroup updateGroup(String group, SetString userIds, SetAuthority authorities); + +/** + * Authorizes the user specified. + * + * @param dn + * @return + */ +NiFiUser checkAuthorization(String dn); + +/** + * Deletes the user with the specified id. + * + * @param id + */ +void deleteUser(String id); + +/** + * Disables the specified users account. + * + * @param id + * @return + */ +NiFiUser disable(String id); + +/** + * Disables the specified user group. + * + * @param group + * @return + */ +NiFiUserGroup disableGroup(String group); + +/** + * Updates the specified user with the specified authorities. + * + * @param id + * @param authorities + * @return + */ +NiFiUser update(String id, SetAuthority authorities); + +/** + * Invalidates the specified user account. + * + * @param id + */ +void invalidateUserAccount(String id); + +/** + * Invalidates the user accounts associated with the specified user group. + * + * @param group + */ +void invalidateUserGroupAccount(String group); + +/** + * Ungroups the specified group. + * + * @param group + */ +void ungroup(String group); + +/** + * Ungroups the specified user. + * + * @param id + */ +void ungroupUser(String id); + +/** + * Returns a collection of all NiFiUsers. + * + * @return + */ +CollectionNiFiUser getUsers(); + +/** + * Finds the specified user by id. + * + * @param id + * @return + */ +NiFiUser getUserById(String id); + +/** + * Finds the specified user by dn. + * + * @param dn + * @return + * @throws AdministrationException + */ +NiFiUser getUserByDn(String dn); +} http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/admin/service/action/AbstractUserAction.java -- diff --git a/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/admin/service/action/AbstractUserAction.java b/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/admin/service/action/AbstractUserAction.java new file mode 100644 index 000..41c97fe --- /dev/null +++
[03/51] [partial] incubator-nifi git commit: Initial code contribution
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/FlowFromDOMFactory.java -- diff --git a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/FlowFromDOMFactory.java b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/FlowFromDOMFactory.java new file mode 100644 index 000..c67181a --- /dev/null +++ b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/FlowFromDOMFactory.java @@ -0,0 +1,418 @@ +/* + * 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. + */ +package org.apache.nifi.controller; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.concurrent.TimeUnit; + +import org.apache.nifi.connectable.Size; +import org.apache.nifi.encrypt.StringEncryptor; +import org.apache.nifi.groups.RemoteProcessGroupPortDescriptor; +import org.apache.nifi.remote.StandardRemoteProcessGroupPortDescriptor; +import org.apache.nifi.scheduling.SchedulingStrategy; +import org.apache.nifi.util.DomUtils; +import org.apache.nifi.web.api.dto.ConnectableDTO; +import org.apache.nifi.web.api.dto.ConnectionDTO; +import org.apache.nifi.web.api.dto.FlowSnippetDTO; +import org.apache.nifi.web.api.dto.FunnelDTO; +import org.apache.nifi.web.api.dto.LabelDTO; +import org.apache.nifi.web.api.dto.PortDTO; +import org.apache.nifi.web.api.dto.PositionDTO; +import org.apache.nifi.web.api.dto.ProcessGroupDTO; +import org.apache.nifi.web.api.dto.ProcessorConfigDTO; +import org.apache.nifi.web.api.dto.ProcessorDTO; +import org.apache.nifi.web.api.dto.RemoteProcessGroupDTO; + +import org.w3c.dom.Element; +import org.w3c.dom.NodeList; + +public class FlowFromDOMFactory { + +public static PositionDTO getPosition(final Element positionElement) { +if (positionElement == null) { +throw new IllegalArgumentException(Invalid Flow: Found no 'position' element); +} +return new PositionDTO(Double.parseDouble(positionElement.getAttribute(x)), Double.parseDouble(positionElement.getAttribute(y))); +} + +public static Size getSize(final Element sizeElement) { +if (sizeElement == null) { +throw new IllegalArgumentException(Invalid Flow: Found no 'size' element); +} + +return new Size(Double.parseDouble(sizeElement.getAttribute(width)), Double.parseDouble(sizeElement.getAttribute(height))); +} + +public static MapString, String getStyle(final Element stylesElement) { +final MapString, String styles = new HashMap(); +if (stylesElement == null) { +return styles; +} + +for (final Element styleElement : getChildrenByTagName(stylesElement, style)) { +final String styleName = styleElement.getAttribute(name); +final String styleValue = styleElement.getTextContent(); +styles.put(styleName, styleValue); +} + +return styles; +} + +public static ProcessGroupDTO getProcessGroup(final String parentId, final Element element, final StringEncryptor encryptor) { +final ProcessGroupDTO dto = new ProcessGroupDTO(); +final String groupId = getString(element, id); +dto.setId(groupId); +dto.setParentGroupId(parentId); +dto.setName(getString(element, name)); +dto.setPosition(getPosition(DomUtils.getChild(element, position))); +dto.setComments(getString(element, comment)); + +final SetProcessorDTO processors = new HashSet(); +final SetConnectionDTO connections = new HashSet(); +final SetFunnelDTO funnels = new HashSet(); +final SetPortDTO inputPorts = new HashSet(); +final SetPortDTO outputPorts = new HashSet(); +final SetLabelDTO labels = new HashSet(); +final SetProcessGroupDTO processGroups = new HashSet(); +final SetRemoteProcessGroupDTO remoteProcessGroups = new HashSet(); + +final FlowSnippetDTO
[31/51] [partial] incubator-nifi git commit: Initial code contribution
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/nar-bundles/execute-script-bundle/execute-script-processors/src/main/resources/docs/org.apache.nifi.processors.script.ExecuteScript/index.html -- diff --git a/nar-bundles/execute-script-bundle/execute-script-processors/src/main/resources/docs/org.apache.nifi.processors.script.ExecuteScript/index.html b/nar-bundles/execute-script-bundle/execute-script-processors/src/main/resources/docs/org.apache.nifi.processors.script.ExecuteScript/index.html new file mode 100644 index 000..acb47c5 --- /dev/null +++ b/nar-bundles/execute-script-bundle/execute-script-processors/src/main/resources/docs/org.apache.nifi.processors.script.ExecuteScript/index.html @@ -0,0 +1,264 @@ +!DOCTYPE html +html lang=en +!-- + 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. +-- +head +meta charset=utf-8 / +titleExecuteScript/title + +link rel=stylesheet href=../../css/component-usage.css type=text/css / +/head + +body +!-- Processor Documentation == -- +h2Description:/h2 +p +This processor provides the capability to execute scripts in various scripting languages, and passes into the scripts +the input stream and output stream(s) representing an incoming flow file and any created flow files. The processor is designed to be +thread safe, so multiple concurrent tasks may execute against a single script. The processor provides a framework which enables +script writers to implement 3 different types of scripts: +ul +ReaderScript - which enables stream-based reading of a FlowFile's content/br +WriterScript - which enables stream-based reading and writing/modifying of a FlowFile's content/br +ConverterScript - which enables stream-based reading a FlowFile's content and stream-based writing to newly created FlowFiles/br +/ul +Presently, the processor supports 3 scripting languages: Ruby, Python, and JavaScript. The processor is built on the +javax.script API which enables ScriptEngine discovery, thread management, and encapsulates much of the low level bridging-code that +enables Java to Script language integration. Thus, it is designed to be easily extended to other scripting languages. /br +The attributes of a FlowFile and properties of the Processor are exposed to the script by either a variable in the base class or +a getter method. A script may declare new Processor Properties and different Relationships via overriding the getPropertyDescriptors +and getRelationships methods, respectively. +/p +The processor provides some boilerplate script to aid in the creation of the three different types of scripts. For example, +the processor provides import statements for classes commonly used within a processor. +pre +'org.apache.nifi.components.PropertyDescriptor' +'org.apache.nifi.components.Validator' +'org.apache.nifi.processor.util.StandardValidators' +'org.apache.nifi.processor.Relationship' +'org.apache.nifi.logging.ProcessorLog' +'org.apache.nifi.scripting.ReaderScript' +'org.apache.nifi.scripting.WriterScript' +'org.apache.nifi.scripting.ConverterScript' +/pre +The processor appends to the script's execution path the parent directory of the specified script file and a sub-directory +called 'lib', which may be useful for supporting scripts. /p +p +strongShared Variables/strong +/p +The following variables are provided as shared variables for the scripts: +ul +lilogger +ul +li The processor's logger /li +li Scope is GLOBAL, thus in Ruby the syntax is $logger/li +/ul +/li +liproperties +ul +li A Map of the processor's configuration properties; key and value are strings/li +li Scope is INSTANCE, thus in Ruby the
[13/51] [partial] incubator-nifi git commit: Initial code contribution
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/nar-bundles/framework-bundle/framework/cluster/src/main/java/org/apache/nifi/cluster/manager/exception/DisconnectedNodeMutableRequestException.java -- diff --git a/nar-bundles/framework-bundle/framework/cluster/src/main/java/org/apache/nifi/cluster/manager/exception/DisconnectedNodeMutableRequestException.java b/nar-bundles/framework-bundle/framework/cluster/src/main/java/org/apache/nifi/cluster/manager/exception/DisconnectedNodeMutableRequestException.java new file mode 100644 index 000..412a555 --- /dev/null +++ b/nar-bundles/framework-bundle/framework/cluster/src/main/java/org/apache/nifi/cluster/manager/exception/DisconnectedNodeMutableRequestException.java @@ -0,0 +1,41 @@ +/* + * 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. + */ +package org.apache.nifi.cluster.manager.exception; + +/** + * Represents the exceptional case when a HTTP request that may change a node's + * dataflow is to be replicated while one or more nodes are disconnected. + * + * @author unattributed + */ +public class DisconnectedNodeMutableRequestException extends MutableRequestException { + +public DisconnectedNodeMutableRequestException() { +} + +public DisconnectedNodeMutableRequestException(String msg) { +super(msg); +} + +public DisconnectedNodeMutableRequestException(Throwable cause) { +super(cause); +} + +public DisconnectedNodeMutableRequestException(String msg, Throwable cause) { +super(msg, cause); +} +} http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/nar-bundles/framework-bundle/framework/cluster/src/main/java/org/apache/nifi/cluster/manager/exception/IllegalClusterStateException.java -- diff --git a/nar-bundles/framework-bundle/framework/cluster/src/main/java/org/apache/nifi/cluster/manager/exception/IllegalClusterStateException.java b/nar-bundles/framework-bundle/framework/cluster/src/main/java/org/apache/nifi/cluster/manager/exception/IllegalClusterStateException.java new file mode 100644 index 000..6c4e670 --- /dev/null +++ b/nar-bundles/framework-bundle/framework/cluster/src/main/java/org/apache/nifi/cluster/manager/exception/IllegalClusterStateException.java @@ -0,0 +1,41 @@ +/* + * 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. + */ +package org.apache.nifi.cluster.manager.exception; + +/** + * Signals that an operation to be performed on a cluster has been invoked at an + * illegal or inappropriate time. + * + * @author unattributed + */ +public class IllegalClusterStateException extends ClusterException { + +public IllegalClusterStateException() { +} + +public IllegalClusterStateException(String msg) { +super(msg); +} + +public IllegalClusterStateException(Throwable cause) { +super(cause); +} + +public IllegalClusterStateException(String msg, Throwable cause) { +super(msg, cause); +} +} http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/nar-bundles/framework-bundle/framework/cluster/src/main/java/org/apache/nifi/cluster/manager/exception/IllegalNodeDeletionException.java -- diff --git
[44/51] [partial] incubator-nifi git commit: Initial code contribution
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/commons/nifi-expression-language/src/main/java/org/apache/nifi/attribute/expression/language/evaluation/literals/NumberLiteralEvaluator.java -- diff --git a/commons/nifi-expression-language/src/main/java/org/apache/nifi/attribute/expression/language/evaluation/literals/NumberLiteralEvaluator.java b/commons/nifi-expression-language/src/main/java/org/apache/nifi/attribute/expression/language/evaluation/literals/NumberLiteralEvaluator.java new file mode 100644 index 000..d7569e0 --- /dev/null +++ b/commons/nifi-expression-language/src/main/java/org/apache/nifi/attribute/expression/language/evaluation/literals/NumberLiteralEvaluator.java @@ -0,0 +1,44 @@ +/* + * 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. + */ +package org.apache.nifi.attribute.expression.language.evaluation.literals; + +import java.util.Map; + +import org.apache.nifi.attribute.expression.language.evaluation.Evaluator; +import org.apache.nifi.attribute.expression.language.evaluation.NumberEvaluator; +import org.apache.nifi.attribute.expression.language.evaluation.NumberQueryResult; +import org.apache.nifi.attribute.expression.language.evaluation.QueryResult; + +public class NumberLiteralEvaluator extends NumberEvaluator { + +private final long literal; + +public NumberLiteralEvaluator(final String value) { +this.literal = Long.parseLong(value); +} + +@Override +public QueryResultLong evaluate(final MapString, String attributes) { +return new NumberQueryResult(literal); +} + +@Override +public Evaluator? getSubjectEvaluator() { +return null; +} + +} http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/commons/nifi-expression-language/src/main/java/org/apache/nifi/attribute/expression/language/evaluation/literals/StringLiteralEvaluator.java -- diff --git a/commons/nifi-expression-language/src/main/java/org/apache/nifi/attribute/expression/language/evaluation/literals/StringLiteralEvaluator.java b/commons/nifi-expression-language/src/main/java/org/apache/nifi/attribute/expression/language/evaluation/literals/StringLiteralEvaluator.java new file mode 100644 index 000..d739ac7 --- /dev/null +++ b/commons/nifi-expression-language/src/main/java/org/apache/nifi/attribute/expression/language/evaluation/literals/StringLiteralEvaluator.java @@ -0,0 +1,77 @@ +/* + * 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. + */ +package org.apache.nifi.attribute.expression.language.evaluation.literals; + +import java.util.Map; + +import org.apache.nifi.attribute.expression.language.evaluation.Evaluator; +import org.apache.nifi.attribute.expression.language.evaluation.QueryResult; +import org.apache.nifi.attribute.expression.language.evaluation.StringEvaluator; +import org.apache.nifi.attribute.expression.language.evaluation.StringQueryResult; + +public class StringLiteralEvaluator extends StringEvaluator { + +private final String value; + +public StringLiteralEvaluator(final String value) { +// need to escape characters after backslashes +final StringBuilder sb = new StringBuilder(); +boolean lastCharIsBackslash = false; +for (int i = 0; i value.length(); i++) { +final char c = value.charAt(i); + +if (lastCharIsBackslash) { +
[37/51] [partial] incubator-nifi git commit: Initial code contribution
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/commons/remote-communications-utils/src/main/java/org/apache/nifi/remote/io/CompressionOutputStream.java -- diff --git a/commons/remote-communications-utils/src/main/java/org/apache/nifi/remote/io/CompressionOutputStream.java b/commons/remote-communications-utils/src/main/java/org/apache/nifi/remote/io/CompressionOutputStream.java new file mode 100644 index 000..bc46b0f --- /dev/null +++ b/commons/remote-communications-utils/src/main/java/org/apache/nifi/remote/io/CompressionOutputStream.java @@ -0,0 +1,147 @@ +/* + * 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. + */ +package org.apache.nifi.remote.io; + +import java.io.IOException; +import java.io.OutputStream; +import java.util.zip.Deflater; + +public class CompressionOutputStream extends OutputStream { + +public static final byte[] SYNC_BYTES = new byte[]{'S', 'Y', 'N', 'C'}; + +public static final int DEFAULT_COMPRESSION_LEVEL = 1; +public static final int DEFAULT_BUFFER_SIZE = 64 10; +public static final int MIN_BUFFER_SIZE = 8 10; + +private final OutputStream out; +private final Deflater deflater; + +private final byte[] buffer; +private final byte[] compressed; + +private int bufferIndex = 0; +private boolean dataWritten = false; + +public CompressionOutputStream(final OutputStream outStream) { +this(outStream, DEFAULT_BUFFER_SIZE); +} + +public CompressionOutputStream(final OutputStream outStream, final int bufferSize) { +this(outStream, bufferSize, DEFAULT_COMPRESSION_LEVEL, Deflater.DEFAULT_STRATEGY); +} + +public CompressionOutputStream(final OutputStream outStream, final int bufferSize, final int level, final int strategy) { +if (bufferSize MIN_BUFFER_SIZE) { +throw new IllegalArgumentException(Buffer size must be at least + MIN_BUFFER_SIZE); +} + +this.out = outStream; +this.deflater = new Deflater(level); +this.deflater.setStrategy(strategy); +buffer = new byte[bufferSize]; +compressed = new byte[bufferSize + 64]; +} + +/** + * Compresses the currently buffered chunk of data and sends it to the + * output stream + * + * @throws IOException + */ +protected void compressAndWrite() throws IOException { +if (bufferIndex = 0) { +return; +} + +deflater.setInput(buffer, 0, bufferIndex); +deflater.finish(); +final int compressedBytes = deflater.deflate(compressed); + +writeChunkHeader(compressedBytes); +out.write(compressed, 0, compressedBytes); + +bufferIndex = 0; +deflater.reset(); +} + +private void writeChunkHeader(final int compressedBytes) throws IOException { +// If we have already written data, write out a '1' to indicate that we have more data; when we close +// the stream, we instead write a '0' to indicate that we are finished sending data. +if (dataWritten) { +out.write(1); +} +out.write(SYNC_BYTES); +dataWritten = true; + +writeInt(out, bufferIndex); +writeInt(out, compressedBytes); +} + +private void writeInt(final OutputStream out, final int val) throws IOException { +out.write(val 24); +out.write(val 16); +out.write(val 8); +out.write(val); +} + +protected boolean bufferFull() { +return bufferIndex = buffer.length; +} + +@Override +public void write(final int b) throws IOException { +buffer[bufferIndex++] = (byte) (b 0xFF); +if (bufferFull()) { +compressAndWrite(); +} +} + +@Override +public void write(final byte[] b) throws IOException { +write(b, 0, b.length); +} + +@Override +public void write(final byte[] b, final int off, final int len) throws IOException { +int bytesLeft = len; +while (bytesLeft 0) { +final int free = buffer.length - bufferIndex; +final int bytesThisIteration = Math.min(bytesLeft, free); +
[47/51] [partial] incubator-nifi git commit: Initial code contribution
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/commons/nifi-expression-language/src/main/java/org/apache/nifi/attribute/expression/language/Query.java -- diff --git a/commons/nifi-expression-language/src/main/java/org/apache/nifi/attribute/expression/language/Query.java b/commons/nifi-expression-language/src/main/java/org/apache/nifi/attribute/expression/language/Query.java new file mode 100644 index 000..6d9cc91 --- /dev/null +++ b/commons/nifi-expression-language/src/main/java/org/apache/nifi/attribute/expression/language/Query.java @@ -0,0 +1,1183 @@ +/* + * 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. + */ +package org.apache.nifi.attribute.expression.language; + +import static org.apache.nifi.attribute.expression.language.antlr.AttributeExpressionParser.ALL_ATTRIBUTES; +import static org.apache.nifi.attribute.expression.language.antlr.AttributeExpressionParser.ALL_DELINEATED_VALUES; +import static org.apache.nifi.attribute.expression.language.antlr.AttributeExpressionParser.ALL_MATCHING_ATTRIBUTES; +import static org.apache.nifi.attribute.expression.language.antlr.AttributeExpressionParser.AND; +import static org.apache.nifi.attribute.expression.language.antlr.AttributeExpressionParser.ANY_ATTRIBUTE; +import static org.apache.nifi.attribute.expression.language.antlr.AttributeExpressionParser.ANY_DELINEATED_VALUE; +import static org.apache.nifi.attribute.expression.language.antlr.AttributeExpressionParser.ANY_MATCHING_ATTRIBUTE; +import static org.apache.nifi.attribute.expression.language.antlr.AttributeExpressionParser.APPEND; +import static org.apache.nifi.attribute.expression.language.antlr.AttributeExpressionParser.ATTRIBUTE_REFERENCE; +import static org.apache.nifi.attribute.expression.language.antlr.AttributeExpressionParser.ATTR_NAME; +import static org.apache.nifi.attribute.expression.language.antlr.AttributeExpressionParser.CONTAINS; +import static org.apache.nifi.attribute.expression.language.antlr.AttributeExpressionParser.DIVIDE; +import static org.apache.nifi.attribute.expression.language.antlr.AttributeExpressionParser.ENDS_WITH; +import static org.apache.nifi.attribute.expression.language.antlr.AttributeExpressionParser.EQUALS; +import static org.apache.nifi.attribute.expression.language.antlr.AttributeExpressionParser.EQUALS_IGNORE_CASE; +import static org.apache.nifi.attribute.expression.language.antlr.AttributeExpressionParser.EXPRESSION; +import static org.apache.nifi.attribute.expression.language.antlr.AttributeExpressionParser.FALSE; +import static org.apache.nifi.attribute.expression.language.antlr.AttributeExpressionParser.FIND; +import static org.apache.nifi.attribute.expression.language.antlr.AttributeExpressionParser.FORMAT; +import static org.apache.nifi.attribute.expression.language.antlr.AttributeExpressionParser.GREATER_THAN; +import static org.apache.nifi.attribute.expression.language.antlr.AttributeExpressionParser.GREATER_THAN_OR_EQUAL; +import static org.apache.nifi.attribute.expression.language.antlr.AttributeExpressionParser.HOSTNAME; +import static org.apache.nifi.attribute.expression.language.antlr.AttributeExpressionParser.INDEX_OF; +import static org.apache.nifi.attribute.expression.language.antlr.AttributeExpressionParser.IP; +import static org.apache.nifi.attribute.expression.language.antlr.AttributeExpressionParser.IS_NULL; +import static org.apache.nifi.attribute.expression.language.antlr.AttributeExpressionParser.LAST_INDEX_OF; +import static org.apache.nifi.attribute.expression.language.antlr.AttributeExpressionParser.LENGTH; +import static org.apache.nifi.attribute.expression.language.antlr.AttributeExpressionParser.LESS_THAN; +import static org.apache.nifi.attribute.expression.language.antlr.AttributeExpressionParser.LESS_THAN_OR_EQUAL; +import static org.apache.nifi.attribute.expression.language.antlr.AttributeExpressionParser.MATCHES; +import static org.apache.nifi.attribute.expression.language.antlr.AttributeExpressionParser.MINUS; +import static org.apache.nifi.attribute.expression.language.antlr.AttributeExpressionParser.MOD; +import static
[45/51] [partial] incubator-nifi git commit: Initial code contribution
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/commons/nifi-expression-language/src/main/java/org/apache/nifi/attribute/expression/language/evaluation/functions/ModEvaluator.java -- diff --git a/commons/nifi-expression-language/src/main/java/org/apache/nifi/attribute/expression/language/evaluation/functions/ModEvaluator.java b/commons/nifi-expression-language/src/main/java/org/apache/nifi/attribute/expression/language/evaluation/functions/ModEvaluator.java new file mode 100644 index 000..6b7b838 --- /dev/null +++ b/commons/nifi-expression-language/src/main/java/org/apache/nifi/attribute/expression/language/evaluation/functions/ModEvaluator.java @@ -0,0 +1,57 @@ +/* + * 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. + */ +package org.apache.nifi.attribute.expression.language.evaluation.functions; + +import java.util.Map; + +import org.apache.nifi.attribute.expression.language.evaluation.Evaluator; +import org.apache.nifi.attribute.expression.language.evaluation.NumberEvaluator; +import org.apache.nifi.attribute.expression.language.evaluation.NumberQueryResult; +import org.apache.nifi.attribute.expression.language.evaluation.QueryResult; + +public class ModEvaluator extends NumberEvaluator { + +private final NumberEvaluator subject; +private final NumberEvaluator modValue; + +public ModEvaluator(final NumberEvaluator subject, final NumberEvaluator modValue) { +this.subject = subject; +this.modValue = modValue; +} + +@Override +public QueryResultLong evaluate(final MapString, String attributes) { +final Long subjectValue = subject.evaluate(attributes).getValue(); +if (subjectValue == null) { +return new NumberQueryResult(null); +} + +final Long mod = modValue.evaluate(attributes).getValue(); +if (mod == null) { +return new NumberQueryResult(null); +} + +final long result = subjectValue % mod; +return new NumberQueryResult(result); +} + +@Override +public Evaluator? getSubjectEvaluator() { +return subject; +} + +} http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/commons/nifi-expression-language/src/main/java/org/apache/nifi/attribute/expression/language/evaluation/functions/MultiplyEvaluator.java -- diff --git a/commons/nifi-expression-language/src/main/java/org/apache/nifi/attribute/expression/language/evaluation/functions/MultiplyEvaluator.java b/commons/nifi-expression-language/src/main/java/org/apache/nifi/attribute/expression/language/evaluation/functions/MultiplyEvaluator.java new file mode 100644 index 000..a3b03ed --- /dev/null +++ b/commons/nifi-expression-language/src/main/java/org/apache/nifi/attribute/expression/language/evaluation/functions/MultiplyEvaluator.java @@ -0,0 +1,57 @@ +/* + * 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. + */ +package org.apache.nifi.attribute.expression.language.evaluation.functions; + +import java.util.Map; + +import org.apache.nifi.attribute.expression.language.evaluation.Evaluator; +import org.apache.nifi.attribute.expression.language.evaluation.NumberEvaluator; +import org.apache.nifi.attribute.expression.language.evaluation.NumberQueryResult; +import org.apache.nifi.attribute.expression.language.evaluation.QueryResult; + +public class
[02/51] [partial] incubator-nifi git commit: Initial code contribution
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/StandardFlowService.java -- diff --git a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/StandardFlowService.java b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/StandardFlowService.java new file mode 100644 index 000..1443737 --- /dev/null +++ b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/StandardFlowService.java @@ -0,0 +1,875 @@ +/* + * 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. + */ +package org.apache.nifi.controller; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.net.InetSocketAddress; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.StandardOpenOption; +import java.util.Calendar; +import java.util.Date; +import java.util.UUID; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.atomic.AtomicReference; +import java.util.concurrent.locks.Lock; +import java.util.concurrent.locks.ReentrantReadWriteLock; +import java.util.zip.GZIPInputStream; +import java.util.zip.GZIPOutputStream; + +import org.apache.nifi.cluster.ConnectionException; +import org.apache.nifi.cluster.protocol.ConnectionRequest; +import org.apache.nifi.cluster.protocol.ConnectionResponse; +import org.apache.nifi.cluster.protocol.DataFlow; +import org.apache.nifi.cluster.protocol.NodeIdentifier; +import org.apache.nifi.cluster.protocol.ProtocolException; +import org.apache.nifi.cluster.protocol.ProtocolHandler; +import org.apache.nifi.cluster.protocol.StandardDataFlow; +import org.apache.nifi.cluster.protocol.UnknownServiceAddressException; +import org.apache.nifi.cluster.protocol.impl.NodeProtocolSenderListener; +import org.apache.nifi.cluster.protocol.message.ConnectionRequestMessage; +import org.apache.nifi.cluster.protocol.message.ControllerStartupFailureMessage; +import org.apache.nifi.cluster.protocol.message.DisconnectMessage; +import org.apache.nifi.cluster.protocol.message.FlowRequestMessage; +import org.apache.nifi.cluster.protocol.message.FlowResponseMessage; +import org.apache.nifi.cluster.protocol.message.PrimaryRoleAssignmentMessage; +import org.apache.nifi.cluster.protocol.message.ProtocolMessage; +import org.apache.nifi.cluster.protocol.message.ReconnectionFailureMessage; +import org.apache.nifi.cluster.protocol.message.ReconnectionRequestMessage; +import org.apache.nifi.cluster.protocol.message.ReconnectionResponseMessage; +import org.apache.nifi.engine.FlowEngine; +import org.apache.nifi.events.BulletinFactory; +import org.apache.nifi.file.FileUtils; +import org.apache.nifi.groups.ProcessGroup; +import org.apache.nifi.lifecycle.LifeCycleStartException; +import org.apache.nifi.logging.LogLevel; +import org.apache.nifi.persistence.FlowConfigurationDAO; +import org.apache.nifi.persistence.StandardXMLFlowConfigurationDAO; +import org.apache.nifi.reporting.Bulletin; +import org.apache.nifi.services.FlowService; +import org.apache.nifi.util.FormatUtils; +import org.apache.nifi.util.NiFiProperties; + +import org.apache.commons.lang3.StringUtils; +import org.apache.nifi.encrypt.StringEncryptor; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class StandardFlowService implements FlowService, ProtocolHandler { + +private static final String EVENT_CATEGORY = Controller; + +private final FlowController controller; +private final Path flowXml; +private final Path taskConfigXml; +private final Path serviceConfigXml; +private final FlowConfigurationDAO dao; +private final int gracefulShutdownSeconds; +private final boolean autoResumeState; +private final int connectionRetryMillis; +private final StringEncryptor encryptor; + +// Lock is used to protect the flow.xml file. +private final ReentrantReadWriteLock rwLock
[01/51] [partial] incubator-nifi git commit: Initial code contribution
Repository: incubator-nifi Updated Branches: refs/heads/master [created] 4d998c12c http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/StandardFlowSynchronizer.java -- diff --git a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/StandardFlowSynchronizer.java b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/StandardFlowSynchronizer.java new file mode 100644 index 000..17a1702 --- /dev/null +++ b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/StandardFlowSynchronizer.java @@ -0,0 +1,1026 @@ +/* + * 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. + */ +package org.apache.nifi.controller; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.net.URL; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.StandardOpenOption; +import java.security.NoSuchAlgorithmException; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.concurrent.TimeUnit; +import java.util.zip.GZIPInputStream; + +import javax.xml.XMLConstants; +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.validation.Schema; +import javax.xml.validation.SchemaFactory; + +import org.apache.nifi.cluster.protocol.DataFlow; +import org.apache.nifi.cluster.protocol.StandardDataFlow; +import org.apache.nifi.connectable.Connectable; +import org.apache.nifi.connectable.ConnectableType; +import org.apache.nifi.connectable.Connection; +import org.apache.nifi.connectable.Funnel; +import org.apache.nifi.connectable.Port; +import org.apache.nifi.connectable.Position; +import org.apache.nifi.connectable.Size; +import org.apache.nifi.controller.exception.ProcessorInstantiationException; +import org.apache.nifi.controller.label.Label; +import org.apache.nifi.events.BulletinFactory; +import org.apache.nifi.file.FileUtils; +import org.apache.nifi.fingerprint.FingerprintException; +import org.apache.nifi.fingerprint.FingerprintFactory; +import org.apache.nifi.flowfile.FlowFilePrioritizer; +import org.apache.nifi.groups.ProcessGroup; +import org.apache.nifi.groups.RemoteProcessGroup; +import org.apache.nifi.groups.RemoteProcessGroupPortDescriptor; +import org.apache.nifi.logging.LogLevel; +import org.apache.nifi.processor.Relationship; +import org.apache.nifi.remote.RemoteGroupPort; +import org.apache.nifi.remote.RootGroupPort; +import org.apache.nifi.reporting.Severity; +import org.apache.nifi.scheduling.SchedulingStrategy; +import org.apache.nifi.util.NiFiProperties; +import org.apache.nifi.web.api.dto.ConnectableDTO; +import org.apache.nifi.web.api.dto.ConnectionDTO; +import org.apache.nifi.web.api.dto.FlowSnippetDTO; +import org.apache.nifi.web.api.dto.FunnelDTO; +import org.apache.nifi.web.api.dto.LabelDTO; +import org.apache.nifi.web.api.dto.PortDTO; +import org.apache.nifi.web.api.dto.PositionDTO; +import org.apache.nifi.web.api.dto.ProcessGroupDTO; +import org.apache.nifi.web.api.dto.ProcessorConfigDTO; +import org.apache.nifi.web.api.dto.ProcessorDTO; +import org.apache.nifi.web.api.dto.RemoteProcessGroupDTO; + +import org.apache.commons.collections4.CollectionUtils; +import org.apache.nifi.encrypt.StringEncryptor; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; +import org.xml.sax.SAXException; + +/** + * @author unattributed + */ +public class StandardFlowSynchronizer implements FlowSynchronizer { + +private static final Logger logger = LoggerFactory.getLogger(StandardFlowSynchronizer.class); +public static final URL FLOW_XSD_RESOURCE = StandardFlowSynchronizer.class.getResource(/FlowConfiguration.xsd); +private final StringEncryptor encryptor; + +public
[48/51] [partial] incubator-nifi git commit: Initial code contribution
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/commons/flowfile-packager/src/main/java/org/apache/nifi/util/FlowFileUnpackagerV2.java -- diff --git a/commons/flowfile-packager/src/main/java/org/apache/nifi/util/FlowFileUnpackagerV2.java b/commons/flowfile-packager/src/main/java/org/apache/nifi/util/FlowFileUnpackagerV2.java new file mode 100644 index 000..500015f --- /dev/null +++ b/commons/flowfile-packager/src/main/java/org/apache/nifi/util/FlowFileUnpackagerV2.java @@ -0,0 +1,143 @@ +/* + * 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. + */ +package org.apache.nifi.util; + +import java.io.EOFException; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.util.HashMap; +import java.util.Map; + +public class FlowFileUnpackagerV2 implements FlowFileUnpackager { + +private final byte readBuffer[] = new byte[8192]; +private MapString, String nextAttributes = null; +private boolean haveReadSomething = false; + +@Override +public boolean hasMoreData() throws IOException { +return nextAttributes != null || !haveReadSomething; +} + +protected MapString, String readAttributes(final InputStream in) throws IOException { +final MapString, String attributes = new HashMap(); +final Integer numAttributes = readFieldLength(in); //read number of attributes +if (numAttributes == null) { +return null; +} +if (numAttributes == 0) { +throw new IOException(flow files cannot have zero attributes); +} +for (int i = 0; i numAttributes; i++) { //read each attribute key/value pair +final String key = readString(in); +final String value = readString(in); +attributes.put(key, value); +} + +return attributes; +} + +@Override +public MapString, String unpackageFlowFile(final InputStream in, final OutputStream out) throws IOException { +final MapString, String attributes; +if (nextAttributes != null) { +attributes = nextAttributes; +} else { +attributes = readAttributes(in); +} + +final long expectedNumBytes = readLong(in); // read length of payload +copy(in, out, expectedNumBytes); // read payload + +nextAttributes = readAttributes(in); +haveReadSomething = true; + +return attributes; +} + +protected String readString(final InputStream in) throws IOException { +final Integer numBytes = readFieldLength(in); +if (numBytes == null) { +throw new EOFException(); +} +final byte[] bytes = new byte[numBytes]; +fillBuffer(in, bytes, numBytes); +return new String(bytes, UTF-8); +} + +private void fillBuffer(final InputStream in, final byte[] buffer, final int length) throws IOException { +int bytesRead; +int totalBytesRead = 0; +while ((bytesRead = in.read(buffer, totalBytesRead, length - totalBytesRead)) 0) { +totalBytesRead += bytesRead; +} +if (totalBytesRead != length) { +throw new EOFException(); +} +} + +protected long copy(final InputStream in, final OutputStream out, final long numBytes) throws IOException { +int bytesRead; +long totalBytesRead = 0L; +while ((bytesRead = in.read(readBuffer, 0, (int) Math.min(readBuffer.length, numBytes - totalBytesRead))) 0) { +out.write(readBuffer, 0, bytesRead); +totalBytesRead += bytesRead; +} + +if (totalBytesRead numBytes) { +throw new EOFException(Expected + numBytes + but received + totalBytesRead); +} + +return totalBytesRead; +} + +protected long readLong(final InputStream in) throws IOException { +fillBuffer(in, readBuffer, 8); +return (((long) readBuffer[0] 56) ++ ((long) (readBuffer[1] 255) 48) ++ ((long) (readBuffer[2] 255) 40) ++ ((long) (readBuffer[3] 255) 32) ++ ((long)
[38/51] [partial] incubator-nifi git commit: Initial code contribution
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/commons/nifi-utils/src/test/java/org/apache/nifi/util/timebuffer/TestTimedBuffer.java -- diff --git a/commons/nifi-utils/src/test/java/org/apache/nifi/util/timebuffer/TestTimedBuffer.java b/commons/nifi-utils/src/test/java/org/apache/nifi/util/timebuffer/TestTimedBuffer.java new file mode 100644 index 000..39ca330 --- /dev/null +++ b/commons/nifi-utils/src/test/java/org/apache/nifi/util/timebuffer/TestTimedBuffer.java @@ -0,0 +1,106 @@ +/* + * 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. + */ +package org.apache.nifi.util.timebuffer; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; + +import java.util.concurrent.TimeUnit; + +import org.junit.Test; + +public class TestTimedBuffer { + +@Test +public void testAgesOff() throws InterruptedException { +final LongEntityAccess access = new LongEntityAccess(); +final TimedBufferTimestampedLong buffer = new TimedBuffer(TimeUnit.SECONDS, 2, access); + +buffer.add(new TimestampedLong(100L)); +TimestampedLong aggregate = buffer.getAggregateValue(System.currentTimeMillis() - 3L); +assertEquals(100L, aggregate.getValue().longValue()); +Thread.sleep(1000L); +aggregate = buffer.getAggregateValue(System.currentTimeMillis() - 3L); +assertEquals(100L, aggregate.getValue().longValue()); +Thread.sleep(1500L); +aggregate = buffer.getAggregateValue(System.currentTimeMillis() - 3L); +assertNull(aggregate); +} + +@Test +public void testAggregation() throws InterruptedException { +final LongEntityAccess access = new LongEntityAccess(); +final TimedBufferTimestampedLong buffer = new TimedBuffer(TimeUnit.SECONDS, 2, access); + +buffer.add(new TimestampedLong(100L)); +buffer.add(new TimestampedLong(100L)); +buffer.add(new TimestampedLong(25000L)); + +TimestampedLong aggregate = buffer.getAggregateValue(System.currentTimeMillis() - 3L); +assertEquals(2025000L, aggregate.getValue().longValue()); +Thread.sleep(1000L); +aggregate = buffer.getAggregateValue(System.currentTimeMillis() - 3L); +assertEquals(2025000L, aggregate.getValue().longValue()); +Thread.sleep(1500L); +aggregate = buffer.getAggregateValue(System.currentTimeMillis() - 3L); +assertNull(aggregate); +} + +private static class TimestampedLong { + +private final Long value; +private final long timestamp = System.currentTimeMillis(); + +public TimestampedLong(final Long value) { +this.value = value; +} + +public Long getValue() { +return value; +} + +public long getTimestamp() { +return timestamp; +} +} + +private static class LongEntityAccess implements EntityAccessTimestampedLong { + +@Override +public TimestampedLong aggregate(TimestampedLong oldValue, TimestampedLong toAdd) { +if (oldValue == null toAdd == null) { +return new TimestampedLong(0L); +} else if (oldValue == null) { +return toAdd; +} else if (toAdd == null) { +return oldValue; +} + +return new TimestampedLong(oldValue.getValue().longValue() + toAdd.getValue().longValue()); +} + +@Override +public TimestampedLong createNew() { +return new TimestampedLong(0L); +} + +@Override +public long getTimestamp(TimestampedLong entity) { +return entity == null ? 0L : entity.getTimestamp(); +} +} +} http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/commons/nifi-web-utils/pom.xml -- diff --git a/commons/nifi-web-utils/pom.xml b/commons/nifi-web-utils/pom.xml new file mode 100644 index 000..434e1a3 --- /dev/null +++ b/commons/nifi-web-utils/pom.xml @@ -0,0 +1,56 @@ +?xml version=1.0
[09/51] [partial] incubator-nifi git commit: Initial code contribution
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/connectable/Connectable.java -- diff --git a/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/connectable/Connectable.java b/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/connectable/Connectable.java new file mode 100644 index 000..3d5c75d --- /dev/null +++ b/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/connectable/Connectable.java @@ -0,0 +1,291 @@ +/* + * 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. + */ +package org.apache.nifi.connectable; + +import java.util.Collection; +import java.util.List; +import java.util.Set; +import java.util.concurrent.TimeUnit; + +import org.apache.nifi.components.ValidationResult; +import org.apache.nifi.controller.Triggerable; +import org.apache.nifi.groups.ProcessGroup; +import org.apache.nifi.processor.ProcessSession; +import org.apache.nifi.processor.Relationship; +import org.apache.nifi.scheduling.SchedulingStrategy; + +/** + * Represents a connectable component to which or from which data can flow. + */ +public interface Connectable extends Triggerable { + +/** + * @return the unique identifier for this codeConnectable/code + */ +String getIdentifier(); + +/** + * @return a Collection of all relationships for this Connectable + */ +CollectionRelationship getRelationships(); + +/** + * Returns the ProcessorRelationship whose name is given + * + * @param relationshipName + * @return a ProcessorRelationship whose name is given, or codenull/code + * if none exists + */ +Relationship getRelationship(String relationshipName); + +/** + * Adds the given connection to this Connectable. + * + * @param connection the connection to add + * @throws NullPointerException if the argument is null + * @throws IllegalArgumentException if the given Connection is not valid + */ +void addConnection(Connection connection) throws IllegalArgumentException; + +/** + * @return true if the Connectable is the destination of any other + * Connectable, false otherwise. + */ +boolean hasIncomingConnection(); + +/** + * + * @param connection + * @throws IllegalStateException if the given Connection is not registered + * to codethis/code. + */ +void removeConnection(Connection connection) throws IllegalStateException; + +/** + * Updates any internal state that depends on the given connection. The + * given connection will share the same ID as the old connection. + * + * @param newConnection + * @throws IllegalStateException + */ +void updateConnection(Connection newConnection) throws IllegalStateException; + +/** + * @return a codeSet/code of all codeConnection/codes for which this + * codeConnectable/code is the destination + */ +ListConnection getIncomingConnections(); + +/** + * @return a codeSet/code of all codeConnection/codes for which this + * codeConnectable/code is the source; if no connections exist, will + * return an empty Collection. Guaranteed not null. + */ +SetConnection getConnections(); + +/** + * @param relationship + * @return a codeSet/code of all codeConnection/codes that contain + * the given relationship for which this codeConnectable/code is the + * source + */ +SetConnection getConnections(Relationship relationship); + +/** + * Returns the position on the graph where this Connectable is located + * + * @return + */ +Position getPosition(); + +/** + * Updates this component's position on the graph + * + * @param position + */ +void setPosition(Position position); + +/** + * @return the name of this Connectable + */ +String getName(); + +/** + * Sets the name of this Connectable so that its name will be visible on the + * UI + * @param name + */ +void setName(String name); + +/** + *
[51/51] [partial] incubator-nifi git commit: Initial code contribution
Initial code contribution Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/4d998c12 Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/4d998c12 Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/4d998c12 Branch: refs/heads/master Commit: 4d998c12c95a6e5ce3d66c0d861e75e33b5cf013 Parents: Author: joewitt joew...@apache.org Authored: Mon Dec 8 15:22:14 2014 -0500 Committer: joewitt joew...@apache.org Committed: Mon Dec 8 15:22:14 2014 -0500 -- .gitignore |9 + DISCLAIMER | 15 + LICENSE | 202 + NOTICE |7 + README.md | 65 + assemblies/nifi/pom.xml | 485 + .../nifi/src/main/assembly/dependencies.xml | 123 + commons/core-flowfile-attributes/pom.xml| 32 + .../flowfile/attributes/CoreAttributes.java | 72 + .../attributes/FlowFileAttributeKey.java| 21 + commons/data-provenance-utils/.gitignore|2 + commons/data-provenance-utils/pom.xml | 42 + .../nifi/provenance/AsyncLineageSubmission.java | 87 + .../nifi/provenance/AsyncQuerySubmission.java | 81 + .../nifi/provenance/NamedSearchableField.java | 95 + .../nifi/provenance/SearchableFieldParser.java | 53 + .../nifi/provenance/SearchableFields.java | 84 + .../nifi/provenance/StandardLineageResult.java | 324 + .../StandardProvenanceEventRecord.java | 752 ++ .../nifi/provenance/StandardQueryResult.java| 168 + .../nifi/provenance/lineage/EdgeNode.java | 74 + .../nifi/provenance/lineage/EventNode.java | 109 + .../provenance/lineage/FlowFileLineage.java | 76 + .../nifi/provenance/lineage/FlowFileNode.java | 83 + commons/flowfile-packager/pom.xml | 43 + .../org/apache/nifi/util/FlowFilePackager.java | 28 + .../apache/nifi/util/FlowFilePackagerV1.java| 104 + .../apache/nifi/util/FlowFilePackagerV2.java| 146 + .../apache/nifi/util/FlowFilePackagerV3.java| 93 + .../apache/nifi/util/FlowFileUnpackager.java| 30 + .../apache/nifi/util/FlowFileUnpackagerV1.java | 155 + .../apache/nifi/util/FlowFileUnpackagerV2.java | 143 + .../apache/nifi/util/FlowFileUnpackagerV3.java | 161 + .../java/org/apache/nifi/util/Unpackage.java| 119 + .../nifi/util/TestPackageUnpackageV3.java | 56 + commons/naive-search-ring-buffer/pom.xml| 30 + .../apache/nifi/util/NaiveSearchRingBuffer.java | 135 + .../nifi/util/TestNaiveSearchRingBuffer.java| 72 + commons/nifi-expression-language/pom.xml| 59 + .../language/antlr/AttributeExpressionLexer.g | 207 + .../language/antlr/AttributeExpressionParser.g | 139 + .../output/AttributeExpressionLexer.tokens | 72 + .../expression/language/EmptyPreparedQuery.java | 62 + .../expression/language/PreparedQuery.java | 39 + .../attribute/expression/language/Query.java| 1183 +++ .../language/StandardAttributeExpression.java | 65 + .../StandardExpressionLanguageCompiler.java | 58 + .../language/StandardPreparedQuery.java | 83 + .../language/evaluation/BooleanEvaluator.java | 32 + .../language/evaluation/BooleanQueryResult.java | 43 + .../language/evaluation/DateEvaluator.java | 34 + .../language/evaluation/DateQueryResult.java| 45 + .../language/evaluation/Evaluator.java | 32 + .../language/evaluation/NumberEvaluator.java| 33 + .../language/evaluation/NumberQueryResult.java | 43 + .../language/evaluation/QueryResult.java| 26 + .../language/evaluation/StringEvaluator.java| 32 + .../language/evaluation/StringQueryResult.java | 43 + .../evaluation/cast/BooleanCastEvaluator.java | 50 + .../evaluation/cast/DateCastEvaluator.java | 115 + .../evaluation/cast/NumberCastEvaluator.java| 72 + .../evaluation/cast/StringCastEvaluator.java| 49 + .../evaluation/functions/AndEvaluator.java | 60 + .../evaluation/functions/AppendEvaluator.java | 50 + .../functions/AttributeEvaluator.java | 45 + .../evaluation/functions/ContainsEvaluator.java | 53 + .../functions/DateToNumberEvaluator.java| 50 + .../evaluation/functions/DivideEvaluator.java | 57 + .../evaluation/functions/EndsWithEvaluator.java | 53 + .../evaluation/functions/EqualsEvaluator.java | 89 + .../functions/EqualsIgnoreCaseEvaluator.java| 60 + .../evaluation/functions/FindEvaluator.java | 72 + .../evaluation/functions/FormatEvaluator.java | 60 + .../functions/GreaterThanEvaluator.java | 60 + .../functions/GreaterThanOrEqualEvaluator.java | 60
[32/51] [partial] incubator-nifi git commit: Initial code contribution
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/nar-bundles/execute-script-bundle/execute-script-processors/src/main/java/org/apache/nifi/processors/script/ExecuteScript.java -- diff --git a/nar-bundles/execute-script-bundle/execute-script-processors/src/main/java/org/apache/nifi/processors/script/ExecuteScript.java b/nar-bundles/execute-script-bundle/execute-script-processors/src/main/java/org/apache/nifi/processors/script/ExecuteScript.java new file mode 100644 index 000..9058cf4 --- /dev/null +++ b/nar-bundles/execute-script-bundle/execute-script-processors/src/main/java/org/apache/nifi/processors/script/ExecuteScript.java @@ -0,0 +1,566 @@ +/* + * 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. + */ +package org.apache.nifi.processors.script; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.atomic.AtomicReference; + +import javax.script.ScriptException; + +import org.apache.nifi.components.PropertyDescriptor; +import org.apache.nifi.components.ValidationContext; +import org.apache.nifi.components.ValidationResult; +import org.apache.nifi.components.Validator; +import org.apache.nifi.flowfile.FlowFile; +import org.apache.nifi.io.BufferedInputStream; +import org.apache.nifi.io.BufferedOutputStream; +import org.apache.nifi.processor.AbstractProcessor; +import org.apache.nifi.processor.ProcessContext; +import org.apache.nifi.processor.ProcessSession; +import org.apache.nifi.processor.ProcessorInitializationContext; +import org.apache.nifi.processor.Relationship; +import org.apache.nifi.processor.annotation.CapabilityDescription; +import org.apache.nifi.processor.annotation.EventDriven; +import org.apache.nifi.processor.annotation.Tags; +import org.apache.nifi.processor.exception.ProcessException; +import org.apache.nifi.processor.io.InputStreamCallback; +import org.apache.nifi.processor.io.StreamCallback; +import org.apache.nifi.processor.util.StandardValidators; +import org.apache.nifi.scripting.ConverterScript; +import org.apache.nifi.scripting.ReaderScript; +import org.apache.nifi.scripting.Script; +import org.apache.nifi.scripting.ScriptFactory; +import org.apache.nifi.scripting.WriterScript; + +/** + * !-- Processor Documentation == -- + * h2Description:/h2 + * p + * This processor provides the capability to execute scripts in various + * scripting languages, and passes into the scripts the input stream and output + * stream(s) representing an incoming flow file and any created flow files. The + * processor is designed to be thread safe, so multiple concurrent tasks may + * execute against a single script. The processor provides a framework which + * enables script writers to implement 3 different types of scripts: + * ul + * ReaderScript - which enables stream-based reading of a FlowFile's + * content/br WriterScript - which enables stream-based reading and + * writing/modifying of a FlowFile's content/br ConverterScript - which + * enables stream-based reading a FlowFile's content and stream-based writing to + * newly created FlowFiles/br + * /ul + * Presently, the processor supports 3 scripting languages: Ruby, Python, and + * JavaScript. The processor is built on the javax.script API which enables + * ScriptEngine discovery, thread management, and encapsulates much of the low + * level bridging-code that enables Java to Script language integration. Thus, + * it is designed to be easily extended to other scripting languages. /br The + * attributes of a FlowFile and properties of the Processor are exposed to the + * script by either a variable in the base class or a getter method. A script + * may declare new Processor Properties and different Relationships via + * overriding the getPropertyDescriptors and getRelationships
[49/51] [partial] incubator-nifi git commit: Initial code contribution
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/commons/data-provenance-utils/src/main/java/org/apache/nifi/provenance/StandardLineageResult.java -- diff --git a/commons/data-provenance-utils/src/main/java/org/apache/nifi/provenance/StandardLineageResult.java b/commons/data-provenance-utils/src/main/java/org/apache/nifi/provenance/StandardLineageResult.java new file mode 100644 index 000..afb56e8 --- /dev/null +++ b/commons/data-provenance-utils/src/main/java/org/apache/nifi/provenance/StandardLineageResult.java @@ -0,0 +1,324 @@ +/* + * 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. + */ +package org.apache.nifi.provenance; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.Comparator; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.locks.Lock; +import java.util.concurrent.locks.ReadWriteLock; +import java.util.concurrent.locks.ReentrantReadWriteLock; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.apache.nifi.provenance.lineage.ComputeLineageResult; +import org.apache.nifi.provenance.lineage.EdgeNode; +import org.apache.nifi.provenance.lineage.EventNode; +import org.apache.nifi.provenance.lineage.FlowFileNode; +import org.apache.nifi.provenance.lineage.LineageEdge; +import org.apache.nifi.provenance.lineage.LineageNode; + +/** + * + */ +public class StandardLineageResult implements ComputeLineageResult { + +public static final int TTL = (int) TimeUnit.MILLISECONDS.convert(30, TimeUnit.MINUTES); +private static final Logger logger = LoggerFactory.getLogger(StandardLineageResult.class); + +private final CollectionString flowFileUuids; +private final CollectionProvenanceEventRecord relevantRecords = new ArrayList(); +private final SetLineageNode nodes = new HashSet(); +private final SetLineageEdge edges = new HashSet(); +private final int numSteps; +private final long creationNanos; +private long computationNanos; + +private final ReadWriteLock rwLock = new ReentrantReadWriteLock(); +private final Lock readLock = rwLock.readLock(); +private final Lock writeLock = rwLock.writeLock(); + +private Date expirationDate = null; +private String error = null; +private int numCompletedSteps = 0; + +private volatile boolean canceled = false; + +public StandardLineageResult(final int numSteps, final CollectionString flowFileUuids) { +this.numSteps = numSteps; +this.creationNanos = System.nanoTime(); +this.flowFileUuids = flowFileUuids; + +updateExpiration(); +} + +@Override +public ListLineageNode getNodes() { +readLock.lock(); +try { +return new ArrayList(nodes); +} finally { +readLock.unlock(); +} +} + +@Override +public ListLineageEdge getEdges() { +readLock.lock(); +try { +return new ArrayList(edges); +} finally { +readLock.unlock(); +} +} + +public int getNumberOfEdges() { +readLock.lock(); +try { +return edges.size(); +} finally { +readLock.unlock(); +} +} + +public int getNumberOfNodes() { +readLock.lock(); +try { +return nodes.size(); +} finally { +readLock.unlock(); +} +} + +public long getComputationTime(final TimeUnit timeUnit) { +readLock.lock(); +try { +return timeUnit.convert(computationNanos, TimeUnit.NANOSECONDS); +} finally { +readLock.unlock(); +} +} + +@Override +public Date getExpiration() { +readLock.lock(); +try { +return expirationDate; +} finally { +readLock.unlock(); +} +} + +@Override +public String getError() { +readLock.lock(); +try { +return error; +} finally { +
[07/51] [partial] incubator-nifi git commit: Initial code contribution
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/controller/repository/RepositoryStatusReport.java -- diff --git a/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/controller/repository/RepositoryStatusReport.java b/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/controller/repository/RepositoryStatusReport.java new file mode 100644 index 000..e434905 --- /dev/null +++ b/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/controller/repository/RepositoryStatusReport.java @@ -0,0 +1,28 @@ +/* + * 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. + */ +package org.apache.nifi.controller.repository; + +import java.util.Map; + +public interface RepositoryStatusReport { + +void addReportEntry(FlowFileEvent entry); + +MapString, FlowFileEvent getReportEntries(); + +FlowFileEvent getReportEntry(String componentId); +} http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/controller/service/ControllerServiceNode.java -- diff --git a/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/controller/service/ControllerServiceNode.java b/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/controller/service/ControllerServiceNode.java new file mode 100644 index 000..6f9c237 --- /dev/null +++ b/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/controller/service/ControllerServiceNode.java @@ -0,0 +1,40 @@ +/* + * 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. + */ +package org.apache.nifi.controller.service; + +import org.apache.nifi.controller.Availability; +import org.apache.nifi.controller.ConfiguredComponent; +import org.apache.nifi.controller.ControllerService; + +public interface ControllerServiceNode extends ConfiguredComponent { + +ControllerService getControllerService(); + +Availability getAvailability(); + +void setAvailability(Availability availability); + +boolean isDisabled(); + +void setDisabled(boolean disabled); + +ControllerServiceReference getReferences(); + +void addReference(ConfiguredComponent referringComponent); + +void removeReference(ConfiguredComponent referringComponent); +} http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/controller/service/ControllerServiceProvider.java -- diff --git a/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/controller/service/ControllerServiceProvider.java b/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/controller/service/ControllerServiceProvider.java new file mode 100644 index 000..35a255d --- /dev/null +++ b/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/controller/service/ControllerServiceProvider.java @@ -0,0 +1,47 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for
[25/51] [partial] incubator-nifi git commit: Initial code contribution
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/nar-bundles/framework-bundle/framework/administration/src/test/java/org/apache/nifi/admin/service/action/SetUserAuthoritiesActionTest.java -- diff --git a/nar-bundles/framework-bundle/framework/administration/src/test/java/org/apache/nifi/admin/service/action/SetUserAuthoritiesActionTest.java b/nar-bundles/framework-bundle/framework/administration/src/test/java/org/apache/nifi/admin/service/action/SetUserAuthoritiesActionTest.java new file mode 100644 index 000..dd3695c --- /dev/null +++ b/nar-bundles/framework-bundle/framework/administration/src/test/java/org/apache/nifi/admin/service/action/SetUserAuthoritiesActionTest.java @@ -0,0 +1,223 @@ +/* + * 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. + */ +package org.apache.nifi.admin.service.action; + +import java.util.Collections; +import java.util.EnumSet; +import java.util.Set; +import org.apache.nifi.admin.dao.AuthorityDAO; +import org.apache.nifi.admin.dao.DAOFactory; +import org.apache.nifi.admin.dao.UserDAO; +import org.apache.nifi.admin.service.AccountNotFoundException; +import org.apache.nifi.admin.service.AdministrationException; +import org.apache.nifi.authorization.Authority; +import org.apache.nifi.authorization.AuthorityProvider; +import org.apache.nifi.authorization.exception.AuthorityAccessException; +import org.apache.nifi.user.AccountStatus; +import org.apache.nifi.user.NiFiUser; +import org.apache.commons.lang3.StringUtils; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.mockito.Mockito; +import org.mockito.invocation.InvocationOnMock; +import org.mockito.stubbing.Answer; + +/** + * Test case for SetUserAuthoritiesAction. + */ +public class SetUserAuthoritiesActionTest { + +private static final String USER_ID_1 = 1; +private static final String USER_ID_2 = 2; +private static final String USER_ID_3 = 3; + +private static final String USER_DN_2 = user dn 2; +private static final String USER_DN_3 = user dn 3; + +private DAOFactory daoFactory; +private UserDAO userDao; +private AuthorityDAO authorityDao; +private AuthorityProvider authorityProvider; + +@Before +public void setup() throws Exception { +// mock the user dao +userDao = Mockito.mock(UserDAO.class); +Mockito.doAnswer(new AnswerNiFiUser() { +@Override +public NiFiUser answer(InvocationOnMock invocation) throws Throwable { +Object[] args = invocation.getArguments(); +String id = (String) args[0]; + +NiFiUser user = null; +if (USER_ID_1.equals(id)) { +// leave user uninitialized +} else if (USER_ID_2.equals(id)) { +user = new NiFiUser(); +user.setId(USER_ID_2); +user.setDn(USER_DN_2); +} else if (USER_ID_3.equals(id)) { +user = new NiFiUser(); +user.setId(USER_ID_3); +user.setDn(USER_DN_3); + user.getAuthorities().addAll(EnumSet.of(Authority.ROLE_MONITOR)); +user.setStatus(AccountStatus.ACTIVE); +} +return user; +} +}).when(userDao).findUserById(Mockito.anyString()); +Mockito.doAnswer(new AnswerNiFiUser() { +@Override +public NiFiUser answer(InvocationOnMock invocation) throws Throwable { +Object[] args = invocation.getArguments(); +String dn = (String) args[0]; + +NiFiUser user = null; +if (USER_DN_3.equals(dn)) { +user = new NiFiUser(); +user.setId(USER_ID_3); +user.setDn(USER_DN_3); + user.getAuthorities().addAll(EnumSet.of(Authority.ROLE_MONITOR)); +user.setStatus(AccountStatus.ACTIVE); +} +return user; +} +}).when(userDao).findUserByDn(Mockito.anyString()); +Mockito.doAnswer(new AnswerVoid() {
[17/51] [partial] incubator-nifi git commit: Initial code contribution
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/nar-bundles/framework-bundle/framework/cluster-protocol/src/main/java/org/apache/nifi/cluster/protocol/impl/NodeProtocolSenderImpl.java -- diff --git a/nar-bundles/framework-bundle/framework/cluster-protocol/src/main/java/org/apache/nifi/cluster/protocol/impl/NodeProtocolSenderImpl.java b/nar-bundles/framework-bundle/framework/cluster-protocol/src/main/java/org/apache/nifi/cluster/protocol/impl/NodeProtocolSenderImpl.java new file mode 100644 index 000..dc86d24 --- /dev/null +++ b/nar-bundles/framework-bundle/framework/cluster-protocol/src/main/java/org/apache/nifi/cluster/protocol/impl/NodeProtocolSenderImpl.java @@ -0,0 +1,171 @@ +/* + * 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. + */ +package org.apache.nifi.cluster.protocol.impl; + +import java.io.IOException; +import java.net.Socket; + +import javax.net.ssl.SSLSocket; +import javax.security.cert.X509Certificate; + +import org.apache.nifi.cluster.protocol.NodeProtocolSender; +import org.apache.nifi.cluster.protocol.ProtocolContext; +import org.apache.nifi.cluster.protocol.ProtocolException; +import org.apache.nifi.cluster.protocol.ProtocolMessageMarshaller; +import org.apache.nifi.cluster.protocol.ProtocolMessageUnmarshaller; +import org.apache.nifi.cluster.protocol.UnknownServiceAddressException; +import org.apache.nifi.cluster.protocol.message.ConnectionRequestMessage; +import org.apache.nifi.cluster.protocol.message.ConnectionResponseMessage; +import org.apache.nifi.cluster.protocol.message.ControllerStartupFailureMessage; +import org.apache.nifi.cluster.protocol.message.HeartbeatMessage; +import org.apache.nifi.cluster.protocol.message.NodeBulletinsMessage; +import org.apache.nifi.cluster.protocol.message.ProtocolMessage; +import org.apache.nifi.cluster.protocol.message.ProtocolMessage.MessageType; +import org.apache.nifi.cluster.protocol.message.ReconnectionFailureMessage; +import org.apache.nifi.io.socket.SocketConfiguration; +import org.apache.nifi.io.socket.SocketUtils; +import org.apache.nifi.io.socket.multicast.DiscoverableService; + +public class NodeProtocolSenderImpl implements NodeProtocolSender { +private final SocketConfiguration socketConfiguration; +private final ClusterServiceLocator clusterManagerProtocolServiceLocator; +private final ProtocolContextProtocolMessage protocolContext; + +public NodeProtocolSenderImpl(final ClusterServiceLocator clusterManagerProtocolServiceLocator, +final SocketConfiguration socketConfiguration, final ProtocolContextProtocolMessage protocolContext) { +if(clusterManagerProtocolServiceLocator == null) { +throw new IllegalArgumentException(Protocol Service Locator may not be null.); +} else if(socketConfiguration == null) { +throw new IllegalArgumentException(Socket configuration may not be null.); +} else if(protocolContext == null) { +throw new IllegalArgumentException(Protocol Context may not be null.); +} + +this.clusterManagerProtocolServiceLocator = clusterManagerProtocolServiceLocator; +this.socketConfiguration = socketConfiguration; +this.protocolContext = protocolContext; +} + + +@Override +public ConnectionResponseMessage requestConnection(final ConnectionRequestMessage msg) throws ProtocolException, UnknownServiceAddressException { +Socket socket = null; +try { +socket = createSocket(); + +String ncmDn = null; +if ( socket instanceof SSLSocket ) { +final SSLSocket sslSocket = (SSLSocket) socket; +try { +final X509Certificate[] certChains = sslSocket.getSession().getPeerCertificateChain(); +if ( certChains != null certChains.length 0 ) { +ncmDn = certChains[0].getSubjectDN().getName(); +} +} catch (final ProtocolException pe) { +throw pe; +} catch (final Exception e) { +throw new ProtocolException(e);
[16/51] [partial] incubator-nifi git commit: Initial code contribution
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/nar-bundles/framework-bundle/framework/cluster-protocol/src/main/java/org/apache/nifi/cluster/protocol/message/FlowResponseMessage.java -- diff --git a/nar-bundles/framework-bundle/framework/cluster-protocol/src/main/java/org/apache/nifi/cluster/protocol/message/FlowResponseMessage.java b/nar-bundles/framework-bundle/framework/cluster-protocol/src/main/java/org/apache/nifi/cluster/protocol/message/FlowResponseMessage.java new file mode 100644 index 000..0d34dae --- /dev/null +++ b/nar-bundles/framework-bundle/framework/cluster-protocol/src/main/java/org/apache/nifi/cluster/protocol/message/FlowResponseMessage.java @@ -0,0 +1,44 @@ +/* + * 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. + */ +package org.apache.nifi.cluster.protocol.message; + +import javax.xml.bind.annotation.XmlRootElement; + +import org.apache.nifi.cluster.protocol.StandardDataFlow; + +/** + * @author unattributed + */ +@XmlRootElement(name = flowResponseMessage) +public class FlowResponseMessage extends ProtocolMessage { + +private StandardDataFlow dataFlow; + +@Override +public MessageType getType() { +return MessageType.FLOW_RESPONSE; +} + +public StandardDataFlow getDataFlow() { +return dataFlow; +} + +public void setDataFlow(StandardDataFlow dataFlow) { +this.dataFlow = dataFlow; +} + +} http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/nar-bundles/framework-bundle/framework/cluster-protocol/src/main/java/org/apache/nifi/cluster/protocol/message/HeartbeatMessage.java -- diff --git a/nar-bundles/framework-bundle/framework/cluster-protocol/src/main/java/org/apache/nifi/cluster/protocol/message/HeartbeatMessage.java b/nar-bundles/framework-bundle/framework/cluster-protocol/src/main/java/org/apache/nifi/cluster/protocol/message/HeartbeatMessage.java new file mode 100644 index 000..0064cb6 --- /dev/null +++ b/nar-bundles/framework-bundle/framework/cluster-protocol/src/main/java/org/apache/nifi/cluster/protocol/message/HeartbeatMessage.java @@ -0,0 +1,43 @@ +/* + * 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. + */ +package org.apache.nifi.cluster.protocol.message; + +import org.apache.nifi.cluster.protocol.Heartbeat; +import javax.xml.bind.annotation.XmlRootElement; + +/** + * @author unattributed + */ +@XmlRootElement(name = heartbeatMessage) +public class HeartbeatMessage extends ProtocolMessage { + +private Heartbeat heartbeat; + +@Override +public MessageType getType() { +return MessageType.HEARTBEAT; +} + +public Heartbeat getHeartbeat() { +return heartbeat; +} + +public void setHeartbeat(Heartbeat heartbeat) { +this.heartbeat = heartbeat; +} + +} http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/nar-bundles/framework-bundle/framework/cluster-protocol/src/main/java/org/apache/nifi/cluster/protocol/message/MulticastProtocolMessage.java -- diff --git a/nar-bundles/framework-bundle/framework/cluster-protocol/src/main/java/org/apache/nifi/cluster/protocol/message/MulticastProtocolMessage.java
[42/51] [partial] incubator-nifi git commit: Initial code contribution
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/commons/nifi-properties/src/main/java/org/apache/nifi/util/StringUtils.java -- diff --git a/commons/nifi-properties/src/main/java/org/apache/nifi/util/StringUtils.java b/commons/nifi-properties/src/main/java/org/apache/nifi/util/StringUtils.java new file mode 100644 index 000..aa6f8f3 --- /dev/null +++ b/commons/nifi-properties/src/main/java/org/apache/nifi/util/StringUtils.java @@ -0,0 +1,66 @@ +/* + * 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. + */ +package org.apache.nifi.util; + +/** + * String Utils based on the Apache Commons Lang String Utils. + * These simple util methods here allow us to avoid a dependency in the core + */ +public class StringUtils { + +public static final String EMPTY = ; + +public static boolean isBlank(final String str) { +if (str == null || str.isEmpty()) { +return true; +} +for (int i = 0; i str.length(); i++) { +if (!Character.isWhitespace(str.charAt(i))) { +return false; +} +} +return true; +} + +public static boolean isEmpty(final String str) { +return str == null || str.isEmpty(); +} + +public static boolean startsWith(final String str, final String prefix) { +if (str == null || prefix == null) { +return (str == null prefix == null); +} +if (prefix.length() str.length()) { +return false; +} +return str.regionMatches(false, 0, prefix, 0, prefix.length()); +} + +public static String substringAfter(final String str, final String separator) { +if (isEmpty(str)) { +return str; +} +if (separator == null) { +return EMPTY; +} +int pos = str.indexOf(separator); +if (pos == -1) { +return EMPTY; +} +return str.substring(pos + separator.length()); +} +} http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/commons/nifi-security-utils/pom.xml -- diff --git a/commons/nifi-security-utils/pom.xml b/commons/nifi-security-utils/pom.xml new file mode 100644 index 000..76e9ac1 --- /dev/null +++ b/commons/nifi-security-utils/pom.xml @@ -0,0 +1,40 @@ +project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; +!-- + 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. +-- +modelVersion4.0.0/modelVersion +parent +groupIdorg.apache.nifi/groupId +artifactIdnifi-parent/artifactId +version0.0.1-SNAPSHOT/version +/parent + +artifactIdnifi-security-utils/artifactId +version0.0.1-SNAPSHOT/version +nameNiFi Security Utils/name +descriptionContains security functionality./description + +dependencies +dependency +groupIdorg.slf4j/groupId +artifactIdslf4j-api/artifactId +/dependency +dependency +groupIdorg.apache.commons/groupId +artifactIdcommons-lang3/artifactId +version3.3.2/version +/dependency +/dependencies +/project +
[21/51] [partial] incubator-nifi git commit: Initial code contribution
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/dto/status/PortStatusDTO.java -- diff --git a/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/dto/status/PortStatusDTO.java b/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/dto/status/PortStatusDTO.java new file mode 100644 index 000..c32efdb --- /dev/null +++ b/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/dto/status/PortStatusDTO.java @@ -0,0 +1,142 @@ +/* + * 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. + */ +package org.apache.nifi.web.api.dto.status; + +import javax.xml.bind.annotation.XmlType; + +/** + * The status for a port in this NiFi. + */ +@XmlType(name = portStatus) +public class PortStatusDTO extends StatusDTO { + +private String id; +private String groupId; +private String name; +private Integer activeThreadCount; +private String input; +private String output; +private Boolean transmitting; +private String runStatus; + +/** + * Whether this port has incoming or outgoing connections to a remote NiFi. + * + * @return + */ +public Boolean isTransmitting() { +return transmitting; +} + +public void setTransmitting(Boolean transmitting) { +this.transmitting = transmitting; +} + +/** + * The active thread count for this port. + * + * @return + */ +public Integer getActiveThreadCount() { +return activeThreadCount; +} + +public void setActiveThreadCount(Integer activeThreadCount) { +this.activeThreadCount = activeThreadCount; +} + +/** + * The id of this port. + * + * @return + */ +public String getId() { +return id; +} + +public void setId(String id) { +this.id = id; +} + +/** + * The id of the group this port resides in. + * + * @return + */ +public String getGroupId() { +return groupId; +} + +public void setGroupId(String groupId) { +this.groupId = groupId; +} + +/** + * The name of this port. + * + * @return + */ +public String getName() { +return name; +} + +public void setName(String name) { +this.name = name; +} + +/** + * The run status of this port. + * + * @return + */ +public String getRunStatus() { +return runStatus; +} + +public void setRunStatus(String runStatus) { +this.runStatus = runStatus; +} + +/** + * The total count and size of flow files that have been accepted in the + * last five minutes. + * + * @return The total processed + */ +public String getInput() { +return input; +} + +public void setInput(String input) { +this.input = input; +} + +/** + * The total count and size of flow files that have been processed in the + * last five minutes. + * + * @return The total output + */ +public String getOutput() { +return output; +} + +public void setOutput(String output) { +this.output = output; +} + +} http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/dto/status/ProcessGroupStatusDTO.java -- diff --git a/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/dto/status/ProcessGroupStatusDTO.java b/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/dto/status/ProcessGroupStatusDTO.java new file mode 100644 index 000..4fa2b64 --- /dev/null +++ b/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/dto/status/ProcessGroupStatusDTO.java @@ -0,0 +1,244 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See
[33/51] [partial] incubator-nifi git commit: Initial code contribution
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/nar-bundles/distributed-cache-services-bundle/distributed-cache-server/src/main/java/org/apache/nifi/distributed/cache/server/map/MapPutResult.java -- diff --git a/nar-bundles/distributed-cache-services-bundle/distributed-cache-server/src/main/java/org/apache/nifi/distributed/cache/server/map/MapPutResult.java b/nar-bundles/distributed-cache-services-bundle/distributed-cache-server/src/main/java/org/apache/nifi/distributed/cache/server/map/MapPutResult.java new file mode 100644 index 000..29695eb --- /dev/null +++ b/nar-bundles/distributed-cache-services-bundle/distributed-cache-server/src/main/java/org/apache/nifi/distributed/cache/server/map/MapPutResult.java @@ -0,0 +1,59 @@ +/* + * 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. + */ +package org.apache.nifi.distributed.cache.server.map; + +import java.nio.ByteBuffer; + +public class MapPutResult { +private final boolean successful; +private final ByteBuffer key, value; +private final ByteBuffer existingValue; +private final ByteBuffer evictedKey, evictedValue; + +public MapPutResult(final boolean successful, final ByteBuffer key, final ByteBuffer value, final ByteBuffer existingValue, final ByteBuffer evictedKey, final ByteBuffer evictedValue) { +this.successful = successful; +this.key = key; +this.value = value; +this.existingValue = existingValue; +this.evictedKey = evictedKey; +this.evictedValue = evictedValue; +} + +public boolean isSuccessful() { +return successful; +} + +public ByteBuffer getKey() { +return key; +} + +public ByteBuffer getValue() { +return value; +} + +public ByteBuffer getExistingValue() { +return existingValue; +} + +public ByteBuffer getEvictedKey() { +return evictedKey; +} + +public ByteBuffer getEvictedValue() { +return evictedValue; +} +} http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/nar-bundles/distributed-cache-services-bundle/distributed-cache-server/src/main/java/org/apache/nifi/distributed/cache/server/map/PersistentMapCache.java -- diff --git a/nar-bundles/distributed-cache-services-bundle/distributed-cache-server/src/main/java/org/apache/nifi/distributed/cache/server/map/PersistentMapCache.java b/nar-bundles/distributed-cache-services-bundle/distributed-cache-server/src/main/java/org/apache/nifi/distributed/cache/server/map/PersistentMapCache.java new file mode 100644 index 000..77fb77d --- /dev/null +++ b/nar-bundles/distributed-cache-services-bundle/distributed-cache-server/src/main/java/org/apache/nifi/distributed/cache/server/map/PersistentMapCache.java @@ -0,0 +1,210 @@ +/* + * 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. + */ +package org.apache.nifi.distributed.cache.server.map; + +import java.io.DataInputStream; +import java.io.EOFException; +import java.io.File; +import java.io.IOException; +import java.nio.ByteBuffer; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.atomic.AtomicLong; + +import org.wali.MinimalLockingWriteAheadLog; +import org.wali.SerDe; +import
[40/51] [partial] incubator-nifi git commit: Initial code contribution
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/ByteArrayInputStream.java -- diff --git a/commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/ByteArrayInputStream.java b/commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/ByteArrayInputStream.java new file mode 100644 index 000..9defab4 --- /dev/null +++ b/commons/nifi-stream-utils/src/main/java/org/apache/nifi/io/ByteArrayInputStream.java @@ -0,0 +1,250 @@ +/* + * 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. + */ +package org.apache.nifi.io; + +import java.io.InputStream; + +/** + * This class performs the same function as java.io.ByteArrayInputStream but + * does not mark its methods as synchronized + */ +public class ByteArrayInputStream extends InputStream { + +/** + * An array of bytes that was provided by the creator of the stream. + * Elements codebuf[0]/code through codebuf[count-1]/code are the + * only bytes that can ever be read from the stream; element + * codebuf[pos]/code is the next byte to be read. + */ +protected byte buf[]; + +/** + * The index of the next character to read from the input stream buffer. + * This value should always be nonnegative and not larger than the value of + * codecount/code. The next byte to be read from the input stream buffer + * will be codebuf[pos]/code. + */ +protected int pos; + +/** + * The currently marked position in the stream. ByteArrayInputStream objects + * are marked at position zero by default when constructed. They may be + * marked at another position within the buffer by the codemark()/code + * method. The current buffer position is set to this point by the + * codereset()/code method. + * p + * If no mark has been set, then the value of mark is the offset passed to + * the constructor (or 0 if the offset was not supplied). + * + * @since JDK1.1 + */ +protected int mark = 0; + +/** + * The index one greater than the last valid character in the input stream + * buffer. This value should always be nonnegative and not larger than the + * length of codebuf/code. It is one greater than the position of the + * last byte within codebuf/code that can ever be read from the input + * stream buffer. + */ +protected int count; + +/** + * Creates a codeByteArrayInputStream/code so that it uses + * codebuf/code as its buffer array. The buffer array is not copied. The + * initial value of codepos/code is code0/code and the initial value + * of codecount/code is the length of codebuf/code. + * + * @param buf the input buffer. + */ +public ByteArrayInputStream(byte buf[]) { +this.buf = buf; +this.pos = 0; +this.count = buf.length; +} + +/** + * Creates codeByteArrayInputStream/code that uses codebuf/code as + * its buffer array. The initial value of codepos/code is + * codeoffset/code and the initial value of codecount/code is the + * minimum of codeoffset+length/code and codebuf.length/code. The + * buffer array is not copied. The buffer's mark is set to the specified + * offset. + * + * @param buf the input buffer. + * @param offset the offset in the buffer of the first byte to read. + * @param length the maximum number of bytes to read from the buffer. + */ +public ByteArrayInputStream(byte buf[], int offset, int length) { +this.buf = buf; +this.pos = offset; +this.count = Math.min(offset + length, buf.length); +this.mark = offset; +} + +/** + * Reads the next byte of data from this input stream. The value byte is + * returned as an codeint/code in the range code0/code to + * code255/code. If no byte is available because the end of the stream + * has been reached, the value code-1/code is returned. + * p + * This coderead/code method cannot block. + * + * @return the next byte of data, or code-1/code if the end of the + * stream has been reached. + */ +@Override +
[29/51] [partial] incubator-nifi git commit: Initial code contribution
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/admin/dao/impl/StandardActionDAO.java -- diff --git a/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/admin/dao/impl/StandardActionDAO.java b/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/admin/dao/impl/StandardActionDAO.java new file mode 100644 index 000..4b89655 --- /dev/null +++ b/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/admin/dao/impl/StandardActionDAO.java @@ -0,0 +1,1056 @@ +/* + * 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. + */ +package org.apache.nifi.admin.dao.impl; + +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Date; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import org.apache.nifi.action.Action; +import org.apache.nifi.action.Component; +import org.apache.nifi.action.Operation; +import org.apache.nifi.action.component.details.ComponentDetails; +import org.apache.nifi.action.component.details.ProcessorDetails; +import org.apache.nifi.action.component.details.RemoteProcessGroupDetails; +import org.apache.nifi.action.details.ActionDetails; +import org.apache.nifi.action.details.ConfigureDetails; +import org.apache.nifi.action.details.ConnectDetails; +import org.apache.nifi.action.details.MoveDetails; +import org.apache.nifi.action.details.PurgeDetails; +import org.apache.nifi.admin.RepositoryUtils; +import org.apache.nifi.admin.dao.ActionDAO; +import org.apache.nifi.admin.dao.DataAccessException; +import org.apache.nifi.history.History; +import org.apache.nifi.history.HistoryQuery; +import org.apache.nifi.history.PreviousValue; +import org.apache.commons.lang3.StringUtils; + +/** + * + */ +public class StandardActionDAO implements ActionDAO { + +// +// action table +// +private static final String INSERT_ACTION = INSERT INTO ACTION ( ++ USER_DN, USER_NAME, SOURCE_ID, SOURCE_NAME, SOURCE_TYPE, OPERATION, ACTION_TIMESTAMP ++ ) VALUES ( ++ ?, ++ ?, ++ ?, ++ ?, ++ ?, ++ ?, ++ ?, ++ ); + +// - +// component details +// - +private static final String INSERT_PROCESSOR_DETAILS = INSERT INTO PROCESSOR_DETAILS ( ++ ACTION_ID, TYPE ++ ) VALUES ( ++ ?, ++ ? ++ ); + +private static final String INSERT_REMOTE_PROCESS_GROUP_DETAILS = INSERT INTO REMOTE_PROCESS_GROUP_DETAILS ( ++ ACTION_ID, URI ++ ) VALUES ( ++ ?, ++ ? ++ ); + +// -- +// action details +// -- +private static final String INSERT_CONFIGURE_DETAILS = INSERT INTO CONFIGURE_DETAILS ( ++ ACTION_ID, NAME, VALUE, PREVIOUS_VALUE ++ ) VALUES ( ++ ?, ++ ?, ++ ?, ++ ? ++ ); + +private static final String INSERT_CONNECT_DETAILS = INSERT INTO CONNECT_DETAILS ( ++ ACTION_ID, SOURCE_ID, SOURCE_NAME, SOURCE_TYPE, RELATIONSHIP, DESTINATION_ID, DESTINATION_NAME, DESTINATION_TYPE ++ ) VALUES ( ++ ?, ++ ?, ++ ?, ++ ?, ++ ?, ++ ?, ++ ?, ++ ? ++ ); + +private static final String INSERT_MOVE_DETAILS = INSERT INTO MOVE_DETAILS ( ++ ACTION_ID, GROUP_ID, GROUP_NAME, PREVIOUS_GROUP_ID, PREVIOUS_GROUP_NAME ++ ) VALUES ( ++ ?, ++ ?, ++ ?, ++ ?, ++ ? ++ ); + +private static final String INSERT_PURGE_DETAILS = INSERT INTO PURGE_DETAILS
[27/51] [partial] incubator-nifi git commit: Initial code contribution
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/admin/service/action/UpdateUserAuthoritiesCacheAction.java -- diff --git a/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/admin/service/action/UpdateUserAuthoritiesCacheAction.java b/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/admin/service/action/UpdateUserAuthoritiesCacheAction.java new file mode 100644 index 000..89661b2 --- /dev/null +++ b/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/admin/service/action/UpdateUserAuthoritiesCacheAction.java @@ -0,0 +1,73 @@ +/* + * 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. + */ +package org.apache.nifi.admin.service.action; + +import java.util.Set; +import org.apache.nifi.admin.dao.AuthorityDAO; +import org.apache.nifi.admin.dao.DAOFactory; +import org.apache.nifi.admin.dao.DataAccessException; +import org.apache.nifi.admin.dao.UserDAO; +import org.apache.nifi.admin.service.AccountNotFoundException; +import org.apache.nifi.authorization.Authority; +import org.apache.nifi.authorization.AuthorityProvider; +import org.apache.nifi.user.NiFiUser; +import org.apache.commons.collections4.CollectionUtils; + +/** + * Updates a NiFiUser's authorities. Prior to invoking this action, the user's + * authorities should be set according to the business logic of the service in + * question. This should not be invoked directly when attempting to set user + * authorities as the authorityProvider is not called from this action. + */ +public class UpdateUserAuthoritiesCacheAction extends AbstractUserActionVoid { + +private final NiFiUser user; + +public UpdateUserAuthoritiesCacheAction(NiFiUser user) { +this.user = user; +} + +@Override +public Void execute(DAOFactory daoFactory, AuthorityProvider authorityProvider) throws DataAccessException { +UserDAO userDao = daoFactory.getUserDAO(); +AuthorityDAO authorityDao = daoFactory.getAuthorityDAO(); + +// get the user +NiFiUser currentUser = userDao.findUserById(user.getId()); + +// ensure the user exists +if (currentUser == null) { +throw new AccountNotFoundException(String.format(Unable to find account with ID %s., user.getId())); +} + +// determine what authorities need to be added/removed +SetAuthority authorities = user.getAuthorities(); +SetAuthority authoritiesToAdd = determineAuthoritiesToAdd(currentUser, authorities); +SetAuthority authoritiesToRemove = determineAuthoritiesToRemove(currentUser, authorities); + +// update the user authorities locally +if (CollectionUtils.isNotEmpty(authoritiesToAdd)) { +authorityDao.createAuthorities(authoritiesToAdd, user.getId()); +} +if (CollectionUtils.isNotEmpty(authoritiesToRemove)) { +authorityDao.deleteAuthorities(authoritiesToRemove, user.getId()); +} + +return null; +} + +} http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/admin/service/action/UpdateUserCacheAction.java -- diff --git a/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/admin/service/action/UpdateUserCacheAction.java b/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/admin/service/action/UpdateUserCacheAction.java new file mode 100644 index 000..288e297 --- /dev/null +++ b/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/admin/service/action/UpdateUserCacheAction.java @@ -0,0 +1,47 @@ +/* + * 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
[20/51] [partial] incubator-nifi git commit: Initial code contribution
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/entity/CounterEntity.java -- diff --git a/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/entity/CounterEntity.java b/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/entity/CounterEntity.java new file mode 100644 index 000..666dc75 --- /dev/null +++ b/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/entity/CounterEntity.java @@ -0,0 +1,45 @@ +/* + * 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. + */ +package org.apache.nifi.web.api.entity; + +import javax.xml.bind.annotation.XmlRootElement; +import org.apache.nifi.web.api.dto.CounterDTO; + +/** + * A serialized representation of this class can be placed in the entity body of + * a response from the API. This particular entity holds a reference to a + * CounterDTO. + */ +@XmlRootElement(name = counterEntity) +public class CounterEntity extends Entity { + +private CounterDTO counter; + +/** + * Get the counter. + * + * @return + */ +public CounterDTO getCounter() { +return counter; +} + +public void setCounter(CounterDTO counter) { +this.counter = counter; +} + +} http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/entity/CountersEntity.java -- diff --git a/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/entity/CountersEntity.java b/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/entity/CountersEntity.java new file mode 100644 index 000..bee7669 --- /dev/null +++ b/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/entity/CountersEntity.java @@ -0,0 +1,46 @@ +/* + * 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. + */ +package org.apache.nifi.web.api.entity; + +import javax.xml.bind.annotation.XmlRootElement; +import org.apache.nifi.web.api.dto.CountersDTO; + +/** + * A serialized representation of this class can be placed in the entity body of + * a response from the API. This particular entity holds a reference to a + * CountersDTO. + */ +@XmlRootElement(name = countersEntity) +public class CountersEntity extends Entity { + +private CountersDTO counters; + +/** + * Get the counters which contains all the counter groups and a generation + * date. + * + * @return + */ +public CountersDTO getCounters() { +return counters; +} + +public void setCounters(CountersDTO counters) { +this.counters = counters; +} + +} http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/entity/Entity.java -- diff --git a/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/entity/Entity.java b/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/entity/Entity.java new file mode 100644 index 000..6abcbf3 ---
[26/51] [partial] incubator-nifi git commit: Initial code contribution
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/history/History.java -- diff --git a/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/history/History.java b/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/history/History.java new file mode 100644 index 000..8536871 --- /dev/null +++ b/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/history/History.java @@ -0,0 +1,56 @@ +/* + * 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. + */ +package org.apache.nifi.history; + +import java.util.Collection; +import java.util.Date; +import org.apache.nifi.action.Action; + +/** + * The result of running an action query. + */ +public class History { + +private Integer total; +private Date lastRefreshed; +private CollectionAction actions; + +public CollectionAction getActions() { +return actions; +} + +public void setActions(CollectionAction actions) { +this.actions = actions; +} + +public Integer getTotal() { +return total; +} + +public void setTotal(Integer totalRecordCount) { +this.total = totalRecordCount; +} + +public Date getLastRefreshed() { +return lastRefreshed; +} + +public void setLastRefreshed(Date lastRefreshed) { +this.lastRefreshed = lastRefreshed; +} + +} http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/history/HistoryQuery.java -- diff --git a/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/history/HistoryQuery.java b/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/history/HistoryQuery.java new file mode 100644 index 000..53cc13c --- /dev/null +++ b/nar-bundles/framework-bundle/framework/administration/src/main/java/org/apache/nifi/history/HistoryQuery.java @@ -0,0 +1,99 @@ +/* + * 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. + */ +package org.apache.nifi.history; + +import java.util.Date; + +/** + * + */ +public class HistoryQuery { + +private String userName; +private String sourceId; +private Date startDate; +private Date endDate; +private Integer offset; +private Integer count; +private String sortColumn; +private String sortOrder; + +public Date getEndDate() { +return endDate; +} + +public void setEndDate(Date endDate) { +this.endDate = endDate; +} + +public String getSourceId() { +return sourceId; +} + +public void setSourceId(String sourceId) { +this.sourceId = sourceId; +} + +public Date getStartDate() { +return startDate; +} + +public void setStartDate(Date startDate) { +this.startDate = startDate; +} + +public String getUserName() { +return userName; +} + +public void setUserName(String userName) { +this.userName = userName; +} + +public Integer getOffset() { +return offset; +} + +public void setOffset(Integer offset) { +this.offset = offset; +} + +public Integer getCount() { +
[23/51] [partial] incubator-nifi git commit: Initial code contribution
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/dto/SystemDiagnosticsDTO.java -- diff --git a/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/dto/SystemDiagnosticsDTO.java b/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/dto/SystemDiagnosticsDTO.java new file mode 100644 index 000..0b20852 --- /dev/null +++ b/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/dto/SystemDiagnosticsDTO.java @@ -0,0 +1,461 @@ +/* + * 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. + */ +package org.apache.nifi.web.api.dto; + +import java.util.Date; +import java.util.Set; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; +import org.apache.nifi.web.api.dto.util.TimeAdapter; + +/** + * The diagnostics of the system this NiFi is running on. + */ +@XmlType(name = systemDiagnostics) +public class SystemDiagnosticsDTO { + +private String totalNonHeap; +private String usedNonHeap; +private String freeNonHeap; +private String maxNonHeap; +private String nonHeapUtilization; + +private String totalHeap; +private String usedHeap; +private String freeHeap; +private String maxHeap; +private String heapUtilization; + +private Integer availableProcessors; +private Double processorLoadAverage; + +private Integer totalThreads; +private Integer daemonThreads; + +private StorageUsageDTO flowFileRepositoryStorageUsage; +private SetStorageUsageDTO contentRepositoryStorageUsage; +private SetGarbageCollectionDTO garbageCollection; + +private Date statsLastRefreshed; + +/* getters / setters */ +/** + * The number of available processors, if supported. + * + * @return + */ +public Integer getAvailableProcessors() { +return availableProcessors; +} + +public void setAvailableProcessors(Integer availableProcessors) { +this.availableProcessors = availableProcessors; +} + +/** + * The number of daemon threads. + * + * @return + */ +public Integer getDaemonThreads() { +return daemonThreads; +} + +public void setDaemonThreads(Integer daemonThreads) { +this.daemonThreads = daemonThreads; +} + +/** + * The amount of free heap. + * + * @return + */ +public String getFreeHeap() { +return freeHeap; +} + +public void setFreeHeap(String freeHeap) { +this.freeHeap = freeHeap; +} + +/** + * The amount of free non-heap. + * + * @return + */ +public String getFreeNonHeap() { +return freeNonHeap; +} + +public void setFreeNonHeap(String freeNonHeap) { +this.freeNonHeap = freeNonHeap; +} + +/** + * The max size of the heap. + * + * @return + */ +public String getMaxHeap() { +return maxHeap; +} + +public void setMaxHeap(String maxHeap) { +this.maxHeap = maxHeap; +} + +/** + * The max size of the non-heap. + * + * @return + */ +public String getMaxNonHeap() { +return maxNonHeap; +} + +public void setMaxNonHeap(String maxNonHeap) { +this.maxNonHeap = maxNonHeap; +} + +/** + * The processor load average, if supported. + * + * @return + */ +public Double getProcessorLoadAverage() { +return processorLoadAverage; +} + +public void setProcessorLoadAverage(Double processorLoadAverage) { +this.processorLoadAverage = processorLoadAverage; +} + +/** + * The total size of the heap. + * + * @return + */ +public String getTotalHeap() { +return totalHeap; +} + +public void setTotalHeap(String totalHeap) { +this.totalHeap = totalHeap; +} + +/** + * The total size of non-heap. + * + * @return + */ +public String getTotalNonHeap() { +return totalNonHeap; +} + +public void
[34/51] [partial] incubator-nifi git commit: Initial code contribution
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/nar-bundles/distributed-cache-services-bundle/distributed-cache-client-service/src/main/java/org/apache/nifi/distributed/cache/client/DistributedSetCacheClientService.java -- diff --git a/nar-bundles/distributed-cache-services-bundle/distributed-cache-client-service/src/main/java/org/apache/nifi/distributed/cache/client/DistributedSetCacheClientService.java b/nar-bundles/distributed-cache-services-bundle/distributed-cache-client-service/src/main/java/org/apache/nifi/distributed/cache/client/DistributedSetCacheClientService.java new file mode 100644 index 000..1d7c94c --- /dev/null +++ b/nar-bundles/distributed-cache-services-bundle/distributed-cache-client-service/src/main/java/org/apache/nifi/distributed/cache/client/DistributedSetCacheClientService.java @@ -0,0 +1,212 @@ +/* + * 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. + */ +package org.apache.nifi.distributed.cache.client; + +import java.io.DataInputStream; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.BlockingQueue; +import java.util.concurrent.LinkedBlockingQueue; +import java.util.concurrent.TimeUnit; + +import org.apache.nifi.components.PropertyDescriptor; +import org.apache.nifi.controller.AbstractControllerService; +import org.apache.nifi.controller.ConfigurationContext; +import org.apache.nifi.controller.annotation.OnConfigured; +import org.apache.nifi.distributed.cache.protocol.ProtocolHandshake; +import org.apache.nifi.distributed.cache.protocol.exception.HandshakeException; +import org.apache.nifi.io.ByteArrayOutputStream; +import org.apache.nifi.io.DataOutputStream; +import org.apache.nifi.processor.util.StandardValidators; +import org.apache.nifi.remote.StandardVersionNegotiator; +import org.apache.nifi.remote.VersionNegotiator; +import org.apache.nifi.ssl.SSLContextService; +import org.apache.nifi.ssl.SSLContextService.ClientAuth; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class DistributedSetCacheClientService extends AbstractControllerService implements DistributedSetCacheClient { + +private static final Logger logger = LoggerFactory.getLogger(DistributedMapCacheClientService.class); + +public static final PropertyDescriptor HOSTNAME = new PropertyDescriptor.Builder() +.name(Server Hostname) +.description(The name of the server that is running the DistributedSetCacheServer service) +.required(true) +.addValidator(StandardValidators.NON_EMPTY_VALIDATOR) +.build(); +public static final PropertyDescriptor PORT = new PropertyDescriptor.Builder() +.name(Server Port) +.description(The port on the remote server that is to be used when communicating with the DistributedSetCacheServer service) +.required(true) +.addValidator(StandardValidators.PORT_VALIDATOR) +.defaultValue(4557) +.build(); +public static final PropertyDescriptor SSL_CONTEXT_SERVICE = new PropertyDescriptor.Builder() +.name(SSL Context Service) +.description( +If specified, indicates the SSL Context Service that is used to communicate with the remote server. If not specified, communications will not be encrypted) +.required(false) + .addValidator(StandardValidators.createControllerServiceExistsValidator(SSLContextService.class)) +.defaultValue(null) +.build(); +public static final PropertyDescriptor COMMUNICATIONS_TIMEOUT = new PropertyDescriptor.Builder() +.name(Communications Timeout) +.description( +Specifices how long to wait when communicating with the remote server before determining that there is a communications failure if data cannot be sent or received) +.required(true) +.addValidator(StandardValidators.TIME_PERIOD_VALIDATOR) +.defaultValue(30 secs) +.build(); + +private final BlockingQueueCommsSession queue = new LinkedBlockingQueue(); +
[08/51] [partial] incubator-nifi git commit: Initial code contribution
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/controller/StandardFlowFileQueue.java -- diff --git a/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/controller/StandardFlowFileQueue.java b/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/controller/StandardFlowFileQueue.java new file mode 100644 index 000..3b880bb --- /dev/null +++ b/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/controller/StandardFlowFileQueue.java @@ -0,0 +1,1093 @@ +/* + * 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. + */ +package org.apache.nifi.controller; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.Comparator; +import java.util.Iterator; +import java.util.List; +import java.util.PriorityQueue; +import java.util.Queue; +import java.util.Set; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicLong; +import java.util.concurrent.atomic.AtomicReference; +import java.util.concurrent.locks.ReentrantReadWriteLock; + +import org.apache.nifi.connectable.Connection; +import org.apache.nifi.controller.repository.FlowFileRecord; +import org.apache.nifi.controller.repository.claim.ContentClaim; +import org.apache.nifi.flowfile.FlowFile; +import org.apache.nifi.flowfile.FlowFilePrioritizer; +import org.apache.nifi.processor.DataUnit; +import org.apache.nifi.processor.FlowFileFilter; +import org.apache.nifi.processor.FlowFileFilter.FlowFileFilterResult; +import org.apache.nifi.processor.QueueSize; +import org.apache.nifi.scheduling.SchedulingStrategy; +import org.apache.nifi.util.FormatUtils; +import org.apache.nifi.util.concurrency.TimedLock; +import org.apache.nifi.util.timebuffer.LongEntityAccess; +import org.apache.nifi.util.timebuffer.TimedBuffer; +import org.apache.nifi.util.timebuffer.TimestampedLong; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * A FlowFileQueue is used to queue FlowFile objects that are awaiting further + * processing. Must be thread safe. + * + * @author none + */ +public final class StandardFlowFileQueue implements FlowFileQueue { + +public static final int MAX_EXPIRED_RECORDS_PER_ITERATION = 10; +public static final int SWAP_RECORD_POLL_SIZE = 1; + +// When we have very high contention on a FlowFile Queue, the writeLock quickly becomes the bottleneck. In order to avoid this, +// we keep track of how often we are obtaining the write lock. If we exceed some threshold, we start performing a Pre-fetch so that +// we can then poll many times without having to obtain the lock. +// If lock obtained an average of more than PREFETCH_POLL_THRESHOLD times per second in order to poll from queue for last 5 seconds, do a pre-fetch. +public static final int PREFETCH_POLL_THRESHOLD = 1000; +public static final int PRIORITIZED_PREFETCH_SIZE = 10; +public static final int UNPRIORITIZED_PREFETCH_SIZE = 1000; +private volatile int prefetchSize = UNPRIORITIZED_PREFETCH_SIZE; // when we pre-fetch, how many should we pre-fetch? + +private static final Logger logger = LoggerFactory.getLogger(StandardFlowFileQueue.class); + +private PriorityQueueFlowFileRecord activeQueue = null; +private long activeQueueContentSize = 0L; +private ArrayListFlowFileRecord swapQueue = null; + +private int swappedRecordCount = 0; +private long swappedContentSize = 0L; +private String maximumQueueDataSize; +private long maximumQueueByteCount; +private boolean swapMode = false; +private long maximumQueueObjectCount; + +private final AtomicLong flowFileExpirationMillis; +private final Connection connection; +private final AtomicReferenceString flowFileExpirationPeriod; +private final ReentrantReadWriteLock lock = new ReentrantReadWriteLock(true); +private final ListFlowFilePrioritizer priorities; +
[18/51] [partial] incubator-nifi git commit: Initial code contribution
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/nar-bundles/framework-bundle/framework/cluster-protocol/src/main/java/org/apache/nifi/cluster/protocol/NodeProtocolSender.java -- diff --git a/nar-bundles/framework-bundle/framework/cluster-protocol/src/main/java/org/apache/nifi/cluster/protocol/NodeProtocolSender.java b/nar-bundles/framework-bundle/framework/cluster-protocol/src/main/java/org/apache/nifi/cluster/protocol/NodeProtocolSender.java new file mode 100644 index 000..1edcb91 --- /dev/null +++ b/nar-bundles/framework-bundle/framework/cluster-protocol/src/main/java/org/apache/nifi/cluster/protocol/NodeProtocolSender.java @@ -0,0 +1,73 @@ +/* + * 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. + */ +package org.apache.nifi.cluster.protocol; + +import org.apache.nifi.cluster.protocol.message.ConnectionRequestMessage; +import org.apache.nifi.cluster.protocol.message.ConnectionResponseMessage; +import org.apache.nifi.cluster.protocol.message.ControllerStartupFailureMessage; +import org.apache.nifi.cluster.protocol.message.HeartbeatMessage; +import org.apache.nifi.cluster.protocol.message.NodeBulletinsMessage; +import org.apache.nifi.cluster.protocol.message.ReconnectionFailureMessage; + +/** + * An interface for sending protocol messages from a node to the cluster manager. + * @author unattributed + */ +public interface NodeProtocolSender { + +/** + * Sends a connection request message to the cluster manager. + * @param msg a message + * @return the response + * @throws UnknownServiceAddressException if the cluster manager's address is not known + * @throws ProtocolException if communication failed + */ +ConnectionResponseMessage requestConnection(ConnectionRequestMessage msg) throws ProtocolException, UnknownServiceAddressException; + +/** + * Sends a heartbeat message to the cluster manager. + * @param msg a message + * @throws UnknownServiceAddressException if the cluster manager's address is not known + * @throws ProtocolException if communication failed + */ +void heartbeat(HeartbeatMessage msg) throws ProtocolException, UnknownServiceAddressException; + +/** + * Sends a bulletins message to the cluster manager. + * @param msg + * @throws ProtocolException + * @throws UnknownServiceAddressException + */ +void sendBulletins(NodeBulletinsMessage msg) throws ProtocolException, UnknownServiceAddressException; + +/** + * Sends a failure notification if the controller was unable start. + * @param msg a message + * @throws UnknownServiceAddressException if the cluster manager's address is not known + * @throws ProtocolException if communication failed + */ +void notifyControllerStartupFailure(ControllerStartupFailureMessage msg) throws ProtocolException, UnknownServiceAddressException; + +/** + * Sends a failure notification if the node was unable to reconnect to the cluster + * @param msg a message + * @throws UnknownServiceAddressException if the cluster manager's address is not known + * @throws ProtocolException if communication failed + */ +void notifyReconnectionFailure(ReconnectionFailureMessage msg) throws ProtocolException, UnknownServiceAddressException; + +} http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/nar-bundles/framework-bundle/framework/cluster-protocol/src/main/java/org/apache/nifi/cluster/protocol/ProtocolContext.java -- diff --git a/nar-bundles/framework-bundle/framework/cluster-protocol/src/main/java/org/apache/nifi/cluster/protocol/ProtocolContext.java b/nar-bundles/framework-bundle/framework/cluster-protocol/src/main/java/org/apache/nifi/cluster/protocol/ProtocolContext.java new file mode 100644 index 000..b614e76 --- /dev/null +++ b/nar-bundles/framework-bundle/framework/cluster-protocol/src/main/java/org/apache/nifi/cluster/protocol/ProtocolContext.java @@ -0,0 +1,39 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license
[06/51] [partial] incubator-nifi git commit: Initial code contribution
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/remote/TransferDirection.java -- diff --git a/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/remote/TransferDirection.java b/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/remote/TransferDirection.java new file mode 100644 index 000..56432d5 --- /dev/null +++ b/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/remote/TransferDirection.java @@ -0,0 +1,23 @@ +/* + * 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. + */ +package org.apache.nifi.remote; + +public enum TransferDirection { + +SEND, +RECEIVE; +} http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/remote/VersionedRemoteResource.java -- diff --git a/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/remote/VersionedRemoteResource.java b/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/remote/VersionedRemoteResource.java new file mode 100644 index 000..bfccd98 --- /dev/null +++ b/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/remote/VersionedRemoteResource.java @@ -0,0 +1,24 @@ +/* + * 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. + */ +package org.apache.nifi.remote; + +public interface VersionedRemoteResource { + +VersionNegotiator getVersionNegotiator(); + +String getResourceName(); +} http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/remote/codec/FlowFileCodec.java -- diff --git a/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/remote/codec/FlowFileCodec.java b/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/remote/codec/FlowFileCodec.java new file mode 100644 index 000..b4206b3 --- /dev/null +++ b/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/remote/codec/FlowFileCodec.java @@ -0,0 +1,79 @@ +/* + * 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. + */ +package org.apache.nifi.remote.codec; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.util.List; + +import org.apache.nifi.flowfile.FlowFile; +import org.apache.nifi.processor.ProcessSession;
[10/51] [partial] incubator-nifi git commit: Initial code contribution
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/nar-bundles/framework-bundle/framework/cluster/src/test/java/org/apache/nifi/cluster/manager/testutils/HttpResponse.java -- diff --git a/nar-bundles/framework-bundle/framework/cluster/src/test/java/org/apache/nifi/cluster/manager/testutils/HttpResponse.java b/nar-bundles/framework-bundle/framework/cluster/src/test/java/org/apache/nifi/cluster/manager/testutils/HttpResponse.java new file mode 100644 index 000..3aa2931 --- /dev/null +++ b/nar-bundles/framework-bundle/framework/cluster/src/test/java/org/apache/nifi/cluster/manager/testutils/HttpResponse.java @@ -0,0 +1,93 @@ +/* + * 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. + */ +package org.apache.nifi.cluster.manager.testutils; + +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import javax.ws.rs.core.Response.Status; + +/** + * Encapsulates an HTTP response. The toString method returns the + * specification-compliant response. + * + * @author unattributed + */ +public class HttpResponse { + +private final Status status; +private final String entity; +private final MapString, String headers = new HashMap(); + +public HttpResponse(final Status status, final String entity) { +this.status = status; +this.entity = entity; +headers.put(content-length, String.valueOf(entity.getBytes().length)); +} + +public String getEntity() { +return entity; +} + +public Status getStatus() { +return status; +} + +public MapString, String getHeaders() { +return Collections.unmodifiableMap(headers); +} + +public void addHeader(final String key, final String value) { +if (key.contains( )) { +throw new IllegalArgumentException(Header key may not contain spaces.); +} else if (content-length.equalsIgnoreCase(key)) { +throw new IllegalArgumentException(Content-Length header is set automatically based on length of content.); +} +headers.put(key, value); +} + +public void addHeaders(final MapString, String headers) { +for (final Map.EntryString, String entry : headers.entrySet()) { +addHeader(entry.getKey(), entry.getValue()); +} +} + +@Override +public String toString() { + +final StringBuilder strb = new StringBuilder(); + +// response line +strb.append(HTTP/1.1 ) +.append(status.getStatusCode()) +.append( ) +.append(status.getReasonPhrase()) +.append(\n); + +// headers +for (final Map.EntryString, String entry : headers.entrySet()) { +strb.append(entry.getKey()).append(: ).append(entry.getValue()).append(\n); +} + +strb.append(\n); + +// body +strb.append(entity); + +return strb.toString(); +} +} http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/nar-bundles/framework-bundle/framework/cluster/src/test/java/org/apache/nifi/cluster/manager/testutils/HttpResponseAction.java -- diff --git a/nar-bundles/framework-bundle/framework/cluster/src/test/java/org/apache/nifi/cluster/manager/testutils/HttpResponseAction.java b/nar-bundles/framework-bundle/framework/cluster/src/test/java/org/apache/nifi/cluster/manager/testutils/HttpResponseAction.java new file mode 100644 index 000..28615d0 --- /dev/null +++ b/nar-bundles/framework-bundle/framework/cluster/src/test/java/org/apache/nifi/cluster/manager/testutils/HttpResponseAction.java @@ -0,0 +1,60 @@ +/* + * 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 + * +
[41/51] [partial] incubator-nifi git commit: Initial code contribution
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/commons/nifi-socket-utils/src/main/java/org/apache/nifi/io/socket/ServerSocketConfiguration.java -- diff --git a/commons/nifi-socket-utils/src/main/java/org/apache/nifi/io/socket/ServerSocketConfiguration.java b/commons/nifi-socket-utils/src/main/java/org/apache/nifi/io/socket/ServerSocketConfiguration.java new file mode 100644 index 000..fc279fb --- /dev/null +++ b/commons/nifi-socket-utils/src/main/java/org/apache/nifi/io/socket/ServerSocketConfiguration.java @@ -0,0 +1,83 @@ +/* + * 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. + */ +package org.apache.nifi.io.socket; + +import java.io.FileNotFoundException; +import java.io.IOException; +import java.security.KeyManagementException; +import java.security.KeyStoreException; +import java.security.NoSuchAlgorithmException; +import java.security.UnrecoverableKeyException; +import java.security.cert.CertificateException; + +import javax.net.ssl.SSLContext; + +/** + * @author unattributed + */ +public final class ServerSocketConfiguration { + +private boolean needClientAuth; +private Integer socketTimeout; +private Boolean reuseAddress; +private Integer receiveBufferSize; +private SSLContextFactory sslContextFactory; + +public ServerSocketConfiguration() { +} + +public SSLContext createSSLContext() throws KeyManagementException, NoSuchAlgorithmException, UnrecoverableKeyException, KeyStoreException, CertificateException, FileNotFoundException, IOException { +return sslContextFactory == null ? null : sslContextFactory.createSslContext(); +} + +public void setSSLContextFactory(final SSLContextFactory sslContextFactory) { +this.sslContextFactory = sslContextFactory; +} + +public Integer getSocketTimeout() { +return socketTimeout; +} + +public void setSocketTimeout(Integer socketTimeout) { +this.socketTimeout = socketTimeout; +} + +public boolean getNeedClientAuth() { +return needClientAuth; +} + +public void setNeedClientAuth(boolean needClientAuth) { +this.needClientAuth = needClientAuth; +} + +public Boolean getReuseAddress() { +return reuseAddress; +} + +public void setReuseAddress(Boolean reuseAddress) { +this.reuseAddress = reuseAddress; +} + +public Integer getReceiveBufferSize() { +return receiveBufferSize; +} + +public void setReceiveBufferSize(Integer receiveBufferSize) { +this.receiveBufferSize = receiveBufferSize; +} + +} http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/commons/nifi-socket-utils/src/main/java/org/apache/nifi/io/socket/SocketConfiguration.java -- diff --git a/commons/nifi-socket-utils/src/main/java/org/apache/nifi/io/socket/SocketConfiguration.java b/commons/nifi-socket-utils/src/main/java/org/apache/nifi/io/socket/SocketConfiguration.java new file mode 100644 index 000..c24b540 --- /dev/null +++ b/commons/nifi-socket-utils/src/main/java/org/apache/nifi/io/socket/SocketConfiguration.java @@ -0,0 +1,116 @@ +/* + * 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. + */ +package org.apache.nifi.io.socket; + +import java.io.FileNotFoundException; +import java.io.IOException; +import java.security.KeyManagementException; +import
[19/51] [partial] incubator-nifi git commit: Initial code contribution
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/entity/UserGroupEntity.java -- diff --git a/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/entity/UserGroupEntity.java b/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/entity/UserGroupEntity.java new file mode 100644 index 000..a6542c8 --- /dev/null +++ b/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/entity/UserGroupEntity.java @@ -0,0 +1,45 @@ +/* + * 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. + */ +package org.apache.nifi.web.api.entity; + +import javax.xml.bind.annotation.XmlRootElement; +import org.apache.nifi.web.api.dto.UserGroupDTO; + +/** + * A serialized representation of this class can be placed in the entity body of + * a request or response to or from the API. This particular entity holds a + * reference to a UserGroupDTO. + */ +@XmlRootElement(name = userGroupEntity) +public class UserGroupEntity extends Entity { + +private UserGroupDTO userGroup; + +/** + * The UserGroupDTO that is being serialized. + * + * @return The UserGroupDTO object + */ +public UserGroupDTO getUserGroup() { +return userGroup; +} + +public void setUserGroup(UserGroupDTO userGroup) { +this.userGroup = userGroup; +} + +} http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/entity/UserSearchResultsEntity.java -- diff --git a/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/entity/UserSearchResultsEntity.java b/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/entity/UserSearchResultsEntity.java new file mode 100644 index 000..baffe15 --- /dev/null +++ b/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/entity/UserSearchResultsEntity.java @@ -0,0 +1,61 @@ +/* + * 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. + */ +package org.apache.nifi.web.api.entity; + +import java.util.List; +import javax.xml.bind.annotation.XmlRootElement; +import org.apache.nifi.web.api.dto.search.UserGroupSearchResultDTO; +import org.apache.nifi.web.api.dto.search.UserSearchResultDTO; + +/** + * A serialized representation of this class can be placed in the entity body of + * a request or response to or from the API. This particular entity holds a + * reference to UserSearchResultDTOs and UserGroupSearchResultDTOs. + */ +@XmlRootElement(name = userSearchResultsEntity) +public class UserSearchResultsEntity { + +private ListUserSearchResultDTO userResults; +private ListUserGroupSearchResultDTO userGroupResults; + +/** + * The user search results. + * + * @return + */ +public ListUserSearchResultDTO getUserResults() { +return userResults; +} + +public void setUserResults(ListUserSearchResultDTO userResults) { +this.userResults = userResults; +} + +/** + * The user group search results. + * + * @return + */ +public ListUserGroupSearchResultDTO getUserGroupResults() { +return
[11/51] [partial] incubator-nifi git commit: Initial code contribution
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/nar-bundles/framework-bundle/framework/cluster/src/main/java/org/apache/nifi/cluster/node/Node.java -- diff --git a/nar-bundles/framework-bundle/framework/cluster/src/main/java/org/apache/nifi/cluster/node/Node.java b/nar-bundles/framework-bundle/framework/cluster/src/main/java/org/apache/nifi/cluster/node/Node.java new file mode 100644 index 000..84565da --- /dev/null +++ b/nar-bundles/framework-bundle/framework/cluster/src/main/java/org/apache/nifi/cluster/node/Node.java @@ -0,0 +1,252 @@ +/* + * 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. + */ +package org.apache.nifi.cluster.node; + +import java.util.concurrent.atomic.AtomicLong; + +import org.apache.nifi.cluster.HeartbeatPayload; +import org.apache.nifi.cluster.protocol.Heartbeat; +import org.apache.nifi.cluster.protocol.NodeIdentifier; +import org.apache.nifi.cluster.protocol.ProtocolException; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * Represents a connected flow controller. Nodes always have an immutable + * identifier and a status. The status may be changed, but never null. + * + * A Node may be cloned, but the cloning is a shallow copy of the instance. + * + * This class overrides hashCode and equals and considers two instances to be + * equal if they have the equal NodeIdentifiers. + * + * @author unattributed + */ +public class Node implements Cloneable, ComparableNode { + +private static final Logger lockLogger = LoggerFactory.getLogger(cluster.lock); + +/** + * The semantics of a Node status are as follows: + * ul + * liCONNECTED -- a flow controller that is connected to the cluster. A + * connecting node transitions to connected after the cluster receives the + * flow controller's first heartbeat. A connected node can transition to + * disconnecting./li + * liCONNECTING -- a flow controller has issued a connection request to + * the cluster, but has not yet sent a heartbeat. A connecting node can + * transition to disconnecting or connected. The cluster will not accept any + * external requests to change the flow while any node is connecting./li + * liDISCONNECTED -- a flow controller that is not connected to the + * cluster. A disconnected node can transition to connecting./li + * liDISCONNECTING -- a flow controller that is in the process of + * disconnecting from the cluster. A disconnecting node will always + * transition to disconnected./li + * /ul + */ +public static enum Status { + +CONNECTED, +CONNECTING, +DISCONNECTED, +DISCONNECTING +} + +/** + * the node's unique identifier + */ +private final NodeIdentifier nodeId; + +/** + * the node statue + */ +private Status status; + +/** + * the last heartbeat received by from the node + */ +private Heartbeat lastHeartbeat; + +/** + * the payload of the last heartbeat received from the node + */ +private HeartbeatPayload lastHeartbeatPayload; + +/** + * the last time the connection for this node was requested + */ +private AtomicLong connectionRequestedTimestamp = new AtomicLong(0L); + +/** + * a flag to indicate this node was disconnected because of a lack of + * heartbeat + */ +private boolean heartbeatDisconnection; + +public Node(final NodeIdentifier id, final Status status) { +if (id == null) { +throw new IllegalArgumentException(ID may not be null.); +} else if (status == null) { +throw new IllegalArgumentException(Status may not be null.); +} +this.nodeId = id; +this.status = status; +} + +public NodeIdentifier getNodeId() { +return nodeId; +} + +/** + * Returns the last received heartbeat or null if no heartbeat has been set. + * + * @return a heartbeat or null + */ +public Heartbeat getHeartbeat() { +return lastHeartbeat; +} + +public HeartbeatPayload getHeartbeatPayload() { +return lastHeartbeatPayload; +} + +
[22/51] [partial] incubator-nifi git commit: Initial code contribution
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/dto/provenance/ProvenanceResultsDTO.java -- diff --git a/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/dto/provenance/ProvenanceResultsDTO.java b/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/dto/provenance/ProvenanceResultsDTO.java new file mode 100644 index 000..d6ea8a0 --- /dev/null +++ b/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/dto/provenance/ProvenanceResultsDTO.java @@ -0,0 +1,136 @@ +/* + * 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. + */ +package org.apache.nifi.web.api.dto.provenance; + +import org.apache.nifi.web.api.dto.util.DateTimeAdapter; +import org.apache.nifi.web.api.dto.util.TimeAdapter; + +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; +import java.util.Date; +import java.util.List; +import java.util.Set; + +/** + * Results of a provenance request. + */ +@XmlType(name = provenanceResults) +public class ProvenanceResultsDTO { + +private ListProvenanceEventDTO provenanceEvents; +private String total; +private Long totalCount; +private Date generated; +private Date oldestEvent; +private Integer timeOffset; + +private SetString errors; + +/** + * Any error messages. + * + * @return + */ +public SetString getErrors() { +return errors; +} + +public void setErrors(SetString errors) { +this.errors = errors; +} + +/** + * The provenance events that matched the search criteria. + * + * @return + */ +public ListProvenanceEventDTO getProvenanceEvents() { +return provenanceEvents; +} + +public void setProvenanceEvents(ListProvenanceEventDTO provenanceEvents) { +this.provenanceEvents = provenanceEvents; +} + +/** + * The total number of results formatted. + * + * @return + */ +public String getTotal() { +return total; +} + +public void setTotal(String total) { +this.total = total; +} + +/** + * The total number of results. + * + * @return + */ +public Long getTotalCount() { +return totalCount; +} + +public void setTotalCount(Long totalCount) { +this.totalCount = totalCount; +} + +/** + * When the search was performed. + * + * @return + */ +@XmlJavaTypeAdapter(TimeAdapter.class) +public Date getGenerated() { +return generated; +} + +public void setGenerated(Date generated) { +this.generated = generated; +} + +/** + * The oldest event available in the provenance repository. + * + * @return + */ +@XmlJavaTypeAdapter(DateTimeAdapter.class) +public Date getOldestEvent() { +return oldestEvent; +} + +public void setOldestEvent(Date oldestEvent) { +this.oldestEvent = oldestEvent; +} + +/** + * The time offset on the server thats used for event time. + * + * @return + */ +public Integer getTimeOffset() { +return timeOffset; +} + +public void setTimeOffset(Integer timeOffset) { +this.timeOffset = timeOffset; +} + +} http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/dto/provenance/ProvenanceSearchableFieldDTO.java -- diff --git a/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/dto/provenance/ProvenanceSearchableFieldDTO.java b/nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/dto/provenance/ProvenanceSearchableFieldDTO.java new file mode 100644 index 000..af89f97 --- /dev/null +++
[12/51] [partial] incubator-nifi git commit: Initial code contribution
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4d998c12/nar-bundles/framework-bundle/framework/cluster/src/main/java/org/apache/nifi/cluster/manager/impl/WebClusterManager.java -- diff --git a/nar-bundles/framework-bundle/framework/cluster/src/main/java/org/apache/nifi/cluster/manager/impl/WebClusterManager.java b/nar-bundles/framework-bundle/framework/cluster/src/main/java/org/apache/nifi/cluster/manager/impl/WebClusterManager.java new file mode 100644 index 000..3defea7 --- /dev/null +++ b/nar-bundles/framework-bundle/framework/cluster/src/main/java/org/apache/nifi/cluster/manager/impl/WebClusterManager.java @@ -0,0 +1,3616 @@ +/* + * 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. + */ +package org.apache.nifi.cluster.manager.impl; + +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.io.Serializable; +import java.net.URI; +import java.net.URL; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.Comparator; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.ListIterator; +import java.util.Map; +import java.util.Queue; +import java.util.Set; +import java.util.Timer; +import java.util.TimerTask; +import java.util.TreeMap; +import java.util.UUID; +import java.util.concurrent.CompletionService; +import java.util.concurrent.ConcurrentLinkedQueue; +import java.util.concurrent.ExecutorCompletionService; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.locks.Lock; +import java.util.concurrent.locks.ReentrantReadWriteLock; +import java.util.regex.Pattern; + +import javax.net.ssl.SSLContext; +import javax.ws.rs.HttpMethod; +import javax.ws.rs.WebApplicationException; +import javax.ws.rs.core.StreamingOutput; +import javax.xml.XMLConstants; +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.transform.dom.DOMSource; +import javax.xml.validation.Schema; +import javax.xml.validation.SchemaFactory; +import javax.xml.validation.Validator; + +import org.apache.nifi.admin.service.AuditService; +import org.apache.nifi.cluster.BulletinsPayload; +import org.apache.nifi.cluster.ClusterNodeInformation; +import org.apache.nifi.cluster.HeartbeatPayload; +import org.apache.nifi.cluster.NodeInformation; +import org.apache.nifi.cluster.context.ClusterContext; +import org.apache.nifi.cluster.context.ClusterContextImpl; +import org.apache.nifi.cluster.event.Event; +import org.apache.nifi.cluster.event.EventManager; +import org.apache.nifi.cluster.firewall.ClusterNodeFirewall; +import org.apache.nifi.cluster.flow.ClusterDataFlow; +import org.apache.nifi.cluster.flow.DaoException; +import org.apache.nifi.cluster.flow.DataFlowManagementService; +import org.apache.nifi.cluster.flow.PersistedFlowState; +import org.apache.nifi.cluster.manager.HttpClusterManager; +import org.apache.nifi.cluster.manager.HttpRequestReplicator; +import org.apache.nifi.cluster.manager.HttpResponseMapper; +import org.apache.nifi.cluster.manager.NodeResponse; +import org.apache.nifi.cluster.manager.exception.ConnectingNodeMutableRequestException; +import org.apache.nifi.cluster.manager.exception.DisconnectedNodeMutableRequestException; +import org.apache.nifi.cluster.manager.exception.IllegalClusterStateException; +import org.apache.nifi.cluster.manager.exception.IllegalNodeDeletionException; +import org.apache.nifi.cluster.manager.exception.IllegalNodeDisconnectionException; +import org.apache.nifi.cluster.manager.exception.IllegalNodeReconnectionException; +import org.apache.nifi.cluster.manager.exception.IneligiblePrimaryNodeException; +import org.apache.nifi.cluster.manager.exception.NoConnectedNodesException; +import org.apache.nifi.cluster.manager.exception.NoResponseFromNodesException; +import org.apache.nifi.cluster.manager.exception.NodeDisconnectionException; +import
[2/3] incubator-nifi git commit: Merge branch 'develop', remote branch 'origin/develop' into develop
Merge branch 'develop', remote branch 'origin/develop' into develop Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/c55e8510 Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/c55e8510 Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/c55e8510 Branch: refs/heads/develop Commit: c55e8510891c0e2eeb25a0b32fd574ae71aa8a7c Parents: 4410b70 3861446 Author: joewitt joew...@apache.org Authored: Tue Dec 9 20:59:30 2014 -0500 Committer: joewitt joew...@apache.org Committed: Tue Dec 9 20:59:30 2014 -0500 -- .../web/controller/StandardSearchContext.java | 18 +--- .../src/main/webapp/js/nf/canvas/nf-canvas.js | 95 ++-- .../main/webapp/js/nf/canvas/nf-connectable.js | 8 +- .../main/webapp/js/nf/canvas/nf-draggable.js| 49 ++ .../js/nf/canvas/nf-processor-property-table.js | 10 +-- .../main/webapp/js/nf/canvas/nf-selectable.js | 6 +- .../main/webapp/js/nf/nf-processor-details.js | 16 ++-- 7 files changed, 103 insertions(+), 99 deletions(-) --
[1/3] incubator-nifi git commit: Merge branch 'develop', remote branch 'origin/develop' into develop
Repository: incubator-nifi Updated Branches: refs/heads/develop 386144695 - 51d177b24 Merge branch 'develop', remote branch 'origin/develop' into develop Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/4410b707 Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/4410b707 Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/4410b707 Branch: refs/heads/develop Commit: 4410b7072cfe0daba72a45b6a82e9e5b04dbcaff Parents: 0125f3d Author: joewitt joew...@apache.org Authored: Tue Dec 9 10:08:57 2014 -0500 Committer: joewitt joew...@apache.org Committed: Tue Dec 9 10:08:57 2014 -0500 -- --
incubator-nifi git commit: NIFI-154 contributed via JIRA by Jake Visser jake at nightrise dot com dot au
Repository: incubator-nifi Updated Branches: refs/heads/develop 51d177b24 - 2735c6c25 NIFI-154 contributed via JIRA by Jake Visser jake at nightrise dot com dot au Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/2735c6c2 Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/2735c6c2 Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/2735c6c2 Branch: refs/heads/develop Commit: 2735c6c253483fb72f5ec946264f321392950b72 Parents: 51d177b Author: joewitt joew...@apache.org Authored: Wed Dec 10 07:38:12 2014 -0500 Committer: joewitt joew...@apache.org Committed: Wed Dec 10 07:38:12 2014 -0500 -- .../resources/src/main/resources/bin/nifi.sh| 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2735c6c2/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/nifi.sh -- diff --git a/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/nifi.sh b/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/nifi.sh index d069fc9..6fedfb7 100644 --- a/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/nifi.sh +++ b/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/nifi.sh @@ -50,6 +50,11 @@ if [ x$JAVA_MAX_PERMSIZE = x ]; then export JAVA_MAX_PERMSIZE fi +# +#Readlink is not available on all systems. Change variable to appropriate alternative as part of OS detection +# + +READLINK=readlink warn() { echo ${PROGNAME}: $* @@ -65,6 +70,7 @@ detectOS() { cygwin=false; aix=false; os400=false; +darwin=false; case `uname` in CYGWIN*) cygwin=true @@ -75,12 +81,18 @@ detectOS() { OS400*) os400=true ;; +Darwin) + darwin=true + ;; esac # For AIX, set an environment variable if $aix; then export LDR_CNTRL=MAXDATA=0xB000@DSA echo $LDR_CNTRL fi +if $darwin; then + READLINK=greadlink +fi } unlimitFD() { @@ -118,8 +130,8 @@ locateHome() { # In POSIX shells, CDPATH may cause cd to write to stdout (unset CDPATH) /dev/null 21 unset CDPATH -NIFI_HOME=$(dirname $(readlink -f $0))/../ -NIFI_HOME=$(readlink -f $NIFI_HOME) +NIFI_HOME=$(dirname $($READLINK -f $0))/../ +NIFI_HOME=$($READLINK -f $NIFI_HOME) cd $NIFI_HOME echo Directory changed to NIFI_HOME of '$NIFI_HOME' if [ ! -d $NIFI_HOME ]; then
svn commit: r1644648 - /incubator/nifi/site/trunk/content/development/quickstart.md
Author: joewitt Date: Thu Dec 11 14:18:54 2014 New Revision: 1644648 URL: http://svn.apache.org/r1644648 Log: Updated details for launching application Modified: incubator/nifi/site/trunk/content/development/quickstart.md Modified: incubator/nifi/site/trunk/content/development/quickstart.md URL: http://svn.apache.org/viewvc/incubator/nifi/site/trunk/content/development/quickstart.md?rev=1644648r1=1644647r2=1644648view=diff == --- incubator/nifi/site/trunk/content/development/quickstart.md (original) +++ incubator/nifi/site/trunk/content/development/quickstart.md Thu Dec 11 14:18:54 2014 @@ -46,8 +46,11 @@ to 8080 is a good start, but on systems `mvn assembly:assembly` will create a tar.gz file in the target directory in `assemblies/nifi`. This tar.gz should contain the full application. Decompressing the tar.gz should make a directory for you containing several other directories. `conf` contains application configuration, `logs` will contain log files, `bin` contains a fairly -bare-bones script for launching the application, `nifi.sh`. Running `bin/nifi.sh` should start the application in -the foreground after trying to detect a Java installation. +bare-bones script for launching the application, `nifi.sh`. On linux (and possibly macos) running `bin/nifi.sh start` +should start the application in the foreground after trying to detect a Java installation. There are scripts to help with +startup on windows as well. The entire concept of how the application will integrate to a given OS and run as an +enduring service is something we're working hard on and would appreciate ideas for. The user experience needs to +be excellent. With the default settings you can point a web browser at `http://localhost:8080/nifi/`
svn commit: r1644809 - /incubator/nifi/site/trunk/content/development/quickstart.md
Author: joewitt Date: Fri Dec 12 01:50:12 2014 New Revision: 1644809 URL: http://svn.apache.org/r1644809 Log: CMS commit to nifi by joewitt Modified: incubator/nifi/site/trunk/content/development/quickstart.md Modified: incubator/nifi/site/trunk/content/development/quickstart.md URL: http://svn.apache.org/viewvc/incubator/nifi/site/trunk/content/development/quickstart.md?rev=1644809r1=1644808r2=1644809view=diff == --- incubator/nifi/site/trunk/content/development/quickstart.md (original) +++ incubator/nifi/site/trunk/content/development/quickstart.md Fri Dec 12 01:50:12 2014 @@ -46,7 +46,7 @@ to 8080 is a good start, but on systems `mvn assembly:assembly` will create a tar.gz file in the target directory in `assemblies/nifi`. This tar.gz should contain the full application. Decompressing the tar.gz should make a directory for you containing several other directories. `conf` contains application configuration, `logs` will contain log files, `bin` contains a fairly -bare-bones script for launching the application, `nifi.sh`. On linux (and possibly macos) running `bin/nifi.sh start` +bare-bones script for launching the application, `nifi.sh`. On linux (and possibly OS X) running `bin/nifi.sh start` should start the application in the foreground after trying to detect a Java installation. There are scripts to help with startup on windows as well. The entire concept of how the application will integrate to a given OS and run as an enduring service is something we're working hard on and would appreciate ideas for. The user experience needs to
svn commit: r1645110 - /incubator/nifi/site/trunk/content/development/quickstart.md
Author: joewitt Date: Sat Dec 13 04:51:45 2014 New Revision: 1645110 URL: http://svn.apache.org/r1645110 Log: Added a reference to the develop branch so folks weren't stuck with what was on master. Modified: incubator/nifi/site/trunk/content/development/quickstart.md Modified: incubator/nifi/site/trunk/content/development/quickstart.md URL: http://svn.apache.org/viewvc/incubator/nifi/site/trunk/content/development/quickstart.md?rev=1645110r1=1645109r2=1645110view=diff == --- incubator/nifi/site/trunk/content/development/quickstart.md (original) +++ incubator/nifi/site/trunk/content/development/quickstart.md Sat Dec 13 04:51:45 2014 @@ -8,6 +8,10 @@ This documentation is in progress, but s Apache NiFi source code is version controlled using [Git][git] version control ([browse][gitbrowse]|[checkout][gitrepo]). +The code as it was initially contributed and entered the incubator is on the 'master' branch. + +To review changes as they occur while we work toward an initial release checkout the 'develop' branch. + ## Issue Tracking Track issues on the NIFI Project on the Apache Jira ([browse][jira]).
svn commit: r1645111 - /incubator/nifi/site/trunk/content/development/quickstart.md
Author: joewitt Date: Sat Dec 13 04:53:13 2014 New Revision: 1645111 URL: http://svn.apache.org/r1645111 Log: refined note about develop branch Modified: incubator/nifi/site/trunk/content/development/quickstart.md Modified: incubator/nifi/site/trunk/content/development/quickstart.md URL: http://svn.apache.org/viewvc/incubator/nifi/site/trunk/content/development/quickstart.md?rev=1645111r1=1645110r2=1645111view=diff == --- incubator/nifi/site/trunk/content/development/quickstart.md (original) +++ incubator/nifi/site/trunk/content/development/quickstart.md Sat Dec 13 04:53:13 2014 @@ -10,7 +10,7 @@ Apache NiFi source code is version contr The code as it was initially contributed and entered the incubator is on the 'master' branch. -To review changes as they occur while we work toward an initial release checkout the 'develop' branch. +To view the lastest codebase as we work toward an initial release checkout the 'develop' branch. ## Issue Tracking
svn commit: r1645342 - /incubator/nifi/site/trunk/content/downloads/index.md
Author: joewitt Date: Sat Dec 13 18:02:26 2014 New Revision: 1645342 URL: http://svn.apache.org/r1645342 Log: fixed link to getting started Modified: incubator/nifi/site/trunk/content/downloads/index.md Modified: incubator/nifi/site/trunk/content/downloads/index.md URL: http://svn.apache.org/viewvc/incubator/nifi/site/trunk/content/downloads/index.md?rev=1645342r1=1645341r2=1645342view=diff == --- incubator/nifi/site/trunk/content/downloads/index.md (original) +++ incubator/nifi/site/trunk/content/downloads/index.md Sat Dec 13 18:02:26 2014 @@ -6,4 +6,4 @@ We're a branch new ASF Incubator podling In the mean time you can download the source we're working on and build the application. More details [here][getting-started] -[getting-started]:https://github.com/apache/incubator-nifi +[getting-started]:http://nifi.incubator.apache.org/development/quickstart.html
[1/2] incubator-nifi git commit: Correctly inject MavenProject / MavenSession into nar-maven-plugin
Repository: incubator-nifi Updated Branches: refs/heads/develop bc9462514 - 9ccbf8be7 Correctly inject MavenProject / MavenSession into nar-maven-plugin Signed-off-by: joewitt joew...@apache.org Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/21c24b6b Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/21c24b6b Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/21c24b6b Branch: refs/heads/develop Commit: 21c24b6b68ffa4991bd9a15205adb2eb1a71e862 Parents: bc94625 Author: Karl-Heinz Marbaise i...@soebes.de Authored: Sat Dec 13 23:47:57 2014 +0100 Committer: joewitt joew...@apache.org Committed: Sat Dec 13 20:46:44 2014 -0500 -- misc/nar-maven-plugin/src/main/java/nifi/NarMojo.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/21c24b6b/misc/nar-maven-plugin/src/main/java/nifi/NarMojo.java -- diff --git a/misc/nar-maven-plugin/src/main/java/nifi/NarMojo.java b/misc/nar-maven-plugin/src/main/java/nifi/NarMojo.java index 263fe88..5196f73 100644 --- a/misc/nar-maven-plugin/src/main/java/nifi/NarMojo.java +++ b/misc/nar-maven-plugin/src/main/java/nifi/NarMojo.java @@ -86,10 +86,10 @@ public class NarMojo extends AbstractMojo { * POM * */ -@Parameter(property = project, readonly = true, required = true) +@Parameter(defaultValue = ${project}, readonly = true, required = true) protected MavenProject project; -@Parameter(property = session, readonly = true, required = true) +@Parameter(defaultValue = ${session}, readonly = true, required = true) protected MavenSession session; /**
[12/12] incubator-nifi git commit: NIFI-169 well it finally all builds. There is a classpath issue still to sort out which impacts startup
NIFI-169 well it finally all builds. There is a classpath issue still to sort out which impacts startup Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/19d4a150 Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/19d4a150 Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/19d4a150 Branch: refs/heads/NIFI-169 Commit: 19d4a150a875e0862d458e03ffb413797f2bf81b Parents: 9ccbf8b Author: joewitt joew...@apache.org Authored: Mon Dec 15 05:14:32 2014 -0500 Committer: joewitt joew...@apache.org Committed: Mon Dec 15 05:14:32 2014 -0500 -- assemblies/nifi/pom.xml | 490 -- .../nifi/src/main/assembly/dependencies.xml | 135 --- assembly/pom.xml| 446 + assembly/src/main/assembly/dependencies.xml | 135 +++ commons/core-flowfile-attributes/pom.xml| 5 +- commons/data-provenance-utils/pom.xml | 4 +- commons/flowfile-packager/pom.xml | 4 +- .../apache/nifi/util/FlowFilePackagerV1.java| 4 +- commons/naive-search-ring-buffer/pom.xml| 2 +- commons/nifi-expression-language/pom.xml| 5 +- commons/nifi-file-utils/pom.xml | 4 +- commons/nifi-logging-utils/pom.xml | 5 +- commons/nifi-parent/pom.xml | 217 - commons/nifi-properties/pom.xml | 6 +- commons/nifi-security-utils/pom.xml | 4 +- commons/nifi-socket-utils/pom.xml | 9 +- commons/nifi-stream-utils/pom.xml | 16 +- commons/nifi-utils/pom.xml | 3 +- commons/nifi-web-utils/pom.xml | 12 +- commons/pom.xml | 50 + commons/processor-utilities/pom.xml | 6 +- commons/remote-communications-utils/pom.xml | 2 +- commons/search-utils/pom.xml| 4 +- commons/wali/pom.xml| 9 +- extensions/file-authorization-provider/pom.xml | 90 -- .../FileAuthorizationProvider.java | 568 --- apache.nifi.authorization.AuthorityProvider | 15 - .../src/main/xsd/users.xsd | 64 -- .../FileAuthorizationProviderTest.java | 127 --- misc/nar-maven-plugin/pom.xml | 100 -- .../src/main/java/nifi/NarMojo.java | 610 .../resources/META-INF/plexus/components.xml| 52 - misc/pom.xml| 100 ++ misc/src/main/java/nifi/NarMojo.java| 610 .../resources/META-INF/plexus/components.xml| 52 + .../distributed-cache-client-service/pom.xml| 67 -- .../distributed/cache/client/CommsSession.java | 46 - .../DistributedMapCacheClientService.java | 301 -- .../DistributedSetCacheClientService.java | 212 .../cache/client/SSLCommsSession.java | 106 -- .../cache/client/StandardCommsSession.java | 124 --- ...org.apache.nifi.controller.ControllerService | 16 - .../index.html | 78 -- .../index.html | 0 .../distributed-cache-protocol/pom.xml | 39 - .../cache/protocol/ProtocolHandshake.java | 119 --- .../protocol/exception/HandshakeException.java | 27 - .../distributed-cache-server/pom.xml| 81 -- .../cache/server/AbstractCacheServer.java | 199 .../distributed/cache/server/CacheRecord.java | 57 -- .../distributed/cache/server/CacheServer.java | 26 - .../cache/server/DistributedCacheServer.java| 107 -- .../cache/server/DistributedSetCacheServer.java | 68 -- .../cache/server/EvictionPolicy.java| 73 -- .../cache/server/SetCacheServer.java| 104 -- .../server/map/DistributedMapCacheServer.java | 71 -- .../distributed/cache/server/map/MapCache.java | 29 - .../cache/server/map/MapCacheRecord.java| 58 -- .../cache/server/map/MapCacheServer.java| 145 --- .../cache/server/map/MapPutResult.java | 59 -- .../cache/server/map/PersistentMapCache.java| 210 .../cache/server/map/SimpleMapCache.java| 165 .../cache/server/set/PersistentSetCache.java| 194 .../distributed/cache/server/set/SetCache.java | 29 - .../cache/server/set/SetCacheRecord.java| 55 -- .../cache/server/set/SetCacheResult.java| 43 - .../cache/server/set/SimpleSetCache.java| 117 --- ...org.apache.nifi.controller.ControllerService | 16 - .../index.html | 82 -- .../cache/server/TestServerAndClient.java | 530 -- .../src/test/resources/localhost-ks.jks | Bin 1298 - 0 bytes .../src/test/resources/localhost-ts.jks | Bin 891 - 0 bytes
[09/12] incubator-nifi git commit: NIFI-169 well it finally all builds. There is a classpath issue still to sort out which impacts startup
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/distributed-cache-services-bundle/distributed-cache-protocol/src/main/java/org/apache/nifi/distributed/cache/protocol/exception/HandshakeException.java -- diff --git a/nar-bundles/distributed-cache-services-bundle/distributed-cache-protocol/src/main/java/org/apache/nifi/distributed/cache/protocol/exception/HandshakeException.java b/nar-bundles/distributed-cache-services-bundle/distributed-cache-protocol/src/main/java/org/apache/nifi/distributed/cache/protocol/exception/HandshakeException.java deleted file mode 100644 index 8049d42..000 --- a/nar-bundles/distributed-cache-services-bundle/distributed-cache-protocol/src/main/java/org/apache/nifi/distributed/cache/protocol/exception/HandshakeException.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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. - */ -package org.apache.nifi.distributed.cache.protocol.exception; - -public class HandshakeException extends Exception { -public HandshakeException(final String message) { -super(message); -} - -public HandshakeException(final Throwable cause) { -super(cause); -} -} http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/distributed-cache-services-bundle/distributed-cache-server/pom.xml -- diff --git a/nar-bundles/distributed-cache-services-bundle/distributed-cache-server/pom.xml b/nar-bundles/distributed-cache-services-bundle/distributed-cache-server/pom.xml deleted file mode 100644 index 5dec322..000 --- a/nar-bundles/distributed-cache-services-bundle/distributed-cache-server/pom.xml +++ /dev/null @@ -1,81 +0,0 @@ -project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd; -!-- - 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. --- - modelVersion4.0.0/modelVersion - - parent - groupIdorg.apache.nifi/groupId - artifactIddistributed-cache-services-bundle/artifactId - version0.0.1-SNAPSHOT/version - /parent - - artifactIddistributed-cache-server/artifactId - - nameDistributed Cache Server/name - descriptionProvides a Controller Service for hosting Distributed Caches/description - - dependencies - dependency - groupIdorg.apache.nifi/groupId - artifactIdnifi-api/artifactId - /dependency - dependency - groupIdorg.apache.nifi/groupId - artifactIddistributed-cache-protocol/artifactId - version${project.version}/version - /dependency - dependency - groupIdorg.apache.nifi/groupId - artifactIdremote-communications-utils/artifactId - /dependency - dependency - groupIdorg.apache.nifi/groupId - artifactIdnifi-processor-utils/artifactId - /dependency - dependency - groupIdorg.apache.nifi/groupId - artifactIdnifi-stream-utils/artifactId - /dependency - dependency -
[05/12] incubator-nifi git commit: NIFI-169 well it finally all builds. There is a classpath issue still to sort out which impacts startup
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/standard-services/distributed-cache-client-service-api/src/main/java/org/apache/nifi/distributed/cache/client/DistributedMapCacheClient.java -- diff --git a/nar-bundles/standard-services/distributed-cache-client-service-api/src/main/java/org/apache/nifi/distributed/cache/client/DistributedMapCacheClient.java b/nar-bundles/standard-services/distributed-cache-client-service-api/src/main/java/org/apache/nifi/distributed/cache/client/DistributedMapCacheClient.java new file mode 100644 index 000..5bead8c --- /dev/null +++ b/nar-bundles/standard-services/distributed-cache-client-service-api/src/main/java/org/apache/nifi/distributed/cache/client/DistributedMapCacheClient.java @@ -0,0 +1,114 @@ +/* + * 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. + */ +package org.apache.nifi.distributed.cache.client; + +import java.io.IOException; + +import org.apache.nifi.controller.ControllerService; + +/** + * This interface defines an API that can be used for interacting with a + * Distributed Cache that functions similarly to a {@link java.util.Map Map}. + * + */ +public interface DistributedMapCacheClient extends ControllerService { + +/** + * Adds the specified key and value to the cache, if they are not already + * present, serializing the key and value with the given + * {@link Serializer}s. + * + * @param K + * @param V + * @param key the key for into the map + * @param value the value to add to the map if and only if the key is absent + * @param keySerializer + * @param valueSerializer + * @return true if the value was added to the cache, false if the value + * already existed in the cache + * + * @throws IOException if unable to communicate with the remote instance + */ +K, V boolean putIfAbsent(K key, V value, SerializerK keySerializer, SerializerV valueSerializer) throws IOException; + +/** + * Adds the specified key and value to the cache, if they are not already + * present, serializing the key and value with the given + * {@link Serializer}s. If a value already exists in the cache for the given + * key, the value associated with the key is returned, after being + * deserialized with the given valueDeserializer. + * + * @param K + * @param V + * @param key + * @param value + * @param keySerializer + * @param valueSerializer + * @param valueDeserializer + * @return + * @throws IOException + */ +K, V V getAndPutIfAbsent(K key, V value, SerializerK keySerializer, SerializerV valueSerializer, DeserializerV valueDeserializer) throws IOException; + +/** + * Determines if the given value is present in the cache and if so returns + * codetrue/code, else returns codefalse/code + * + * @param K + * @param key + * @param keySerializer + * @return + * + * @throws IOException if unable to communicate with the remote instance + */ +K boolean containsKey(K key, SerializerK keySerializer) throws IOException; + +/** + * Returns the value in the cache for the given key, if one exists; + * otherwise returns codenull/code + * + * @param K + * @param V + * @param key the key to lookup in the map + * @param keySerializer + * @param valueDeserializer + * + * @return + * @throws IOException + */ +K, V V get(K key, SerializerK keySerializer, DeserializerV valueDeserializer) throws IOException; + +/** + * Attempts to notify the server that we are finished communicating with it + * and cleans up resources + * @throws java.io.IOException + */ +void close() throws IOException; + +/** + * Removes the entry with the given key from the cache, if it is present. + * + * @param K + * @param key + * @param serializer + * @return codetrue/code if the entry is removed, codefalse/code if + * the key did not exist in the cache + * @throws IOException + */ +K boolean remove(K key, SerializerK serializer) throws IOException; + +}
[10/12] incubator-nifi git commit: NIFI-169 well it finally all builds. There is a classpath issue still to sort out which impacts startup
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/misc/nar-maven-plugin/src/main/resources/META-INF/plexus/components.xml -- diff --git a/misc/nar-maven-plugin/src/main/resources/META-INF/plexus/components.xml b/misc/nar-maven-plugin/src/main/resources/META-INF/plexus/components.xml deleted file mode 100644 index 0680d18..000 --- a/misc/nar-maven-plugin/src/main/resources/META-INF/plexus/components.xml +++ /dev/null @@ -1,52 +0,0 @@ -?xml version=1.0? -!-- - 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. --- -component-set -components -component -roleorg.apache.maven.lifecycle.mapping.LifecycleMapping/role -role-hintnar/role-hint - implementationorg.apache.maven.lifecycle.mapping.DefaultLifecycleMapping/implementation -configuration -lifecycles -lifecycle -iddefault/id -phases - process-resourcesorg.apache.maven.plugins:maven-resources-plugin:resources/process-resources - compileorg.apache.maven.plugins:maven-compiler-plugin:compile/compile - process-test-resourcesorg.apache.maven.plugins:maven-resources-plugin:testResources/process-test-resources - test-compileorg.apache.maven.plugins:maven-compiler-plugin:testCompile/test-compile - testorg.apache.maven.plugins:maven-surefire-plugin:test/test - packageorg.apache.nifi:nar-maven-plugin:nar/package - installorg.apache.maven.plugins:maven-install-plugin:install/install - deployorg.apache.maven.plugins:maven-deploy-plugin:deploy/deploy -/phases -/lifecycle -/lifecycles -/configuration -/component -component -roleorg.apache.maven.artifact.handler.ArtifactHandler/role -role-hintnar/role-hint - implementationorg.apache.maven.artifact.handler.DefaultArtifactHandler/implementation -configuration -typenar/type -languagejava/language -addedToClasspathfalse/addedToClasspath -includesDependenciestrue/includesDependencies -/configuration -/component -/components -/component-set http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/misc/pom.xml -- diff --git a/misc/pom.xml b/misc/pom.xml new file mode 100644 index 000..5c7ca7f --- /dev/null +++ b/misc/pom.xml @@ -0,0 +1,100 @@ +?xml version=1.0? +!-- + 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. +-- +project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd; +modelVersion4.0.0/modelVersion +groupIdorg.apache.nifi/groupId +artifactIdnar-maven-plugin/artifactId +version0.0.1-SNAPSHOT/version +packagingmaven-plugin/packaging +nameApache NiFi NAR Plugin/name +properties +project.build.sourceEncodingUTF-8/project.build.sourceEncoding +/properties +build +defaultGoalinstall/defaultGoal +plugins +plugin +
[01/12] incubator-nifi git commit: NIFI-169 well it finally all builds. There is a classpath issue still to sort out which impacts startup
Repository: incubator-nifi Updated Branches: refs/heads/NIFI-169 [created] 19d4a150a http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/pom.xml -- diff --git a/pom.xml b/pom.xml new file mode 100644 index 000..8747bc4 --- /dev/null +++ b/pom.xml @@ -0,0 +1,966 @@ +?xml version=1.0 encoding=UTF-8? +!-- + 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. +-- +project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; +modelVersion4.0.0/modelVersion +parent +groupIdorg.apache/groupId +artifactIdapache/artifactId +version16/version +/parent +groupIdorg.apache.nifi/groupId +artifactIdnifi-parent/artifactId +version0.0.1-SNAPSHOT/version +packagingpom/packaging +nameApache NiFi (incubating) Parent/name +descriptionApache NiFi is a dataflow system based on the concepts of flow-based programming. It is currently a part of the Apache Incubator./description +urlhttp://nifi.incubator.apache.org/maven-site//url +organization +nameApache NiFi (incubating) Project/name +urlhttp://nifi.incubating.apache.org//url +/organization +licenses +license +nameApache License, Version 2.0/name +urlhttp://www.apache.org/licenses/LICENSE-2.0/url +/license +/licenses +mailingLists +mailingList +nameDev/name +subscribedev-subscr...@nifi.incubator.apache.org/subscribe + unsubscribedev-unsubscr...@nifi.incubator.apache.org/unsubscribe +postd...@nifi.incubator.apache.org/post + archivehttp://mail-archives.apache.org/mod_mbox/incubator-nifi-dev/archive +/mailingList +mailingList +nameCommits/name +subscribecommits-subscr...@nifi.incubator.apache.org/subscribe + unsubscribecommits-unsubscr...@nifi.incubator.apache.org/unsubscribe +postcommits@nifi.incubator.apache.org/post + archivehttp://mail-archives.apache.org/mod_mbox/incubator-nifi-commits/archive +/mailingList +/mailingLists +prerequisites +maven${maven.min-version}/maven +/prerequisites +modules +modulecommons/module +!-- +! Would prefer to have the nar-maven-plugin built as part of this parent. However, Maven +! blocks building plugins with extensions in the same reactor as other components which want to use the plugin. +! See MNG-1911 and MNG-5572 for more details. +-- +!--modulenar-maven-plugin/module-- +modulenifi-api/module +modulenifi-bootstrap/module +modulenifi-mock/module +modulenar-bundles/module +moduleassembly/module +/modules +scm + connectionscm:git:git://git.apache.org/incubator-nifi.git/connection + developerConnectionscm:git:https://git-wip-us.apache.org/repos/asf/incubator-nifi.git/developerConnection +urlhttps://git-wip-us.apache.org/repos/asf?p=incubator-nifi.git/url +/scm +issueManagement +systemJIRA/system +urlhttps://issues.apache.org/jira/browse/NIFI/url +/issueManagement +properties +project.build.sourceEncodingUTF-8/project.build.sourceEncoding + project.reporting.outputEncodingUTF-8/project.reporting.outputEncoding +org.slf4j.version1.7.8/org.slf4j.version +jetty.version9.2.5.v20141112/jetty.version +lucene.version4.10.2/lucene.version +spring.version4.1.2.RELEASE/spring.version +spring.security.version3.2.5.RELEASE/spring.security.version +jersey.version1.18.3/jersey.version +/properties +dependencyManagement +dependencies +dependency +groupIdch.qos.logback/groupId +artifactIdlogback-classic/artifactId +version1.1.2/version +/dependency +dependency +groupIdch.qos.logback/groupId +artifactIdjcl-over-slf4j/artifactId +
[03/12] incubator-nifi git commit: NIFI-169 well it finally all builds. There is a classpath issue still to sort out which impacts startup
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-server/src/test/java/org/apache/nifi/distributed/cache/server/TestServerAndClient.java -- diff --git a/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-server/src/test/java/org/apache/nifi/distributed/cache/server/TestServerAndClient.java b/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-server/src/test/java/org/apache/nifi/distributed/cache/server/TestServerAndClient.java new file mode 100644 index 000..b5f3fd6 --- /dev/null +++ b/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-server/src/test/java/org/apache/nifi/distributed/cache/server/TestServerAndClient.java @@ -0,0 +1,530 @@ +/* + * 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. + */ +package org.apache.nifi.distributed.cache.server; + +import org.apache.nifi.distributed.cache.server.DistributedSetCacheServer; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.ConnectException; +import java.nio.charset.StandardCharsets; +import java.util.HashMap; +import java.util.Map; + +import org.apache.nifi.components.PropertyDescriptor; +import org.apache.nifi.distributed.cache.client.Deserializer; +import org.apache.nifi.distributed.cache.client.DistributedMapCacheClientService; +import org.apache.nifi.distributed.cache.client.DistributedSetCacheClientService; +import org.apache.nifi.distributed.cache.client.Serializer; +import org.apache.nifi.distributed.cache.client.exception.DeserializationException; +import org.apache.nifi.distributed.cache.server.map.DistributedMapCacheServer; +import org.apache.nifi.reporting.InitializationException; +import org.apache.nifi.ssl.SSLContextService.ClientAuth; +import org.apache.nifi.ssl.StandardSSLContextService; +import org.apache.nifi.util.MockConfigurationContext; +import org.apache.nifi.util.MockControllerServiceInitializationContext; + +import org.apache.commons.lang3.SerializationException; +import org.junit.Ignore; +import org.junit.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class TestServerAndClient { + +private static Logger LOGGER; + +static { +System.setProperty(org.slf4j.simpleLogger.defaultLogLevel, info); +System.setProperty(org.slf4j.simpleLogger.showDateTime, true); + System.setProperty(org.slf4j.simpleLogger.log.nifi.distributed.cache.server.AbstractCacheServer, debug); + System.setProperty(org.slf4j.simpleLogger.log.nifi.distributed.cache.client.DistributedMapCacheClientService, debug); + System.setProperty(org.slf4j.simpleLogger.log.nifi.distributed.cache.server.TestServerAndClient, debug); + System.setProperty(org.slf4j.simpleLogger.log.nifi.remote.io.socket.ssl.SSLSocketChannel, trace); +LOGGER = LoggerFactory.getLogger(TestServerAndClient.class); +} + +@Test +public void testNonPersistentSetServerAndClient() throws InitializationException, IOException { +LOGGER.info(Testing + Thread.currentThread().getStackTrace()[1].getMethodName()); +// Create server +final DistributedSetCacheServer server = new DistributedSetCacheServer(); +MockControllerServiceInitializationContext serverInitContext = new MockControllerServiceInitializationContext(server, server); +server.initialize(serverInitContext); + +final MapPropertyDescriptor, String serverProperties = new HashMap(); +final MockConfigurationContext serverContext = new MockConfigurationContext(serverProperties, serverInitContext.getControllerServiceLookup()); +server.startServer(serverContext); + +final DistributedSetCacheClientService client = createClient(); +final SerializerString serializer = new StringSerializer(); +final boolean added = client.addIfAbsent(test,
[07/12] incubator-nifi git commit: NIFI-169 well it finally all builds. There is a classpath issue still to sort out which impacts startup
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/framework-bundle/framework/web/nifi-jetty/pom.xml -- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-jetty/pom.xml b/nar-bundles/framework-bundle/framework/web/nifi-jetty/pom.xml index bde025b..3cdeb07 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-jetty/pom.xml +++ b/nar-bundles/framework-bundle/framework/web/nifi-jetty/pom.xml @@ -28,86 +28,107 @@ dependency groupIdorg.apache.nifi/groupId artifactIdnifi-api/artifactId +scopecompile/scope /dependency dependency groupIdorg.apache.nifi/groupId artifactIdnifi-runtime/artifactId +scopecompile/scope /dependency dependency groupIdorg.apache.nifi/groupId artifactIdnifi-nar/artifactId +scopecompile/scope /dependency dependency groupIdorg.apache.nifi/groupId artifactIdnifi-security/artifactId +scopecompile/scope /dependency dependency groupIdorg.eclipse.jetty/groupId artifactIdjetty-server/artifactId +scopecompile/scope /dependency dependency groupIdorg.eclipse.jetty/groupId artifactIdjetty-servlet/artifactId +scopecompile/scope /dependency dependency groupIdorg.eclipse.jetty/groupId artifactIdjetty-webapp/artifactId +scopecompile/scope /dependency dependency groupIdorg.eclipse.jetty/groupId artifactIdjetty-servlets/artifactId +scopecompile/scope /dependency dependency groupIdorg.eclipse.jetty/groupId artifactIdjetty-jsp/artifactId +scopecompile/scope /dependency dependency groupIdcom.sun.jersey/groupId artifactIdjersey-client/artifactId +scopecompile/scope /dependency dependency groupIdcom.sun.jersey.contribs/groupId artifactIdjersey-spring/artifactId +scopecompile/scope /dependency dependency groupIdcom.sun.jersey.contribs/groupId artifactIdjersey-multipart/artifactId +scopecompile/scope /dependency dependency groupIdcom.sun.jersey/groupId artifactIdjersey-server/artifactId +scopecompile/scope /dependency dependency groupIdcom.sun.jersey/groupId artifactIdjersey-json/artifactId +scopecompile/scope /dependency dependency groupIdorg.aspectj/groupId artifactIdaspectjweaver/artifactId +scopecompile/scope /dependency dependency groupIdcglib/groupId artifactIdcglib-nodep/artifactId +scopecompile/scope /dependency dependency groupIdorg.apache.nifi/groupId artifactIdclient-dto/artifactId +scopecompile/scope /dependency dependency groupIdorg.apache.nifi/groupId artifactIdcustom-ui-utilities/artifactId +scopecompile/scope /dependency dependency groupIdorg.apache.nifi/groupId artifactIdweb-security/artifactId +scopecompile/scope /dependency dependency groupIdorg.apache.nifi/groupId artifactIdnifi-web-utils/artifactId +scopecompile/scope /dependency dependency groupIdorg.apache.nifi/groupId artifactIdweb-optimistic-locking/artifactId +scopecompile/scope /dependency dependency groupIdorg.apache.nifi/groupId @@ -132,6 +153,7 @@ dependency groupIdorg.apache.nifi/groupId artifactIdframework-cluster/artifactId +scopecompile/scope /dependency /dependencies /project http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/framework-bundle/framework/web/nifi-web-api/pom.xml -- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-api/pom.xml b/nar-bundles/framework-bundle/framework/web/nifi-web-api/pom.xml index f4ec6b1..e7cb0e7 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-api/pom.xml +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-api/pom.xml @@ -115,6 +115,7 @@ dependency groupIdorg.apache.nifi/groupId artifactIdclient-dto/artifactId +version${project.version}/version
[04/12] incubator-nifi git commit: NIFI-169 well it finally all builds. There is a classpath issue still to sort out which impacts startup
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-server/src/main/java/org/apache/nifi/distributed/cache/server/CacheServer.java -- diff --git a/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-server/src/main/java/org/apache/nifi/distributed/cache/server/CacheServer.java b/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-server/src/main/java/org/apache/nifi/distributed/cache/server/CacheServer.java new file mode 100644 index 000..2c85cd8 --- /dev/null +++ b/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-server/src/main/java/org/apache/nifi/distributed/cache/server/CacheServer.java @@ -0,0 +1,26 @@ +/* + * 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. + */ +package org.apache.nifi.distributed.cache.server; + +import java.io.IOException; + +public interface CacheServer { + +void start() throws IOException; +void stop() throws IOException; + +} http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-server/src/main/java/org/apache/nifi/distributed/cache/server/DistributedCacheServer.java -- diff --git a/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-server/src/main/java/org/apache/nifi/distributed/cache/server/DistributedCacheServer.java b/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-server/src/main/java/org/apache/nifi/distributed/cache/server/DistributedCacheServer.java new file mode 100644 index 000..0f962d0 --- /dev/null +++ b/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-server/src/main/java/org/apache/nifi/distributed/cache/server/DistributedCacheServer.java @@ -0,0 +1,107 @@ +/* + * 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. + */ +package org.apache.nifi.distributed.cache.server; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import org.apache.nifi.components.PropertyDescriptor; +import org.apache.nifi.controller.AbstractControllerService; +import org.apache.nifi.controller.ConfigurationContext; +import org.apache.nifi.controller.annotation.OnConfigured; +import org.apache.nifi.processor.annotation.OnShutdown; +import org.apache.nifi.processor.util.StandardValidators; +import org.apache.nifi.ssl.SSLContextService; + +public abstract class DistributedCacheServer extends AbstractControllerService { +public static final String EVICTION_STRATEGY_LFU = Least Frequently Used; +public static final String EVICTION_STRATEGY_LRU = Least Recently Used; +public static final String EVICTION_STRATEGY_FIFO = First In, First Out; + +public static final PropertyDescriptor PORT = new PropertyDescriptor.Builder() +.name(Port) +.description(The port to listen on for incoming connections) +.required(true) +.addValidator(StandardValidators.PORT_VALIDATOR) +.defaultValue(4557) +.build(); +public static final PropertyDescriptor SSL_CONTEXT_SERVICE = new PropertyDescriptor.Builder() +.name(SSL Context Service) +.description( +
[1/2] incubator-nifi git commit: Fixed classpath issue affecting startup
Repository: incubator-nifi Updated Branches: refs/heads/NIFI-169 19d4a150a - 675ea6611 Fixed classpath issue affecting startup Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/dd57a335 Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/dd57a335 Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/dd57a335 Branch: refs/heads/NIFI-169 Commit: dd57a33500101756d0cf601e1d3d655e6a127033 Parents: 19d4a15 Author: joewitt joew...@apache.org Authored: Mon Dec 15 05:52:40 2014 -0500 Committer: joewitt joew...@apache.org Committed: Mon Dec 15 05:52:40 2014 -0500 -- misc/build-order.sh | 81 --- misc/pom.xml| 100 --- misc/src/main/java/nifi/NarMojo.java| 610 --- .../resources/META-INF/plexus/components.xml| 52 -- 4 files changed, 843 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/dd57a335/misc/build-order.sh -- diff --git a/misc/build-order.sh b/misc/build-order.sh deleted file mode 100755 index e8f8e5e..000 --- a/misc/build-order.sh +++ /dev/null @@ -1,81 +0,0 @@ -#MAVEN_FLAGS=-Dmaven.test.skip=true -MAVEN_FLAGS= - -cd misc/nar-maven-plugin \ -mvn $MAVEN_FLAGS install \ -cd ../../commons/nifi-parent \ -mvn $MAVEN_FLAGS install \ -cd ../../nifi-bootstrap \ -mvn $MAVEN_FLAGS install \ -cd ../nifi-api \ -mvn $MAVEN_FLAGS install \ -cd ../commons/ \ -cd nifi-stream-utils \ -mvn $MAVEN_FLAGS install \ -cd ../wali \ -mvn $MAVEN_FLAGS install \ -cd ../flowfile-packager \ -mvn $MAVEN_FLAGS install \ -cd ../core-flowfile-attributes \ -mvn $MAVEN_FLAGS install \ -cd ../data-provenance-utils \ -mvn $MAVEN_FLAGS install \ -cd ../naive-search-ring-buffer \ -mvn $MAVEN_FLAGS install \ -cd ../nifi-expression-language \ -mvn $MAVEN_FLAGS install \ -cd ../nifi-file-utils \ -mvn $MAVEN_FLAGS install \ -cd ../nifi-logging-utils \ -mvn $MAVEN_FLAGS install \ -cd ../nifi-properties \ -mvn $MAVEN_FLAGS install \ -cd ../nifi-security-utils \ -mvn $MAVEN_FLAGS install \ -cd ../nifi-utils \ -mvn $MAVEN_FLAGS install \ -cd ../nifi-socket-utils \ -mvn $MAVEN_FLAGS install \ -cd ../nifi-web-utils \ -mvn $MAVEN_FLAGS install \ -cd ../processor-utilities \ -mvn $MAVEN_FLAGS install \ -cd ../remote-communications-utils \ -mvn $MAVEN_FLAGS install \ -cd ../search-utils \ -mvn $MAVEN_FLAGS install \ -cd ../../extensions/file-authorization-provider \ -mvn $MAVEN_FLAGS install \ -cd ../../nifi-mock \ -mvn $MAVEN_FLAGS install \ -cd ../nar-bundles/ \ -cd nar-container-common \ -mvn $MAVEN_FLAGS install \ -cd ../jetty-bundle \ -mvn $MAVEN_FLAGS install \ -cd ../standard-services-api-bundle \ -mvn $MAVEN_FLAGS install \ -cd ../ssl-context-bundle \ -mvn $MAVEN_FLAGS install \ -cd ../distributed-cache-services-bundle \ -mvn $MAVEN_FLAGS install \ -cd ../standard-bundle \ -mvn $MAVEN_FLAGS install \ -cd ../hadoop-libraries-bundle \ -mvn $MAVEN_FLAGS install \ -cd ../hadoop-bundle \ -mvn $MAVEN_FLAGS install \ -cd ../volatile-provenance-repository-bundle \ -mvn $MAVEN_FLAGS install \ -cd ../persistent-provenance-repository-bundle \ -mvn $MAVEN_FLAGS install \ -cd ../framework-bundle \ -mvn $MAVEN_FLAGS install \ -cd ../execute-script-bundle \ -mvn $MAVEN_FLAGS install \ -cd ../monitor-threshold-bundle \ -mvn $MAVEN_FLAGS install \ -cd ../update-attribute-bundle \ -mvn $MAVEN_FLAGS install \ -cd ../../assemblies/nifi -mvn assembly:assembly http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/dd57a335/misc/pom.xml -- diff --git a/misc/pom.xml b/misc/pom.xml deleted file mode 100644 index 5c7ca7f..000 --- a/misc/pom.xml +++ /dev/null @@ -1,100 +0,0 @@ -?xml version=1.0? -!-- - 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
[1/9] incubator-nifi git commit: NIFI-56: Made test single-threaded
Repository: incubator-nifi Updated Branches: refs/heads/NIFI-169 614349bdf - 8fb78d2a5 NIFI-56: Made test single-threaded Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/73cc6cbe Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/73cc6cbe Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/73cc6cbe Branch: refs/heads/NIFI-169 Commit: 73cc6cbe284faab9a91b4816197a105524b1df41 Parents: 9ccbf8b Author: Mark Payne marka...@hotmail.com Authored: Mon Dec 15 13:09:08 2014 -0500 Committer: Mark Payne marka...@hotmail.com Committed: Mon Dec 15 13:09:08 2014 -0500 -- .../java/org/apache/nifi/processors/standard/TestScanContent.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/73cc6cbe/nar-bundles/standard-bundle/standard-processors/src/test/java/org/apache/nifi/processors/standard/TestScanContent.java -- diff --git a/nar-bundles/standard-bundle/standard-processors/src/test/java/org/apache/nifi/processors/standard/TestScanContent.java b/nar-bundles/standard-bundle/standard-processors/src/test/java/org/apache/nifi/processors/standard/TestScanContent.java index 499fb3e..9079f82 100644 --- a/nar-bundles/standard-bundle/standard-processors/src/test/java/org/apache/nifi/processors/standard/TestScanContent.java +++ b/nar-bundles/standard-bundle/standard-processors/src/test/java/org/apache/nifi/processors/standard/TestScanContent.java @@ -55,7 +55,7 @@ public class TestScanContent { Files.write(dictionaryPath, termBytes, StandardOpenOption.CREATE, StandardOpenOption.WRITE); final TestRunner runner = TestRunners.newTestRunner(new ScanContent()); -runner.setThreadCount(3); +runner.setThreadCount(1); runner.setProperty(ScanContent.DICTIONARY, dictionaryPath.toString()); runner.setProperty(ScanContent.DICTIONARY_ENCODING, ScanContent.BINARY_ENCODING);
[3/9] incubator-nifi git commit: NIFI-49: include name of default value if it is not allowed in a property descriptor
NIFI-49: include name of default value if it is not allowed in a property descriptor Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/f0bea5c1 Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/f0bea5c1 Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/f0bea5c1 Branch: refs/heads/NIFI-169 Commit: f0bea5c156fa0bfc1d7773ae45ea73ba594ba77a Parents: e04a55d Author: Mark Payne marka...@hotmail.com Authored: Mon Dec 15 13:21:59 2014 -0500 Committer: Mark Payne marka...@hotmail.com Committed: Mon Dec 15 13:21:59 2014 -0500 -- .../main/java/org/apache/nifi/components/PropertyDescriptor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/f0bea5c1/nifi-api/src/main/java/org/apache/nifi/components/PropertyDescriptor.java -- diff --git a/nifi-api/src/main/java/org/apache/nifi/components/PropertyDescriptor.java b/nifi-api/src/main/java/org/apache/nifi/components/PropertyDescriptor.java index c95d449..19600ab 100644 --- a/nifi-api/src/main/java/org/apache/nifi/components/PropertyDescriptor.java +++ b/nifi-api/src/main/java/org/apache/nifi/components/PropertyDescriptor.java @@ -425,7 +425,7 @@ public final class PropertyDescriptor implements ComparablePropertyDescriptor throw new IllegalStateException(Must specify a name); } if (!isValueAllowed(defaultValue)) { -throw new IllegalStateException(Default value is not in the set of allowable values); +throw new IllegalStateException(Default value ' + defaultValue + ' is not in the set of allowable values); } return new PropertyDescriptor(this);
[5/9] incubator-nifi git commit: NIFI-49: Included patch from Philip Young to include name of default vlaue when not allowed as a property descriptor value
NIFI-49: Included patch from Philip Young to include name of default vlaue when not allowed as a property descriptor value Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/ddfa621d Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/ddfa621d Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/ddfa621d Branch: refs/heads/NIFI-169 Commit: ddfa621dab4f6614e426314e0685106586e08c9f Parents: 1316042 f0bea5c Author: Mark Payne marka...@hotmail.com Authored: Mon Dec 15 13:29:35 2014 -0500 Committer: Mark Payne marka...@hotmail.com Committed: Mon Dec 15 13:29:35 2014 -0500 -- --
[2/9] incubator-nifi git commit: NIFI-43: Do not throw InvocationTargetException if it is wrapping a RuntimeException; instead just throw the RuntimeException
NIFI-43: Do not throw InvocationTargetException if it is wrapping a RuntimeException; instead just throw the RuntimeException Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/e04a55d3 Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/e04a55d3 Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/e04a55d3 Branch: refs/heads/NIFI-169 Commit: e04a55d3a5097d1ae3ff5c5a4c8f8ad1e1dc56b9 Parents: 73cc6cb Author: Mark Payne marka...@hotmail.com Authored: Mon Dec 15 13:14:42 2014 -0500 Committer: Mark Payne marka...@hotmail.com Committed: Mon Dec 15 13:14:42 2014 -0500 -- .../org/apache/nifi/util/ReflectionUtils.java | 72 +++- 1 file changed, 40 insertions(+), 32 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e04a55d3/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/util/ReflectionUtils.java -- diff --git a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/util/ReflectionUtils.java b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/util/ReflectionUtils.java index 9d52eb3..e15e00a 100644 --- a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/util/ReflectionUtils.java +++ b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/util/ReflectionUtils.java @@ -42,43 +42,51 @@ public class ReflectionUtils { * @throws IllegalAccessException */ public static void invokeMethodsWithAnnotation(final Class? extends Annotation annotation, final Object instance, final Object... args) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException { -for (final Method method : instance.getClass().getMethods()) { -if (method.isAnnotationPresent(annotation)) { -final boolean isAccessible = method.isAccessible(); -method.setAccessible(true); - -try { -final Class?[] argumentTypes = method.getParameterTypes(); -if (argumentTypes.length args.length) { -throw new IllegalArgumentException(String.format(Unable to invoke method %1$s on %2$s because method expects %3$s parameters but only %4$s were given, -method.getName(), instance, argumentTypes.length, args.length)); -} - -for (int i = 0; i argumentTypes.length; i++) { -final Class? argType = argumentTypes[i]; -if (!argType.isAssignableFrom(args[i].getClass())) { -throw new IllegalArgumentException(String.format( -Unable to invoke method %1$s on %2$s because method parameter %3$s is expected to be of type %4$s but argument passed was of type %5$s, -method.getName(), instance, i, argType, args[i].getClass())); +try { +for (final Method method : instance.getClass().getMethods()) { +if (method.isAnnotationPresent(annotation)) { +final boolean isAccessible = method.isAccessible(); +method.setAccessible(true); + +try { +final Class?[] argumentTypes = method.getParameterTypes(); +if (argumentTypes.length args.length) { +throw new IllegalArgumentException(String.format(Unable to invoke method %1$s on %2$s because method expects %3$s parameters but only %4$s were given, +method.getName(), instance, argumentTypes.length, args.length)); } -} - -if (argumentTypes.length == args.length) { -method.invoke(instance, args); -} else { -final Object[] argsToPass = new Object[argumentTypes.length]; -for (int i = 0; i argsToPass.length; i++) { -argsToPass[i] = args[i]; + +for (int i = 0; i argumentTypes.length; i++) { +final Class? argType = argumentTypes[i]; +if (!argType.isAssignableFrom(args[i].getClass())) { +throw new IllegalArgumentException(String.format( +Unable to invoke method %1$s on %2$s because method parameter %3$s is expected to be of type %4$s but argument passed was of type %5$s, +method.getName(), instance, i,
[7/9] incubator-nifi git commit: NIFI-35: Provide an EventReporter to the FlowFileSwapManager and provide events for any errors
NIFI-35: Provide an EventReporter to the FlowFileSwapManager and provide events for any errors Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/1cc3ce57 Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/1cc3ce57 Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/1cc3ce57 Branch: refs/heads/NIFI-169 Commit: 1cc3ce57556eb7cf9a5f94b269eb24b284e518eb Parents: 9e60aa0 Author: Mark Payne marka...@hotmail.com Authored: Mon Dec 15 14:28:11 2014 -0500 Committer: Mark Payne marka...@hotmail.com Committed: Mon Dec 15 14:28:11 2014 -0500 -- .../nifi/controller/FileSystemSwapManager.java | 33 +++- .../apache/nifi/controller/FlowController.java | 20 +++- .../repository/FlowFileSwapManager.java | 5 ++- 3 files changed, 41 insertions(+), 17 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/1cc3ce57/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/FileSystemSwapManager.java -- diff --git a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/FileSystemSwapManager.java b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/FileSystemSwapManager.java index 3af2098..ad95f8e 100644 --- a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/FileSystemSwapManager.java +++ b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/FileSystemSwapManager.java @@ -61,11 +61,12 @@ import org.apache.nifi.controller.repository.StandardFlowFileRecord; import org.apache.nifi.controller.repository.claim.ContentClaim; import org.apache.nifi.controller.repository.claim.ContentClaimManager; import org.apache.nifi.engine.FlowEngine; +import org.apache.nifi.events.EventReporter; import org.apache.nifi.io.BufferedOutputStream; import org.apache.nifi.processor.QueueSize; +import org.apache.nifi.reporting.Severity; import org.apache.nifi.util.FormatUtils; import org.apache.nifi.util.NiFiProperties; - import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -80,10 +81,12 @@ public class FileSystemSwapManager implements FlowFileSwapManager { public static final int MINIMUM_SWAP_COUNT = 1; private static final Pattern SWAP_FILE_PATTERN = Pattern.compile(\\d+-.+\\.swap); public static final int SWAP_ENCODING_VERSION = 6; +public static final String EVENT_CATEGORY = Swap FlowFiles; private final ScheduledExecutorService swapQueueIdentifierExecutor; private final ScheduledExecutorService swapInExecutor; private volatile FlowFileRepository flowFileRepository; +private volatile EventReporter eventReporter; // Maintains a mapping of FlowFile Queue to the a QueueLockWrapper, which provides queue locking and necessary state for swapping back in private final ConcurrentMapFlowFileQueue, QueueLockWrapper swapMap = new ConcurrentHashMap(); @@ -129,9 +132,10 @@ public class FileSystemSwapManager implements FlowFileSwapManager { } } -public synchronized void start(final FlowFileRepository flowFileRepository, final QueueProvider connectionProvider, final ContentClaimManager claimManager) { +public synchronized void start(final FlowFileRepository flowFileRepository, final QueueProvider connectionProvider, final ContentClaimManager claimManager, final EventReporter eventReporter) { this.claimManager = claimManager; this.flowFileRepository = flowFileRepository; +this.eventReporter = eventReporter; swapQueueIdentifierExecutor.scheduleWithFixedDelay(new QueueIdentifier(connectionProvider), swapOutMillis, swapOutMillis, TimeUnit.MILLISECONDS); swapInExecutor.scheduleWithFixedDelay(new SwapInTask(), swapInMillis, swapInMillis, TimeUnit.MILLISECONDS); } @@ -437,10 +441,15 @@ public class FileSystemSwapManager implements FlowFileSwapManager { } if (!swapFile.delete()) { -logger.warn(Swapped in FlowFiles from file + swapFile.getAbsolutePath() + but failed to delete the file; this file can be cleaned up manually); +final String errMsg = Swapped in FlowFiles from file + swapFile.getAbsolutePath() + but failed to delete the file; this file should be cleaned up manually; +logger.warn(errMsg); + eventReporter.reportEvent(Severity.WARNING, EVENT_CATEGORY, errMsg); } } catch (final Exception e) { -
[8/9] incubator-nifi git commit: Merge branch 'develop' into NIFI-169
Merge branch 'develop' into NIFI-169 Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/3a4c6ed8 Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/3a4c6ed8 Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/3a4c6ed8 Branch: refs/heads/NIFI-169 Commit: 3a4c6ed887cd2e13aa861ed99028de33678bcbe8 Parents: 614349b 1cc3ce5 Author: joewitt joew...@apache.org Authored: Tue Dec 16 08:16:52 2014 -0500 Committer: joewitt joew...@apache.org Committed: Tue Dec 16 08:16:52 2014 -0500 -- .../nifi/controller/FileSystemSwapManager.java | 33 ++--- .../apache/nifi/controller/FlowController.java | 20 +++--- .../org/apache/nifi/util/ReflectionUtils.java | 72 +++- .../processors/standard/TestScanContent.java| 2 +- .../nifi/components/PropertyDescriptor.java | 2 +- .../repository/FlowFileSwapManager.java | 5 +- .../nifi/components/TestPropertyDescriptor.java | 59 7 files changed, 142 insertions(+), 51 deletions(-) --
incubator-nifi git commit: NIFI-173 fixed web war finding
Repository: incubator-nifi Updated Branches: refs/heads/NIFI-169 8fb78d2a5 - d9dab0061 NIFI-173 fixed web war finding Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/d9dab006 Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/d9dab006 Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/d9dab006 Branch: refs/heads/NIFI-169 Commit: d9dab00612521ba5dd49d8b78c6593b082834c3f Parents: 8fb78d2 Author: joewitt joew...@apache.org Authored: Tue Dec 16 11:46:37 2014 -0500 Committer: joewitt joew...@apache.org Committed: Tue Dec 16 11:46:37 2014 -0500 -- .../src/main/java/org/apache/nifi/web/server/JettyServer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/d9dab006/nar-bundles/framework-bundle/framework/web/nifi-jetty/src/main/java/org/apache/nifi/web/server/JettyServer.java -- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-jetty/src/main/java/org/apache/nifi/web/server/JettyServer.java b/nar-bundles/framework-bundle/framework/web/nifi-jetty/src/main/java/org/apache/nifi/web/server/JettyServer.java index 9ed29ff..3900cfc 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-jetty/src/main/java/org/apache/nifi/web/server/JettyServer.java +++ b/nar-bundles/framework-bundle/framework/web/nifi-jetty/src/main/java/org/apache/nifi/web/server/JettyServer.java @@ -273,7 +273,7 @@ public class JettyServer implements NiFiServer { // consider each nar working directory for (final File narWorkingDirectory : narWorkingDirectories) { -final File narDependencies = new File(narWorkingDirectory, META-INF/dependencies); +final File narDependencies = new File(narWorkingDirectory, META-INF/bundled-dependencies); if (narDependencies.isDirectory()) { // list the wars from this nar final File[] narDependencyDirs = narDependencies.listFiles(WAR_FILTER);
[11/51] [abbrv] incubator-nifi git commit: NIFI-27: - Latest version of slickgrid.
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4c959f72/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/slickgrid/slick.editors.js -- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/slickgrid/slick.editors.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/slickgrid/slick.editors.js index 2d8a482..04b20d2 100755 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/slickgrid/slick.editors.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/slickgrid/slick.editors.js @@ -5,508 +5,508 @@ */ (function ($) { -// register namespace -$.extend(true, window, { -Slick: { -Editors: { -Text: TextEditor, -Integer: IntegerEditor, -Date: DateEditor, -YesNoSelect: YesNoSelectEditor, -Checkbox: CheckboxEditor, -PercentComplete: PercentCompleteEditor, -LongText: LongTextEditor -} -} -}); - -function TextEditor(args) { -var $input; -var defaultValue; -var scope = this; - -this.init = function () { -$input = $(INPUT type=text class='editor-text' /) -.appendTo(args.container) -.bind(keydown.nav, function (e) { -if (e.keyCode === $.ui.keyCode.LEFT || e.keyCode === $.ui.keyCode.RIGHT) { -e.stopImmediatePropagation(); -} -}) -.focus() -.select(); -}; - -this.destroy = function () { -$input.remove(); -}; - -this.focus = function () { -$input.focus(); -}; - -this.getValue = function () { -return $input.val(); -}; - -this.setValue = function (val) { -$input.val(val); -}; - -this.loadValue = function (item) { -defaultValue = item[args.column.field] || ; -$input.val(defaultValue); -$input[0].defaultValue = defaultValue; -$input.select(); -}; - -this.serializeValue = function () { -return $input.val(); -}; - -this.applyValue = function (item, state) { -item[args.column.field] = state; -}; - -this.isValueChanged = function () { -return (!($input.val() == defaultValue == null)) ($input.val() != defaultValue); -}; - -this.validate = function () { -if (args.column.validator) { -var validationResults = args.column.validator($input.val()); -if (!validationResults.valid) { -return validationResults; -} -} - -return { -valid: true, -msg: null -}; -}; - -this.init(); -} - -function IntegerEditor(args) { -var $input; -var defaultValue; -var scope = this; - -this.init = function () { -$input = $(INPUT type=text class='editor-text' /); - -$input.bind(keydown.nav, function (e) { -if (e.keyCode === $.ui.keyCode.LEFT || e.keyCode === $.ui.keyCode.RIGHT) { -e.stopImmediatePropagation(); -} -}); - -$input.appendTo(args.container); -$input.focus().select(); -}; - -this.destroy = function () { -$input.remove(); -}; - -this.focus = function () { -$input.focus(); -}; - -this.loadValue = function (item) { -defaultValue = item[args.column.field]; -$input.val(defaultValue); -$input[0].defaultValue = defaultValue; -$input.select(); -}; - -this.serializeValue = function () { -return parseInt($input.val(), 10) || 0; -}; - -this.applyValue = function (item, state) { -item[args.column.field] = state; -}; - -this.isValueChanged = function () { -return (!($input.val() == defaultValue == null)) ($input.val() != defaultValue); -}; - -this.validate = function () { -if (isNaN($input.val())) { -return { -valid: false, -msg: Please enter a valid integer -}; -} - -return { -valid: true, -msg: null -}; -}; - -this.init(); -} - -function DateEditor(args) { -var $input; -var defaultValue; -var scope = this; -var
[44/51] [abbrv] incubator-nifi git commit: Merge branch 'develop' into nifi-27
Merge branch 'develop' into nifi-27 Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/f10bb3cc Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/f10bb3cc Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/f10bb3cc Branch: refs/heads/NIFI-169 Commit: f10bb3ccade86247b44fe3a1905af94754ab54eb Parents: 888d1ba 1cc3ce5 Author: Matt Gilman matt.c.gil...@gmail.com Authored: Tue Dec 16 09:44:24 2014 -0500 Committer: Matt Gilman matt.c.gil...@gmail.com Committed: Tue Dec 16 09:44:24 2014 -0500 -- .gitignore | 1 + .../nifi/src/main/assembly/dependencies.xml | 12 + misc/build-order.sh | 4 +- misc/nar-maven-plugin/pom.xml | 21 +- .../src/main/java/nifi/NarMojo.java | 4 +- .../nifi/controller/FileSystemSwapManager.java | 33 ++- .../apache/nifi/controller/FlowController.java | 24 +- .../repository/FileSystemRepository.java| 6 + .../repository/StandardProcessSession.java | 134 - .../repository/StandardProvenanceReporter.java | 4 +- .../repository/VolatileContentRepository.java | 5 + .../nifi/remote/StandardRemoteProcessGroup.java | 100 +++ .../org/apache/nifi/util/ReflectionUtils.java | 72 ++--- .../repository/TestStandardProcessSession.java | 283 +++ .../src/main/resources/bin/nifi-status.bat | 8 +- .../resources/src/main/resources/bin/nifi.sh| 4 +- .../src/main/resources/bin/run-nifi.bat | 6 +- .../src/main/resources/bin/start-nifi.bat | 7 +- .../src/main/resources/bin/stop-nifi.bat| 8 +- .../web/nifi-web-api/nb-configuration.xml | 18 -- .../nifi/processors/standard/EvaluateXPath.java | 31 +- .../processors/standard/TestScanContent.java| 2 +- .../VolatileProvenanceRepository.java | 2 + .../nifi/components/PropertyDescriptor.java | 2 +- .../repository/ContentRepository.java | 6 + .../repository/FlowFileSwapManager.java | 5 +- .../nifi/components/TestPropertyDescriptor.java | 59 27 files changed, 651 insertions(+), 210 deletions(-) --
[19/51] [abbrv] incubator-nifi git commit: NIFI-27: - Latest version of codemirror.
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/1d23e6e1/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/codemirror/lib/codemirror.css -- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/codemirror/lib/codemirror.css b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/codemirror/lib/codemirror.css old mode 100755 new mode 100644 index 4de1393..e2d4ec2 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/codemirror/lib/codemirror.css +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/codemirror/lib/codemirror.css @@ -1,67 +1,97 @@ /* BASICS */ .CodeMirror { -/* Set height, width, borders, and global font properties here */ -font-family: monospace; -height: 300px; + /* Set height, width, borders, and global font properties here */ + font-family: monospace; + height: 300px; } .CodeMirror-scroll { -/* Set scrolling behaviour here */ -overflow: auto; + /* Set scrolling behaviour here */ + overflow: auto; } /* PADDING */ .CodeMirror-lines { -padding: 4px 0; /* Vertical padding around content */ + padding: 4px 0; /* Vertical padding around content */ } .CodeMirror pre { -padding: 0 4px; /* Horizontal padding of content */ + padding: 0 4px; /* Horizontal padding of content */ } .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { -background-color: white; /* The little square between H and V scrollbars */ + background-color: white; /* The little square between H and V scrollbars */ } /* GUTTER */ .CodeMirror-gutters { -border-right: 1px solid #ddd; -background-color: #f7f7f7; -white-space: nowrap; + border-right: 1px solid #ddd; + background-color: #f7f7f7; + white-space: nowrap; } .CodeMirror-linenumbers {} .CodeMirror-linenumber { -padding: 0 3px 0 5px; -min-width: 20px; -text-align: right; -color: #999; --moz-box-sizing: content-box; -box-sizing: content-box; + padding: 0 3px 0 5px; + min-width: 20px; + text-align: right; + color: #999; + -moz-box-sizing: content-box; + box-sizing: content-box; } +.CodeMirror-guttermarker { color: black; } +.CodeMirror-guttermarker-subtle { color: #999; } + /* CURSOR */ .CodeMirror div.CodeMirror-cursor { -border-left: 1px solid black; + border-left: 1px solid black; } /* Shown when moving in bi-directional text */ .CodeMirror div.CodeMirror-secondarycursor { -border-left: 1px solid silver; + border-left: 1px solid silver; +} +.CodeMirror.cm-fat-cursor div.CodeMirror-cursor { + width: auto; + border: 0; + background: #7e7; +} +.CodeMirror.cm-fat-cursor div.CodeMirror-cursors { + z-index: 1; +} + +.cm-animate-fat-cursor { + width: auto; + border: 0; + -webkit-animation: blink 1.06s steps(1) infinite; + -moz-animation: blink 1.06s steps(1) infinite; + animation: blink 1.06s steps(1) infinite; +} +@-moz-keyframes blink { + 0% { background: #7e7; } + 50% { background: none; } + 100% { background: #7e7; } +} +@-webkit-keyframes blink { + 0% { background: #7e7; } + 50% { background: none; } + 100% { background: #7e7; } } -.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor { -width: auto; -border: 0; -background: #7e7; +@keyframes blink { + 0% { background: #7e7; } + 50% { background: none; } + 100% { background: #7e7; } } + /* Can style cursor different in overwrite (non-insert) mode */ div.CodeMirror-overwrite div.CodeMirror-cursor {} -.cm-tab { display: inline-block; } +.cm-tab { display: inline-block; text-decoration: inherit; } .CodeMirror-ruler { -border-left: 1px solid #ccc; -position: absolute; + border-left: 1px solid #ccc; + position: absolute; } /* DEFAULT THEME */ @@ -70,11 +100,12 @@ div.CodeMirror-overwrite div.CodeMirror-cursor {} .cm-s-default .cm-atom {color: #219;} .cm-s-default .cm-number {color: #164;} .cm-s-default .cm-def {color: #00f;} -.cm-s-default .cm-variable {color: black;} +.cm-s-default .cm-variable, +.cm-s-default .cm-punctuation, +.cm-s-default .cm-property, +.cm-s-default .cm-operator {} .cm-s-default .cm-variable-2 {color: #05a;} .cm-s-default .cm-variable-3 {color: #085;} -.cm-s-default .cm-property {color: black;} -.cm-s-default .cm-operator {color: black;} .cm-s-default .cm-comment {color: #a50;} .cm-s-default .cm-string {color: #a11;} .cm-s-default .cm-string-2 {color: #f50;} @@ -94,12 +125,16 @@ div.CodeMirror-overwrite div.CodeMirror-cursor {} .cm-header, .cm-strong {font-weight: bold;} .cm-em {font-style: italic;} .cm-link {text-decoration: underline;} +.cm-strikethrough {text-decoration: line-through;} .cm-s-default .cm-error {color: #f00;} .cm-invalidchar {color: #f00;} +/* Default styles for common addons */ + div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;} div.CodeMirror
[04/51] [abbrv] incubator-nifi git commit: NIFI-27: - Latest version of codemirror.
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/9180b7d4/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/codemirror/lib/codemirror.css -- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/codemirror/lib/codemirror.css b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/codemirror/lib/codemirror.css old mode 100755 new mode 100644 index 4de1393..e2d4ec2 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/codemirror/lib/codemirror.css +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/codemirror/lib/codemirror.css @@ -1,67 +1,97 @@ /* BASICS */ .CodeMirror { -/* Set height, width, borders, and global font properties here */ -font-family: monospace; -height: 300px; + /* Set height, width, borders, and global font properties here */ + font-family: monospace; + height: 300px; } .CodeMirror-scroll { -/* Set scrolling behaviour here */ -overflow: auto; + /* Set scrolling behaviour here */ + overflow: auto; } /* PADDING */ .CodeMirror-lines { -padding: 4px 0; /* Vertical padding around content */ + padding: 4px 0; /* Vertical padding around content */ } .CodeMirror pre { -padding: 0 4px; /* Horizontal padding of content */ + padding: 0 4px; /* Horizontal padding of content */ } .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { -background-color: white; /* The little square between H and V scrollbars */ + background-color: white; /* The little square between H and V scrollbars */ } /* GUTTER */ .CodeMirror-gutters { -border-right: 1px solid #ddd; -background-color: #f7f7f7; -white-space: nowrap; + border-right: 1px solid #ddd; + background-color: #f7f7f7; + white-space: nowrap; } .CodeMirror-linenumbers {} .CodeMirror-linenumber { -padding: 0 3px 0 5px; -min-width: 20px; -text-align: right; -color: #999; --moz-box-sizing: content-box; -box-sizing: content-box; + padding: 0 3px 0 5px; + min-width: 20px; + text-align: right; + color: #999; + -moz-box-sizing: content-box; + box-sizing: content-box; } +.CodeMirror-guttermarker { color: black; } +.CodeMirror-guttermarker-subtle { color: #999; } + /* CURSOR */ .CodeMirror div.CodeMirror-cursor { -border-left: 1px solid black; + border-left: 1px solid black; } /* Shown when moving in bi-directional text */ .CodeMirror div.CodeMirror-secondarycursor { -border-left: 1px solid silver; + border-left: 1px solid silver; +} +.CodeMirror.cm-fat-cursor div.CodeMirror-cursor { + width: auto; + border: 0; + background: #7e7; +} +.CodeMirror.cm-fat-cursor div.CodeMirror-cursors { + z-index: 1; +} + +.cm-animate-fat-cursor { + width: auto; + border: 0; + -webkit-animation: blink 1.06s steps(1) infinite; + -moz-animation: blink 1.06s steps(1) infinite; + animation: blink 1.06s steps(1) infinite; +} +@-moz-keyframes blink { + 0% { background: #7e7; } + 50% { background: none; } + 100% { background: #7e7; } +} +@-webkit-keyframes blink { + 0% { background: #7e7; } + 50% { background: none; } + 100% { background: #7e7; } } -.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor { -width: auto; -border: 0; -background: #7e7; +@keyframes blink { + 0% { background: #7e7; } + 50% { background: none; } + 100% { background: #7e7; } } + /* Can style cursor different in overwrite (non-insert) mode */ div.CodeMirror-overwrite div.CodeMirror-cursor {} -.cm-tab { display: inline-block; } +.cm-tab { display: inline-block; text-decoration: inherit; } .CodeMirror-ruler { -border-left: 1px solid #ccc; -position: absolute; + border-left: 1px solid #ccc; + position: absolute; } /* DEFAULT THEME */ @@ -70,11 +100,12 @@ div.CodeMirror-overwrite div.CodeMirror-cursor {} .cm-s-default .cm-atom {color: #219;} .cm-s-default .cm-number {color: #164;} .cm-s-default .cm-def {color: #00f;} -.cm-s-default .cm-variable {color: black;} +.cm-s-default .cm-variable, +.cm-s-default .cm-punctuation, +.cm-s-default .cm-property, +.cm-s-default .cm-operator {} .cm-s-default .cm-variable-2 {color: #05a;} .cm-s-default .cm-variable-3 {color: #085;} -.cm-s-default .cm-property {color: black;} -.cm-s-default .cm-operator {color: black;} .cm-s-default .cm-comment {color: #a50;} .cm-s-default .cm-string {color: #a11;} .cm-s-default .cm-string-2 {color: #f50;} @@ -94,12 +125,16 @@ div.CodeMirror-overwrite div.CodeMirror-cursor {} .cm-header, .cm-strong {font-weight: bold;} .cm-em {font-style: italic;} .cm-link {text-decoration: underline;} +.cm-strikethrough {text-decoration: line-through;} .cm-s-default .cm-error {color: #f00;} .cm-invalidchar {color: #f00;} +/* Default styles for common addons */ + div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;} div.CodeMirror
[35/51] [abbrv] incubator-nifi git commit: NIFI-27: - Updating access control configuration for secure ports due to autocomplete upgrade.
NIFI-27: - Updating access control configuration for secure ports due to autocomplete upgrade. Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/fc78752e Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/fc78752e Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/fc78752e Branch: refs/heads/NIFI-169 Commit: fc78752e61fcf82b8a39dbb12bd4a3ff4ce21cb6 Parents: d307a13 Author: Matt Gilman matt.c.gil...@gmail.com Authored: Mon Dec 15 12:02:15 2014 -0500 Committer: Matt Gilman matt.c.gil...@gmail.com Committed: Mon Dec 15 12:02:15 2014 -0500 -- .../canvas/secure-port-configuration.jsp| 3 +- .../src/main/webapp/css/port-configuration.css | 16 +-- .../nf/canvas/nf-secure-port-configuration.js | 30 +--- 3 files changed, 29 insertions(+), 20 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/fc78752e/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/secure-port-configuration.jsp -- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/secure-port-configuration.jsp b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/secure-port-configuration.jsp index 200ef72..bd87018 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/secure-port-configuration.jsp +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/secure-port-configuration.jsp @@ -78,4 +78,5 @@ /div /div /div -/div \ No newline at end of file +/div +div id=search-users-results/div \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/fc78752e/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/css/port-configuration.css -- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/css/port-configuration.css b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/css/port-configuration.css index 340c2a4..b8fc87c 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/css/port-configuration.css +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/css/port-configuration.css @@ -110,14 +110,26 @@ input.search-users { color: #888; } +#search-users-results .ui-autocomplete { +max-height: 300px; +overflow: auto; +border: 1px solid #aa; +z-index: 1351; +border-radius: 0; +} + +#search-users-results .ui-menu .ui-menu-item a.ui-state-focus { +background: #D4E0E5 !important; +border: 1px solid #99; +border-radius: 0; +} + li.search-users-header { font-weight: bold; padding-top: 4px; padding-left: 4px; padding-right: 4px; height: 14px; -float: left; -clear: left; } div.search-users-match-header { http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/fc78752e/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-secure-port-configuration.js -- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-secure-port-configuration.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-secure-port-configuration.js index 8fe..b21b1bf 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-secure-port-configuration.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-secure-port-configuration.js @@ -138,17 +138,10 @@ nf.SecurePortConfiguration = (function () { // initialize the access control auto complete $.widget('nf.userSearchAutocomplete', $.ui.autocomplete, { -_response: function (content) { -if (!this.options.disabled content) { -this._suggest(content); -this._trigger('open'); -} else { -this.close(); -} -this.pending--; -if (!this.pending) { -this.element.removeClass('ui-autocomplete-loading'); -} +_normalize: function(searchResults) { +var items = []; +items.push(searchResults); +return items; }, _resizeMenu: function () { var ul =
[13/51] [abbrv] incubator-nifi git commit: NIFI-27: - Latest version of slickgrid.
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4c959f72/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/slickgrid/slick.core.js -- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/slickgrid/slick.core.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/slickgrid/slick.core.js index aea3567..2f097b1 100755 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/slickgrid/slick.core.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/slickgrid/slick.core.js @@ -5,419 +5,463 @@ */ (function ($) { -// register namespace -$.extend(true, window, { -Slick: { -Event: Event, -EventData: EventData, -EventHandler: EventHandler, -Range: Range, -NonDataRow: NonDataItem, -Group: Group, -GroupTotals: GroupTotals, -EditorLock: EditorLock, -/*** - * A global singleton editor lock. - * @class GlobalEditorLock - * @static - * @constructor - */ -GlobalEditorLock: new EditorLock() -} -}); + // register namespace + $.extend(true, window, { +Slick: { + Event: Event, + EventData: EventData, + EventHandler: EventHandler, + Range: Range, + NonDataRow: NonDataItem, + Group: Group, + GroupTotals: GroupTotals, + EditorLock: EditorLock, + + /*** + * A global singleton editor lock. + * @class GlobalEditorLock + * @static + * @constructor + */ + GlobalEditorLock: new EditorLock() +} + }); + + /*** + * An event object for passing data to event handlers and letting them control propagation. + * pThis is pretty much identical to how W3C and jQuery implement events./p + * @class EventData + * @constructor + */ + function EventData() { +var isPropagationStopped = false; +var isImmediatePropagationStopped = false; /*** - * An event object for passing data to event handlers and letting them control propagation. - * pThis is pretty much identical to how W3C and jQuery implement events./p - * @class EventData - * @constructor + * Stops event from propagating up the DOM tree. + * @method stopPropagation */ -function EventData() { -var isPropagationStopped = false; -var isImmediatePropagationStopped = false; - -/*** - * Stops event from propagating up the DOM tree. - * @method stopPropagation - */ -this.stopPropagation = function () { -isPropagationStopped = true; -}; - -/*** - * Returns whether stopPropagation was called on this event object. - * @method isPropagationStopped - * @return {Boolean} - */ -this.isPropagationStopped = function () { -return isPropagationStopped; -}; - -/*** - * Prevents the rest of the handlers from being executed. - * @method stopImmediatePropagation - */ -this.stopImmediatePropagation = function () { -isImmediatePropagationStopped = true; -}; - -/*** - * Returns whether stopImmediatePropagation was called on this event object.\ - * @method isImmediatePropagationStopped - * @return {Boolean} - */ -this.isImmediatePropagationStopped = function () { -return isImmediatePropagationStopped; -} -} +this.stopPropagation = function () { + isPropagationStopped = true; +}; /*** - * A simple publisher-subscriber implementation. - * @class Event - * @constructor + * Returns whether stopPropagation was called on this event object. + * @method isPropagationStopped + * @return {Boolean} */ -function Event() { -var handlers = []; - -/*** - * Adds an event handler to be called when the event is fired. - * pEvent handler will receive two arguments - an codeEventData/code and the codedata/code - * object the event was fired with.p - * @method subscribe - * @param fn {Function} Event handler. - */ -this.subscribe = function (fn) { -handlers.push(fn); -}; - -/*** - * Removes an event handler added with codesubscribe(fn)/code. - * @method unsubscribe - * @param fn {Function} Event handler to be removed. - */ -this.unsubscribe = function (fn) { -for (var i = handlers.length - 1; i = 0; i--) { -if (handlers[i] === fn) { -handlers.splice(i, 1); -} -} -}; - -/*** -
[45/51] [abbrv] incubator-nifi git commit: NIFI-27: - Reverting to a slightly old version of minicolors to do issues compressing the css in the latests version.
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/a016bf47/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/minicolors/jquery.minicolors.min.js -- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/minicolors/jquery.minicolors.min.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/minicolors/jquery.minicolors.min.js index 938d85e..6b611fe 100755 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/minicolors/jquery.minicolors.min.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/minicolors/jquery.minicolors.min.js @@ -1,11 +1,9 @@ /* * jQuery MiniColors: A tiny color picker built on jQuery * - * Copyright: Cory LaViska for A Beautiful Site, LLC + * Copyright Cory LaViska for A Beautiful Site, LLC. (http://www.abeautifulsite.net/) * - * Contributions and bug reports: https://github.com/claviska/jquery-minicolors - * - * @license: http://opensource.org/licenses/MIT + * Licensed under the MIT license: http://opensource.org/licenses/MIT * */ -jQueryfunction($){function i(i,t){var o=$('div class=minicolors /'),n=$.minicolors.defaults;i.data(minicolors-initialized)||(t=$.extend(!0,{},n,t),o.addClass(minicolors-theme-+t.theme).toggleClass(minicolors-with-opacity,t.opacity).toggleClass(minicolors-no-data-uris,t.dataUris!==!0),void 0!==t.position$.each(t.position.split( ),function(){o.addClass(minicolors-position-+this)}),i.addClass(minicolors-input).data(minicolors-initialized,!1).data(minicolors-settings,t).prop(size,7).wrap(o).after('div class=minicolors-panel minicolors-slider-'+t.control+'div class=minicolors-slider minicolors-spritediv class=minicolors-picker/div/divdiv class=minicolors-opacity-slider minicolors-spritediv class=minicolors-picker/div/divdiv class=minicolors-grid minicolors-spritediv class=minicolors-grid-inner/divdiv class=minicolors-pickerdiv/div/div/div/div'),t.inline||(i.after('span class=minicolors-swatch minicolors-spr itespan class=minicolors-swatch-color/span/span'),i.next(.minicolors-swatch).on(click,function(t){t.preventDefault(),i.focus()})),i.parent().find(.minicolors-panel).on(selectstart,function(){return!1}).end(),t.inlinei.parent().addClass(minicolors-inline),e(i,!1),i.data(minicolors-initialized,!0))}function t(i){var t=i.parent();i.removeData(minicolors-initialized).removeData(minicolors-settings).removeProp(size).removeClass(minicolors-input),t.before(i).remove()}function o(i){var t=i.parent(),o=t.find(.minicolors-panel),s=i.data(minicolors-settings);!i.data(minicolors-initialized)||i.prop(disabled)||t.hasClass(minicolors-inline)||t.hasClass(minicolors-focus)||(n(),t.addClass(minicolors-focus),o.stop(!0,!0).fadeIn(s.showSpeed,function(){s.shows.show.call(i.get(0))}))}function n(){$(.minicolors-focus).each(function(){var i=$(this),t=i.find(.minicolors-input),o=i.find(.minicolors-panel),n=t.data(minicolors-settings);o.fadeOut(n.hid eSpeed,function(){n.hiden.hide.call(t.get(0)),i.removeClass(minicolors-focus)})})}function s(i,t,o){var n=i.parents(.minicolors).find(.minicolors-input),s=n.data(minicolors-settings),e=i.find([class$=-picker]),r=i.offset().left,c=i.offset().top,l=Math.round(t.pageX-r),h=Math.round(t.pageY-c),d=o?s.animationSpeed:0,u,g,m,p;t.originalEvent.changedTouches(l=t.originalEvent.changedTouches[0].pageX-r,h=t.originalEvent.changedTouches[0].pageY-c),0l(l=0),0h(h=0),li.width()(l=i.width()),hi.height()(h=i.height()),i.parent().is(.minicolors-slider-wheel)e.parent().is(.minicolors-grid)(u=75-l,g=75-h,m=Math.sqrt(u*u+g*g),p=Math.atan2(g,u),0p(p+=2*Math.PI),m75(m=75,l=75-75*Math.cos(p),h=75-75*Math.sin(p)),l=Math.round(l),h=Math.round(h)),i.is(.minicolors-grid)?e.stop(!0).animate({top:h+px,left:l+px},d,s.animationEasing,function(){a(n,i)}):e.stop(!0).animate({top:h+px},d,s.animationEasing,function(){a(n,i)})}function a(i,t){function o(i,t){var o,n;re turn i.lengtht?(o=i.offset().left,n=i.offset().top,{x:o-t.offset().left+i.outerWidth()/2,y:n-t.offset().top+i.outerHeight()/2}):null}var n,s,a,e,c,l,d,g=i.val(),m=i.attr(data-opacity),f=i.parent(),v=i.data(minicolors-settings),b=f.find(.minicolors-swatch),y=f.find(.minicolors-grid),M=f.find(.minicolors-slider),w=f.find(.minicolors-opacity-slider),x=y.find([class$=-picker]),C=M.find([class$=-picker]),k=w.find([class$=-picker]),S=o(x,y),z=o(C,M),D=o(k,w);if(t.is(.minicolors-grid,
[21/51] [abbrv] incubator-nifi git commit: NIFI-27: - Latest version of codemirror.
NIFI-27: - Latest version of codemirror. Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/1d23e6e1 Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/1d23e6e1 Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/1d23e6e1 Branch: refs/heads/NIFI-169 Commit: 1d23e6e13625a6ce4ae40b71c06d9ae42d771b48 Parents: 8a0e2ce Author: Matt Gilman matt.c.gil...@gmail.com Authored: Wed Dec 10 12:56:04 2014 -0500 Committer: Matt Gilman matt.c.gil...@gmail.com Committed: Wed Dec 10 14:36:44 2014 -0500 -- .../src/main/webapp/WEB-INF/pages/canvas.jsp|4 +- .../src/main/webapp/js/codemirror/LICENSE | 38 +- .../js/codemirror/addon/edit/matchbrackets.js | 125 - .../js/codemirror/addon/hint/show-hint.css | 54 +- .../js/codemirror/addon/hint/show-hint.js | 411 - .../js/codemirror/lib/codemirror-compressed.js | 16 + .../webapp/js/codemirror/lib/codemirror.css | 282 +- .../main/webapp/js/codemirror/lib/codemirror.js | 8488 -- 8 files changed, 228 insertions(+), 9190 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/1d23e6e1/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/WEB-INF/pages/canvas.jsp -- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/WEB-INF/pages/canvas.jsp b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/WEB-INF/pages/canvas.jsp index 09c8207..a40b745 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/WEB-INF/pages/canvas.jsp +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/WEB-INF/pages/canvas.jsp @@ -33,9 +33,7 @@ link rel=stylesheet href=js/jquery/minicolors/jquery.minicolors.css type=text/css / link rel=stylesheet href=js/jquery/slickgrid/css/slick.grid.css type=text/css / link rel=stylesheet href=js/jquery/slickgrid/css/slick-default-theme.css type=text/css / -script type=text/javascript src=js/codemirror/lib/codemirror.js/script -script type=text/javascript src=js/codemirror/addon/edit/matchbrackets.js/script -script type=text/javascript src=js/codemirror/addon/hint/show-hint.js/script +script type=text/javascript src=js/codemirror/lib/codemirror-compressed.js/script script type=text/javascript src=js/jquery/jquery-1.7.min.js/script script type=text/javascript src=js/jquery/jquery-ui-1.8.10.custom.min.js/script script type=text/javascript src=js/jquery/jquery.center.js/script http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/1d23e6e1/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/codemirror/LICENSE -- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/codemirror/LICENSE b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/codemirror/LICENSE old mode 100755 new mode 100644 index 4f1e9d1..d21bbea --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/codemirror/LICENSE +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/codemirror/LICENSE @@ -1,19 +1,19 @@ -Copyright (C) 2013 by Marijn Haverbeke mari...@gmail.com and others - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the Software), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +Copyright (C) 2014 by Marijn Haverbeke mari...@gmail.com and others + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the Software), to deal +in the Software without restriction, including without limitation the rights +to use,
[07/51] [abbrv] incubator-nifi git commit: Merge branch 'nifi-27' of https://git-wip-us.apache.org/repos/asf/incubator-nifi into nifi-27
Merge branch 'nifi-27' of https://git-wip-us.apache.org/repos/asf/incubator-nifi into nifi-27 Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/2f2474ef Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/2f2474ef Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/2f2474ef Branch: refs/heads/NIFI-169 Commit: 2f2474efbc20f07a5ee2ce10ce48954f4854146e Parents: 9180b7d fef8071 Author: Matt Gilman matt.c.gil...@gmail.com Authored: Wed Dec 10 12:58:18 2014 -0500 Committer: Matt Gilman matt.c.gil...@gmail.com Committed: Wed Dec 10 12:58:18 2014 -0500 -- --
[05/51] [abbrv] incubator-nifi git commit: NIFI-27: - Latest version of codemirror.
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/9180b7d4/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/codemirror/lib/codemirror-compressed.js -- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/codemirror/lib/codemirror-compressed.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/codemirror/lib/codemirror-compressed.js new file mode 100644 index 000..11b3fbc --- /dev/null +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/codemirror/lib/codemirror-compressed.js @@ -0,0 +1,16 @@ +/* CodeMirror - Minified Bundled + Generated on 12/10/2014 with http://codemirror.net/doc/compress.html + Version: 4.8 + + CodeMirror Library: + - codemirror.js + Add-ons: + - matchbrackets.js + - show-hint.js + */ + +!function(a){if(object==typeof exportsobject==typeof module)module.exports=a();else{if(function==typeof definedefine.amd)return define([],a);this.CodeMirror=a()}}(function(){use strict;function w(a,b){if(!(this instanceof w))return new w(a,b);this.options=b=b?Qg(b):{},Qg(ie,b,!1),J(b);var c=b.value;string==typeof c(c=new Lf(c,b.mode)),this.doc=c;var f=this.display=new x(a,c);f.wrapper.CodeMirror=this,F(this),D(this),b.lineWrapping(this.display.wrapper.className+= CodeMirror-wrap),b.autofocus!o_c(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,draggingText:!1,highlight:new Gg,keySeq:null},d11esetTimeout(Rg($c,this,!0),20),cd(this),ih(),Ac(this),this.curOp.forceUpdate=!0,Pf(this,c),b.autofocus!o||bh()==f.input?setTimeout(Rg(Hd,this),20):Id(this);for(var g in je)je.hasOwnProperty(g)je[g](this,b[g],le);P(this);for(var h=0;hpe.length;++h)pe[h](this);Cc(this)}function x(a,b){var c =this,g=c.input=Yg(textarea,null,null,position: absolute; padding: 0; width: 1px; height: 1em; outline: none);f?g.style.width=1000px:g.setAttribute(wrap,off),n(g.style.border=1px solid black),g.setAttribute(autocorrect,off),g.setAttribute(autocapitalize,off),g.setAttribute(spellcheck,false),c.inputDiv=Yg(div,[g],null,overflow: hidden; position: relative; width: 3px; height: 0px;),c.scrollbarH=Yg(div,[Yg(div,null,null,height: 100%; min-height: 1px)],CodeMirror-hscrollbar),c.scrollbarV=Yg(div,[Yg(div,null,null,min-width: 1px)],CodeMirror-vscrollbar),c.scrollbarFiller=Yg(div,null,CodeMirror-scrollbar-filler),c.gutterFiller=Yg(div,null,CodeMirror-gutter-filler),c.lineDiv=Yg(div,null,CodeMirror-code),c.selectionDiv=Yg(div,null,null,position: relative; z-index: 1),c.cursorDiv=Yg(div,null,CodeMirror-cursors),c.measure=Yg(div,null,CodeMirror-measure),c.lineMeasure=Yg(div,null,CodeMirror-measure),c.lineSpace=Yg(div,[ c.measure,c.lineMeasure,c.selectionDiv,c.cursorDiv,c.lineDiv],null,position: relative; outline: none),c.mover=Yg(div,[Yg(div,[c.lineSpace],CodeMirror-lines)],null,position: relative),c.sizer=Yg(div,[c.mover],CodeMirror-sizer),c.heightForcer=Yg(div,null,null,position: absolute; height: +Bg+px; width: 1px;),c.gutters=Yg(div,null,CodeMirror-gutters),c.lineGutter=null,c.scroller=Yg(div,[c.sizer,c.heightForcer,c.gutters],CodeMirror-scroll),c.scroller.setAttribute(tabIndex,-1),c.wrapper=Yg(div,[c.inputDiv,c.scrollbarH,c.scrollbarV,c.scrollbarFiller,c.gutterFiller,c.scroller],CodeMirror),d8e(c.gutters.style.zIndex=-1,c.scroller.style.paddingRight=0),n(g.style.width=0px),f||(c.scroller.draggable=!0),k(c.inputDiv.style.height=1px,c.inputDiv.style.position=absolute),d8e(c.scrollbarH.style.minHeight=c.scrollbarV.style.minWidth=18px),a(a.appendChild?a.appendChild(c.wrapper):a(c.wrapper)),c.viewFrom=c.viewTo=b.first,c.view=[],c.external Measured=null,c.viewOffset=0,c.lastWrapHeight=c.lastWrapWidth=0,c.updateLineNumbers=null,c.lineNumWidth=c.lineNumInnerWidth=c.lineNumChars=null,c.prevInput=,c.alignWidgets=!1,c.pollingFast=!1,c.poll=new Gg,c.cachedCharWidth=c.cachedTextHeight=c.cachedPaddingH=null,c.inaccurateSelection=!1,c.maxLine=null,c.maxLineLength=0,c.maxLineChanged=!1,c.wheelDX=c.wheelDY=c.wheelStartX=c.wheelStartY=null,c.shift=!1,c.selForContextMenu=null}function y(a){a.doc.mode=w.getMode(a.options,a.doc.modeOption),z(a)}function z(a){a.doc.iter(function(a){a.stateAfter(a.stateAfter=null),a.styles(a.styles=null)}),a.doc.frontier=a.doc.first,Tb(a,100),a.state.modeGen++,a.curOpPc(a)}function A(a){a.options.lineWrapping?(eh(a.display.wrapper,CodeMirror-wrap),a.display.sizer.style.minWidth=):(dh(a.display.wrapper,CodeMirror-wrap),I(a)),C(a),Pc(a),kc(a),setTimeout(function(){M(a)},100)}function B(a){var b=wc(a.display),c=a.options.lineWrapping,d=cMath.max(5,a.display.scroller.clientWidth/xc(a.displ ay)-3);return function(e){if(ef(a.doc,e))return 0;var f=0;if(e.widgets)for(var g=0;ge.widgets.length;g++)e.widgets[g].height(f+=e.widgets[g].height);return c?f+(Math.ceil(e.text.length/d)||1)*b:f+b}}function C(a){var
[42/51] [abbrv] incubator-nifi git commit: NIFI-27: - Upgrading jQuery and jQuery UI. - Replacing all instances of Deferred.then with Deferred.done/fail due to API change introduced in 1.8. - Restorin
NIFI-27: - Upgrading jQuery and jQuery UI. - Replacing all instances of Deferred.then with Deferred.done/fail due to API change introduced in 1.8. - Restoring line returns between public methods. - Upgrading jquery.form and jquery.minicolors. Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/2965258e Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/2965258e Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/2965258e Branch: refs/heads/NIFI-169 Commit: 2965258e5da192b8a54dc36f84089be90bc0f1f7 Parents: fc78752 Author: Matt Gilman matt.c.gil...@gmail.com Authored: Tue Dec 16 08:42:13 2014 -0500 Committer: Matt Gilman matt.c.gil...@gmail.com Committed: Tue Dec 16 08:42:13 2014 -0500 -- .../webapp/WEB-INF/pages/bulletin-board.jsp | 3 +- .../src/main/webapp/WEB-INF/pages/canvas.jsp| 3 +- .../src/main/webapp/WEB-INF/pages/cluster.jsp | 1 - .../src/main/webapp/WEB-INF/pages/counters.jsp | 1 - .../src/main/webapp/WEB-INF/pages/history.jsp | 1 - .../main/webapp/WEB-INF/pages/provenance.jsp| 1 - .../src/main/webapp/WEB-INF/pages/summary.jsp | 1 - .../src/main/webapp/WEB-INF/pages/templates.jsp | 3 +- .../src/main/webapp/WEB-INF/pages/users.jsp | 1 - .../src/main/webapp/js/jquery/jquery.form.js| 1118 -- .../main/webapp/js/jquery/jquery.form.min.js|11 + .../js/jquery/minicolors/jquery.minicolors.css |40 +- .../jquery/minicolors/jquery.minicolors.min.js | 421 +- .../jquery/ui-smoothness/jquery-ui-1.10.4.css | 1178 -- .../js/jquery/ui-smoothness/jquery-ui-1.10.4.js | 15008 - .../js/nf/bulletin-board/nf-bulletin-board.js |16 +- .../src/main/webapp/js/nf/canvas/nf-actions.js |65 +- .../src/main/webapp/js/nf/canvas/nf-birdseye.js | 1 + .../webapp/js/nf/canvas/nf-canvas-header.js |12 +- .../webapp/js/nf/canvas/nf-canvas-toolbar.js| 1 + .../webapp/js/nf/canvas/nf-canvas-toolbox.js|45 +- .../main/webapp/js/nf/canvas/nf-canvas-utils.js |73 +- .../src/main/webapp/js/nf/canvas/nf-canvas.js |59 +- .../main/webapp/js/nf/canvas/nf-clipboard.js| 4 + .../main/webapp/js/nf/canvas/nf-connectable.js | 1 + .../js/nf/canvas/nf-connection-configuration.js |43 +- .../main/webapp/js/nf/canvas/nf-connection.js |20 +- .../main/webapp/js/nf/canvas/nf-context-menu.js | 2 + .../main/webapp/js/nf/canvas/nf-draggable.js| 9 +- .../src/main/webapp/js/nf/canvas/nf-funnel.js | 8 + .../src/main/webapp/js/nf/canvas/nf-go-to.js|50 +- .../src/main/webapp/js/nf/canvas/nf-graph.js| 6 + .../js/nf/canvas/nf-label-configuration.js | 5 +- .../src/main/webapp/js/nf/canvas/nf-label.js|14 +- .../js/nf/canvas/nf-port-configuration.js | 5 +- .../main/webapp/js/nf/canvas/nf-port-details.js | 1 + .../src/main/webapp/js/nf/canvas/nf-port.js |10 + .../nf/canvas/nf-process-group-configuration.js | 5 +- .../js/nf/canvas/nf-process-group-details.js| 1 + .../webapp/js/nf/canvas/nf-process-group.js |10 + .../js/nf/canvas/nf-processor-configuration.js |13 +- .../js/nf/canvas/nf-processor-property-table.js |14 + .../main/webapp/js/nf/canvas/nf-processor.js|11 + .../main/webapp/js/nf/canvas/nf-registration.js | 4 +- .../nf-remote-process-group-configuration.js| 5 +- .../canvas/nf-remote-process-group-details.js | 1 + .../nf/canvas/nf-remote-process-group-ports.js |13 +- .../js/nf/canvas/nf-remote-process-group.js |10 + .../nf/canvas/nf-secure-port-configuration.js | 5 +- .../js/nf/canvas/nf-secure-port-details.js | 1 + .../main/webapp/js/nf/canvas/nf-selectable.js | 2 + .../src/main/webapp/js/nf/canvas/nf-settings.js |13 +- .../src/main/webapp/js/nf/canvas/nf-snippet.js | 6 + .../src/main/webapp/js/nf/canvas/nf-storage.js | 3 + .../webapp/js/nf/cluster/nf-cluster-table.js|31 +- .../src/main/webapp/js/nf/cluster/nf-cluster.js |12 +- .../webapp/js/nf/counters/nf-counters-table.js |11 +- .../main/webapp/js/nf/counters/nf-counters.js |12 +- .../webapp/js/nf/history/nf-history-model.js| 4 +- .../webapp/js/nf/history/nf-history-table.js| 7 +- .../src/main/webapp/js/nf/history/nf-history.js |12 +- .../src/main/webapp/js/nf/nf-common.js |40 + .../main/webapp/js/nf/nf-connection-details.js |19 +- .../src/main/webapp/js/nf/nf-dialog.js | 1 + .../main/webapp/js/nf/nf-processor-details.js | 5 +- .../src/main/webapp/js/nf/nf-shell.js | 1 + .../src/main/webapp/js/nf/nf-status-history.js |40 +- .../js/nf/provenance/nf-provenance-lineage.js |17 +- .../js/nf/provenance/nf-provenance-table.js |
[20/51] [abbrv] incubator-nifi git commit: NIFI-27: - Latest version of codemirror.
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/1d23e6e1/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/codemirror/lib/codemirror-compressed.js -- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/codemirror/lib/codemirror-compressed.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/codemirror/lib/codemirror-compressed.js new file mode 100644 index 000..11b3fbc --- /dev/null +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/codemirror/lib/codemirror-compressed.js @@ -0,0 +1,16 @@ +/* CodeMirror - Minified Bundled + Generated on 12/10/2014 with http://codemirror.net/doc/compress.html + Version: 4.8 + + CodeMirror Library: + - codemirror.js + Add-ons: + - matchbrackets.js + - show-hint.js + */ + +!function(a){if(object==typeof exportsobject==typeof module)module.exports=a();else{if(function==typeof definedefine.amd)return define([],a);this.CodeMirror=a()}}(function(){use strict;function w(a,b){if(!(this instanceof w))return new w(a,b);this.options=b=b?Qg(b):{},Qg(ie,b,!1),J(b);var c=b.value;string==typeof c(c=new Lf(c,b.mode)),this.doc=c;var f=this.display=new x(a,c);f.wrapper.CodeMirror=this,F(this),D(this),b.lineWrapping(this.display.wrapper.className+= CodeMirror-wrap),b.autofocus!o_c(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,draggingText:!1,highlight:new Gg,keySeq:null},d11esetTimeout(Rg($c,this,!0),20),cd(this),ih(),Ac(this),this.curOp.forceUpdate=!0,Pf(this,c),b.autofocus!o||bh()==f.input?setTimeout(Rg(Hd,this),20):Id(this);for(var g in je)je.hasOwnProperty(g)je[g](this,b[g],le);P(this);for(var h=0;hpe.length;++h)pe[h](this);Cc(this)}function x(a,b){var c =this,g=c.input=Yg(textarea,null,null,position: absolute; padding: 0; width: 1px; height: 1em; outline: none);f?g.style.width=1000px:g.setAttribute(wrap,off),n(g.style.border=1px solid black),g.setAttribute(autocorrect,off),g.setAttribute(autocapitalize,off),g.setAttribute(spellcheck,false),c.inputDiv=Yg(div,[g],null,overflow: hidden; position: relative; width: 3px; height: 0px;),c.scrollbarH=Yg(div,[Yg(div,null,null,height: 100%; min-height: 1px)],CodeMirror-hscrollbar),c.scrollbarV=Yg(div,[Yg(div,null,null,min-width: 1px)],CodeMirror-vscrollbar),c.scrollbarFiller=Yg(div,null,CodeMirror-scrollbar-filler),c.gutterFiller=Yg(div,null,CodeMirror-gutter-filler),c.lineDiv=Yg(div,null,CodeMirror-code),c.selectionDiv=Yg(div,null,null,position: relative; z-index: 1),c.cursorDiv=Yg(div,null,CodeMirror-cursors),c.measure=Yg(div,null,CodeMirror-measure),c.lineMeasure=Yg(div,null,CodeMirror-measure),c.lineSpace=Yg(div,[ c.measure,c.lineMeasure,c.selectionDiv,c.cursorDiv,c.lineDiv],null,position: relative; outline: none),c.mover=Yg(div,[Yg(div,[c.lineSpace],CodeMirror-lines)],null,position: relative),c.sizer=Yg(div,[c.mover],CodeMirror-sizer),c.heightForcer=Yg(div,null,null,position: absolute; height: +Bg+px; width: 1px;),c.gutters=Yg(div,null,CodeMirror-gutters),c.lineGutter=null,c.scroller=Yg(div,[c.sizer,c.heightForcer,c.gutters],CodeMirror-scroll),c.scroller.setAttribute(tabIndex,-1),c.wrapper=Yg(div,[c.inputDiv,c.scrollbarH,c.scrollbarV,c.scrollbarFiller,c.gutterFiller,c.scroller],CodeMirror),d8e(c.gutters.style.zIndex=-1,c.scroller.style.paddingRight=0),n(g.style.width=0px),f||(c.scroller.draggable=!0),k(c.inputDiv.style.height=1px,c.inputDiv.style.position=absolute),d8e(c.scrollbarH.style.minHeight=c.scrollbarV.style.minWidth=18px),a(a.appendChild?a.appendChild(c.wrapper):a(c.wrapper)),c.viewFrom=c.viewTo=b.first,c.view=[],c.external Measured=null,c.viewOffset=0,c.lastWrapHeight=c.lastWrapWidth=0,c.updateLineNumbers=null,c.lineNumWidth=c.lineNumInnerWidth=c.lineNumChars=null,c.prevInput=,c.alignWidgets=!1,c.pollingFast=!1,c.poll=new Gg,c.cachedCharWidth=c.cachedTextHeight=c.cachedPaddingH=null,c.inaccurateSelection=!1,c.maxLine=null,c.maxLineLength=0,c.maxLineChanged=!1,c.wheelDX=c.wheelDY=c.wheelStartX=c.wheelStartY=null,c.shift=!1,c.selForContextMenu=null}function y(a){a.doc.mode=w.getMode(a.options,a.doc.modeOption),z(a)}function z(a){a.doc.iter(function(a){a.stateAfter(a.stateAfter=null),a.styles(a.styles=null)}),a.doc.frontier=a.doc.first,Tb(a,100),a.state.modeGen++,a.curOpPc(a)}function A(a){a.options.lineWrapping?(eh(a.display.wrapper,CodeMirror-wrap),a.display.sizer.style.minWidth=):(dh(a.display.wrapper,CodeMirror-wrap),I(a)),C(a),Pc(a),kc(a),setTimeout(function(){M(a)},100)}function B(a){var b=wc(a.display),c=a.options.lineWrapping,d=cMath.max(5,a.display.scroller.clientWidth/xc(a.displ ay)-3);return function(e){if(ef(a.doc,e))return 0;var f=0;if(e.widgets)for(var g=0;ge.widgets.length;g++)e.widgets[g].height(f+=e.widgets[g].height);return c?f+(Math.ceil(e.text.length/d)||1)*b:f+b}}function C(a){var
[33/51] [abbrv] incubator-nifi git commit: NIFI-27: - Updating cluster search to work with upgraded jquery ui. - Better support for case when no results are found.
NIFI-27: - Updating cluster search to work with upgraded jquery ui. - Better support for case when no results are found. Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/68e08983 Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/68e08983 Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/68e08983 Branch: refs/heads/NIFI-169 Commit: 68e0898399f7a8165fc35fb31157db9763519382 Parents: 71e53ae Author: Matt Gilman matt.c.gil...@gmail.com Authored: Fri Dec 12 10:34:56 2014 -0500 Committer: Matt Gilman matt.c.gil...@gmail.com Committed: Fri Dec 12 10:34:56 2014 -0500 -- .../summary/view-single-node-dialog.jsp | 1 + .../nifi-web-ui/src/main/webapp/css/summary.css | 11 +++- .../webapp/js/nf/summary/nf-cluster-search.js | 29 +++- 3 files changed, 33 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/68e08983/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/WEB-INF/partials/summary/view-single-node-dialog.jsp -- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/WEB-INF/partials/summary/view-single-node-dialog.jsp b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/WEB-INF/partials/summary/view-single-node-dialog.jsp index 9570de5..4a3338c 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/WEB-INF/partials/summary/view-single-node-dialog.jsp +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/WEB-INF/partials/summary/view-single-node-dialog.jsp @@ -21,3 +21,4 @@ div id=cluster-search-example(e.g.nbsp;my.host:80)/div /div /div +div id=search-cluster-results/div http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/68e08983/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/css/summary.css -- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/css/summary.css b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/css/summary.css index cab21c0..c109927 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/css/summary.css +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/css/summary.css @@ -139,9 +139,18 @@ div.search-match { font-size: 10px; } -.ui-autocomplete { +#search-cluster-results .ui-autocomplete { max-height: 300px; overflow: auto; +border: 1px solid #aa; +z-index: 1351; +border-radius: 0; +} + +#search-cluster-results .ui-menu .ui-menu-item a.ui-state-focus { +background: #D4E0E5 !important; +border: 1px solid #99; +border-radius: 0; } input.search-nodes { http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/68e08983/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/summary/nf-cluster-search.js -- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/summary/nf-cluster-search.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/summary/nf-cluster-search.js index 035e6f0..2254943 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/summary/nf-cluster-search.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/summary/nf-cluster-search.js @@ -102,13 +102,27 @@ nf.ClusterSearch = (function () { // configure the cluster auto complete $.widget('nf.clusterSearchAutocomplete', $.ui.autocomplete, { -_normalize: function (content) { -return $.map(content, function (item, i) { -return $.extend({ -label: item.address, -value: item.address -}, item); +_normalize: function(searchResults) { +var items = []; +items.push(searchResults); +return items; +}, +_renderMenu: function(ul, items) { +// results are normalized into a single element array +var searchResults = items[0]; + +var self = this; +$.each(searchResults.nodeResults, function(_, node) { +self._renderItemData(ul, { +label: node.address, +value: node.address +
[47/51] [abbrv] incubator-nifi git commit: NIFI-27: - Reverting to a slightly old version of minicolors to do issues compressing the css in the latests version.
NIFI-27: - Reverting to a slightly old version of minicolors to do issues compressing the css in the latests version. Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/a016bf47 Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/a016bf47 Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/a016bf47 Branch: refs/heads/NIFI-169 Commit: a016bf47bdb778fd436544bd445c1c031aeefb7b Parents: f10bb3c Author: Matt Gilman matt.c.gil...@gmail.com Authored: Tue Dec 16 11:12:15 2014 -0500 Committer: Matt Gilman matt.c.gil...@gmail.com Committed: Tue Dec 16 11:12:15 2014 -0500 -- .../js/jquery/minicolors/jquery.minicolors.css | 284 +-- .../jquery/minicolors/jquery.minicolors.min.js | 8 +- 2 files changed, 140 insertions(+), 152 deletions(-) --
[37/51] [abbrv] incubator-nifi git commit: NIFI-27: - Upgrading jQuery and jQuery UI. - Replacing all instances of Deferred.then with Deferred.done/fail due to API change introduced in 1.8. - Restorin
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2965258e/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-go-to.js -- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-go-to.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-go-to.js index 443..ddc501a 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-go-to.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-go-to.js @@ -336,6 +336,7 @@ nf.GoTo = (function () { } }); }, + /** * Shows components downstream from a processor. * @@ -348,7 +349,7 @@ nf.GoTo = (function () { type: 'GET', url: config.urls.controller + '/process-groups/' + encodeURIComponent(selectionData.component.parentGroupId) + '/connections', dataType: 'json' -}).then(function (response) { +}).done(function (response) { var connections = response.connections; // populate the downstream dialog @@ -372,8 +373,9 @@ nf.GoTo = (function () { // show the downstream dialog $('#connections-dialog').modal('setHeaderText', 'Downstream Connections').modal('show'); -}, nf.Common.handleAjaxError); +}).fail(nf.Common.handleAjaxError); }, + /** * Shows components upstream from a processor. * @@ -386,7 +388,7 @@ nf.GoTo = (function () { type: 'GET', url: config.urls.controller + '/process-groups/' + encodeURIComponent(selectionData.component.parentGroupId) + '/connections', dataType: 'json' -}).then(function (response) { +}).done(function (response) { var connections = response.connections; // populate the upstream dialog @@ -410,8 +412,9 @@ nf.GoTo = (function () { // show the upstream dialog $('#connections-dialog').modal('setHeaderText', 'Upstream Connections').modal('show'); -}, nf.Common.handleAjaxError); +}).fail(nf.Common.handleAjaxError); }, + /** * Shows components downstream from a process group or a remote process group. * @@ -424,7 +427,7 @@ nf.GoTo = (function () { type: 'GET', url: config.urls.controller + '/process-groups/' + encodeURIComponent(selectionData.component.parentGroupId) + '/connections', dataType: 'json' -}).then(function (response) { +}).done(function (response) { var connections = response.connections; // populate the downstream dialog @@ -448,8 +451,9 @@ nf.GoTo = (function () { // show the downstream dialog $('#connections-dialog').modal('setHeaderText', 'Downstream Connections').modal('show'); -}, nf.Common.handleAjaxError); +}).fail(nf.Common.handleAjaxError); }, + /** * Shows components upstream from a process group or a remote process group. * @@ -462,7 +466,7 @@ nf.GoTo = (function () { type: 'GET', url: config.urls.controller + '/process-groups/' + encodeURIComponent(selectionData.component.parentGroupId) + '/connections', dataType: 'json' -}).then(function (response) { +}).done(function (response) { var connections = response.connections; // populate the upstream dialog @@ -486,8 +490,9 @@ nf.GoTo = (function () { // show the dialog $('#connections-dialog').modal('setHeaderText', 'Downstream Connections').modal('show'); -}, nf.Common.handleAjaxError); +}).fail(nf.Common.handleAjaxError); }, + /** * Shows components downstream from an input port. * @@ -500,7 +505,7 @@ nf.GoTo = (function () { type: 'GET', url: config.urls.controller + '/process-groups/' + encodeURIComponent(selectionData.component.parentGroupId) + '/connections', dataType: 'json' -}).then(function (response) { +}).done(function (response) { var connections = response.connections; // populate the downstream dialog @@ -524,8 +529,9 @@ nf.GoTo = (function () { // show the downstream dialog $('#connections-dialog').modal('setHeaderText', 'Downstream Connections').modal('show'); -},
[18/51] [abbrv] incubator-nifi git commit: NIFI-27: - Latest version of codemirror.
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/1d23e6e1/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/codemirror/lib/codemirror.js -- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/codemirror/lib/codemirror.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/codemirror/lib/codemirror.js deleted file mode 100755 index a085720..000 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/codemirror/lib/codemirror.js +++ /dev/null @@ -1,8488 +0,0 @@ -// This is CodeMirror (http://codemirror.net), a code editor -// implemented in JavaScript on top of the browser's DOM. -// -// You can find some technical background for some of the code below -// at http://marijnhaverbeke.nl/blog/#cm-internals . - -(function (mod) { -if (typeof exports == object typeof module == object) // CommonJS -module.exports = mod(); -else if (typeof define == function define.amd) // AMD -return define([], mod); -else // Plain browser env -this.CodeMirror = mod(); -})(function () { -use strict; - -// BROWSER SNIFFING - -// Kludges for bugs and behavior differences that can't be feature -// detected are enabled based on userAgent etc sniffing. - -var gecko = /gecko\/\d/i.test(navigator.userAgent); -// ie_uptoN means Internet Explorer version N or lower -var ie_upto10 = /MSIE \d/.test(navigator.userAgent); -var ie_upto7 = ie_upto10 (document.documentMode == null || document.documentMode 8); -var ie_upto8 = ie_upto10 (document.documentMode == null || document.documentMode 9); -var ie_upto9 = ie_upto10 (document.documentMode == null || document.documentMode 10); -var ie_11up = /Trident\/([7-9]|\d{2,})\./.test(navigator.userAgent); -var ie = ie_upto10 || ie_11up; -var webkit = /WebKit\//.test(navigator.userAgent); -var qtwebkit = webkit /Qt\/\d+\.\d+/.test(navigator.userAgent); -var chrome = /Chrome\//.test(navigator.userAgent); -var presto = /Opera\//.test(navigator.userAgent); -var safari = /Apple Computer/.test(navigator.vendor); -var khtml = /KHTML\//.test(navigator.userAgent); -var mac_geLion = /Mac OS X 1\d\D([7-9]|\d\d)\D/.test(navigator.userAgent); -var mac_geMountainLion = /Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent); -var phantom = /PhantomJS/.test(navigator.userAgent); - -var ios = /AppleWebKit/.test(navigator.userAgent) /Mobile\/\w+/.test(navigator.userAgent); -// This is woefully incomplete. Suggestions for alternative methods welcome. -var mobile = ios || /Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent); -var mac = ios || /Mac/.test(navigator.platform); -var windows = /win/i.test(navigator.platform); - -var presto_version = presto navigator.userAgent.match(/Version\/(\d*\.\d*)/); -if (presto_version) -presto_version = Number(presto_version[1]); -if (presto_version presto_version = 15) { -presto = false; -webkit = true; -} -// Some browsers use the wrong event properties to signal cmd/ctrl on OS X -var flipCtrlCmd = mac (qtwebkit || presto (presto_version == null || presto_version 12.11)); -var captureRightClick = gecko || (ie !ie_upto8); - -// Optimize some code when these features are not used. -var sawReadOnlySpans = false, sawCollapsedSpans = false; - -// EDITOR CONSTRUCTOR - -// A CodeMirror instance represents an editor. This is the object -// that user code is usually dealing with. - -function CodeMirror(place, options) { -if (!(this instanceof CodeMirror)) -return new CodeMirror(place, options); - -this.options = options = options || {}; -// Determine effective options based on given values and defaults. -for (var opt in defaults) -if (!options.hasOwnProperty(opt)) -options[opt] = defaults[opt]; -setGuttersForLineNumbers(options); - -var doc = options.value; -if (typeof doc == string) -doc = new Doc(doc, options.mode); -this.doc = doc; - -var display = this.display = new Display(place, doc); -display.wrapper.CodeMirror = this; -updateGutters(this); -themeChanged(this); -if (options.lineWrapping) -this.display.wrapper.className += CodeMirror-wrap; -if (options.autofocus !mobile) -focusInput(this); - -this.state = { -keyMaps: [], // stores maps added by addKeyMap -overlays: [], // highlighting overlays, as added by addOverlay -modeGen: 0, // bumped when mode/overlay changes, used to invalidate highlighting info -overwrite: false, focused: false, -suppressEdits: false, // used to
[46/51] [abbrv] incubator-nifi git commit: NIFI-27: - Reverting to a slightly old version of minicolors to do issues compressing the css in the latests version.
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/a016bf47/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/minicolors/jquery.minicolors.css -- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/minicolors/jquery.minicolors.css b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/minicolors/jquery.minicolors.css index 91363b8..cdf4ae4 100755 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/minicolors/jquery.minicolors.css +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/minicolors/jquery.minicolors.css @@ -1,269 +1,259 @@ .minicolors { -position: relative; -} - -.minicolors-sprite { -background-image: url(data:image/png;base64,iVBORw0KGgoNSUhEUgAAA2YAAACWCAYAAAC1r5t6AAEuWklEQVR42uz9a8xt25YVhrU+1ner7qseLiEjhERwfkDFeWAEl6dCQcAUCBDCwUSJwg+jRPIzgGVZMcZ2DCKyIycxiSOi2JbMr8hBgFNVGKNAHgKCTBnbUYCYEsHYIoiKKuYW9zzu2XvP0fNjjUfrbfQx5/r23ufWPnX2PvrOWmvOueYc87HmHG201luzv/GzvstvVmG4/3N39H8GAwzAnASHw8zgDpjRdAcOFPz0v/J1mvrm/374h3+48Oevfe1rOh/PnF/xdv+5TvgLf+EvLAv9vJ/38/ATsdzP/bk/l9tZ6c/l/XEyr8/3B9ZT3X07r/1hM/04+U62XW1X2ka/X9Rn63l0e33fHmnLbtvhONOxqiffw9m+9HW4+9h+X87dR5vbv4M+11prHW/mP3/16lU9jqO+fPnSP/nkk/rxxx/XDz74oP7Yj/2Y/8iP/Ej9F/7l/8lLfAXAVwB8mV75L5v26LwvAh8X4EMAHwH40O9//P5Dm58/wn3ZD/pnu7//AMA3APw4gB9ty8GSX++Y9iXAfyqA7wbsOwH/jtYg/vvquiP+ZcC+StO+dJ+GrwDHF+4N+tCBj+3+NxrdduJjzJ3t0z+k6R+01w8B/B0AXwfwX2R3H6AA+J7291UAX4Xjq7DldH0Fjq/A8GV425v7+/s00PRxSnDDJ9TQj0ejDB/D23RrO+Ft+n3+R+F17tQ32s58HUCFHzWen7d9p7Zv0cre6rZ+QnbwJ6AZ9MVnrGMu2t+tX7bvKOnPNnz+0sl96er+9kWEX8ZH9P7Di/f9l6D3q/9ve3/+7zsB/FQA39Xef0f71ev9Sm/U8U4Qpr26xR3Iduijzfv++QO6Z32j3av+Nj3N6N+3Afi72x58B7X4q9JCPkVfkcOfff42AMCLTcO1w Wdn7IPkfvW3743/o2/xB/cE4MmAL2D+PXl7tfv78NrmP9F3nxy4GQ5zvALwCoYDwCsAB7y9WpvnOML87LUv4+174/NT+/xLDthX27LffwD/JV0n/+n65zbw1w7Yn2yfv3HA/lzb5qtX67bHfvB613Va2O/dsXA8wfAExxOAG9A+zwP7BThusPYKfAEWTxIcX2jffUuXwk/HJ4DX/S3PLZ9mhMh6z8YNZvZWnwx//s//+bf9pHkHnlzfun+1VrRr8VFAspvn1Ol/k/U8GwwlgITbA26btNN3856zzBusiwYunHsOBsDatPQzvS9t/8PASfbq7n1Zb5/HX1/mOI7Spo1lGhDDcRx49eoVXr165S9fvsSLFy/w4sUL//jjj/HBBx/gx3/8x/G3/tbf8h/5kR95rLeU/HkG7elMO51Zr3rhbQ6uzRejASNr/7PWHitJG4v27qwt2E6LtVcvbXppG7f1z6gxTt+1Ns/ae8fcsOkdSXbGbV3Ozu9i/aKZLbOweAm7baMza2NJH9+6z3VaJ+9zRLVlLD2/c35hrONbDofXdujaOeFu9iP99dNlfF3Q274/H2P4g0N2vj56rnbkdcCNt2vmbQKr1wJZ/bo9+/JunofB3kfPtS/fr3Qtzp/uuJD1D8uPJv6Q9Admj/UoXL6S/Yz7342ac3u4m9c7j7dkB3jndjvzGsPPdvEH2oki72u+B9miu9XuDr8/66J+ZGcgF8kNsNs8O3Z8nrqSX76PVuL77jjafmMjb34RYF+6vy/hmVPGrzBekbW93h/5Tsv572xn5EMAf76dgz8K4McA/F/akORHn4eD/XQfV5VfS+/ZKC0We5qzwzGuewPwN98q8Pna175mb8iQfa6BGTOgz1yWAUJpAxHt8rC3ts0z4IJ9l9Toe/UChNtVm2jesm1337alzSsEVvV54SfgqzSGq7ehgypdDjTNGtgO66O/oy/XAJe5u7XXDsxqm4fjOFBrtfbeXr16Za9evS ovX770Fy9e+CeffGLf/OY38eGHH9o3vvEN+/rXv24/+qM/ih/7sR8zz35JHVBhgiG+XVwCNY8Ard7HelB9351Huw110BZm2WwPdn1Wz3p5Gb52mZ5darxTm1uNKyponVjfdfapk+s21+2vdxuzDn7aJ0sOgtOrJ03vc9bT760rzHN17CTrLIn0wufjxNu+ejsvxnvRgLC5w3UPze64tnfPra+HwG77yfK6nbv5xmOTNpFCmN1b5APOTqjHx7kddeNz5+OaXLbL63I0lYrPdVGb5jctXHtm/Vje97t42HRsedj8fVvG5JVbU8vMTYz9Nx6c9fBrsAC6+8CHj9/tvP9mR65dTeZ0PzEB0u1Y+Bxc6Oc4rL8kIxY7sGXJz1e/43t87gkgQ7Jq7bDqwMrTQ7/mpw2oKEmDffcYze9VdoJfrnYo25myh5ZFxsjKCVQ6G5/yizvfeWOxOStlDtZZaeDsJ3038osAfjaA7wfwXwHs1wL2RYN9l4VBuzscm09GC5KhOI9BmY/391cf593hXynwX9GA269og3xftzsp/e8C+MsA/k8A/l+NEv3JCMy+C7B6/sMcd2JbAVlY9u0Ds0/hF/B5ZMweAUV6p/LnAK8N8HkEZIHATxhT6+vsQFAAFOi7fTmTZXwDNHcADFfATJfj7XFb5HvhcwNObmaF2KxKoCoFZg2QIQNpDYDd7pPqYMRqrf3vrmM8Dj+Ow2ut3hiy2l7tOA57+fIl2l/55JNP8PHHH/sHH3yAv/N3/g5+/Md/HF//+tf9gw8+CEM5jgmsLMMw9NkSMLaAMwJmFe2VcElt/TCvE7ghYdX4SnbIIL7vrhJPAFRNgJogSdR7Q8YOtmnmQOWdcfoqIcoOzsJ7BmXc+b1mRjJQtVLMVR6a1s7rBBQV3qZ7W+ZoU/qjtT+OK33LCbx56JjPLncEgsbAFkYsr7ULAksXv19vlad1YC1gbZDZnowYeNjyipEds9PvK4BFwMtzG3RnAN8 exzbGaTUaW54jCR0c3XcnwuJ5Mce23MHs/cfhPNDQLruJeH2AngD4x2/Hm5CmL9v2k7oK7tbOu9GPOIP30pfwDjh9gfV92GACQKdDwmebAKj7OMbekLShtvtCO07KkFny2RJEgAQ1IQcndgF7rv60OSck04aWKgnytM10CPjwPclkZ0OeJ0RdETrwtoeWJVnMNntjD+DB65254jIZiLH6oRBr9uonW3fxSwD+mwB+PYBfDdjPLiioA3yZ3NXX1yqMGT8huYNnBNBW9iy+lvuT5rsNjgL/h+rc4n8C4E8A+CEAfxZ3bf1PEmBm38nDZ3l3vJjchHyzrH0WgNR7YLYCsvPBpmsQtrtX+gMMmm9A2hlQ8k27+Dm2kwyeMmEbIHYGzFy27y49DmLTOnM11snAirY/ANYdazqfS+/va63eARsDtVpr6V9qrBg6GOt/r1696sAMx3F4B2QvXryoL168wMuXL8vLly/x0Ucf+QcffIBvfOMb+MY3voEPPvjAP/roI0LPiKUhZ4jAG4hSfFMnGGNpY/UJyjrBUQnP9PkO6m9b7P+5EmGgJ0NKUFnojId7njPwYtAm83ln7ADqrTW2s2QdpNUVhDnp91xqbnB2711/UFcAbf3z8YD0AMYqFTs6jXdmpagd3jHn4QKpnDrWHrvZdc67E1Se7KqFNclNIDkez1ANnM7ziy9Zun09Ab5dIBvwum6pL8v7+Q65zs9Y2mQFvrK+ft7ITTv8ep927dqdFd+dKT8HD0qOnNE02yfcvnUZaDhTTKqU8RyYMZR5RL6oSNOxlfj5BRjDBshmgIx3Kvl3S1b1iKr0SmH6WBcF+ZZNQJkpWHt79UQ/wf++DcAvBPDfAezXGexn3ve0DPjTQdmUJzJL1sGYEdiyFJA5saGRQWP2LANnE6D5+OwowPdW1O8F8NsN/tcA/2MA/g8A/n0ALz/jwOyr8ZdoOx1u6GoDKmH47ACpt7q+d8noI1vuww8/3B6HM5Dz
[10/51] [abbrv] incubator-nifi git commit: NIFI-27: - Latest version of slickgrid.
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4c959f72/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/slickgrid/slick.grid.js -- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/slickgrid/slick.grid.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/slickgrid/slick.grid.js index b4a2d7d..c12bae9 100755 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/slickgrid/slick.grid.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/slickgrid/slick.grid.js @@ -1,2832 +1,3422 @@ -/** - * @license - * (c) 2009-2012 Michael Leibman - * michael{dot}leibman{at}gmail{dot}com - * http://github.com/mleibman/slickgrid - * - * Distributed under MIT license. - * All rights reserved. - * - * SlickGrid v2.0 - * - * NOTES: - * Cell/row DOM manipulations are done directly bypassing jQuery's DOM manipulation methods. - * This increases the speed dramatically, but can only be done safely because there are no event handlers - * or data associated with any cell/row DOM nodes. Cell editors must make sure they implement .destroy() - * and do proper cleanup. - */ - -// make sure required JavaScript modules are loaded -if (typeof jQuery === undefined) { -throw SlickGrid requires jquery module to be loaded; -} -if (!jQuery.fn.drag) { -throw SlickGrid requires jquery.event.drag module to be loaded; -} -if (typeof Slick === undefined) { -throw slick.core.js not loaded; -} - - -(function ($) { -// Slick.Grid -$.extend(true, window, { -Slick: { -Grid: SlickGrid -} -}); - -// shared across all grids on the page -var scrollbarDimensions; -var maxSupportedCssHeight; // browser's breaking point - - // -// SlickGrid class implementation (available as Slick.Grid) - -/** - * Creates a new instance of the grid. - * @class SlickGrid - * @constructor - * @param {Node} container Container node to create the grid in. - * @param {Array,Object} dataAn array of objects for databinding. - * @param {Array} columns An array of column definitions. - * @param {Object}options Grid options. - **/ -function SlickGrid(container, data, columns, options) { -// settings -var defaults = { -explicitInitialization: false, -rowHeight: 25, -defaultColumnWidth: 80, -enableAddRow: false, -leaveSpaceForNewRows: false, -editable: false, -autoEdit: true, -enableCellNavigation: true, -enableColumnReorder: true, -asyncEditorLoading: false, -asyncEditorLoadDelay: 100, -forceFitColumns: false, -enableAsyncPostRender: false, -asyncPostRenderDelay: 60, -autoHeight: false, -editorLock: Slick.GlobalEditorLock, -showHeaderRow: false, -headerRowHeight: 25, -showTopPanel: false, -topPanelHeight: 25, -formatterFactory: null, -editorFactory: null, -cellFlashingCssClass: flashing, -selectedCellCssClass: selected, -multiSelect: true, -enableTextSelectionOnCells: false, -dataItemColumnValueExtractor: null, -fullWidthRows: false, -multiColumnSort: false, -defaultFormatter: defaultFormatter -}; - -var columnDefaults = { -name: , -resizable: true, -sortable: false, -minWidth: 30, -rerenderOnResize: false, -headerCssClass: null -}; - -// scroller -var th; // virtual height -var h;// real scrollable height -var ph; // page height -var n;// number of pages -var cj; // jumpiness coefficient - -var page = 0; // current page -var offset = 0; // current page offset -var scrollDir = 1; - -// private -var initialized = false; -var $container; -var uid = slickgrid_ + Math.round(100 * Math.random()); -var self = this; -var $focusSink; -var $headerScroller; -var $headers; -var $headerRow, $headerRowScroller; -var $topPanelScroller; -var $topPanel; -var $viewport; -var $canvas; -var $style; -var stylesheet, columnCssRulesL, columnCssRulesR; -var viewportH, viewportW; -var canvasWidth; -var viewportHasHScroll, viewportHasVScroll; -var
[14/51] [abbrv] incubator-nifi git commit: NIFI-27: - Latest version of slickgrid.
NIFI-27: - Latest version of slickgrid. Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/4c959f72 Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/4c959f72 Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/4c959f72 Branch: refs/heads/NIFI-169 Commit: 4c959f72988d13dc2ff54d38eb9efc4682d5b901 Parents: 658131d Author: Matt Gilman matt.c.gil...@gmail.com Authored: Wed Dec 10 10:12:43 2014 -0500 Committer: Matt Gilman matt.c.gil...@gmail.com Committed: Wed Dec 10 14:36:34 2014 -0500 -- .../src/main/webapp/WEB-INF/pages/canvas.jsp|2 +- .../src/main/webapp/WEB-INF/pages/cluster.jsp |2 +- .../src/main/webapp/WEB-INF/pages/counters.jsp |2 +- .../src/main/webapp/WEB-INF/pages/history.jsp |2 +- .../main/webapp/WEB-INF/pages/provenance.jsp|2 +- .../src/main/webapp/WEB-INF/pages/summary.jsp |2 +- .../src/main/webapp/WEB-INF/pages/templates.jsp |2 +- .../src/main/webapp/WEB-INF/pages/users.jsp |2 +- .../js/jquery/jquery.event.drag-2.0.min.js | 194 - .../js/jquery/jquery.event.drag-2.2.min.js |6 + .../webapp/js/jquery/slickgrid/MIT-LICENSE.txt | 20 + .../js/jquery/slickgrid/css/images/collapse.gif | Bin 0 - 846 bytes .../js/jquery/slickgrid/css/images/expand.gif | Bin 0 - 851 bytes .../slickgrid/css/slick-default-theme.css | 68 +- .../js/jquery/slickgrid/css/slick.grid.css | 173 +- .../slickgrid/plugins/slick.autotooltips.js | 121 +- .../plugins/slick.cellrangedecorator.js | 110 +- .../plugins/slick.cellrangeselector.js | 194 +- .../plugins/slick.cellselectionmodel.js | 210 +- .../plugins/slick.rowselectionmodel.js | 325 +- .../webapp/js/jquery/slickgrid/slick.core.js| 796 +-- .../js/jquery/slickgrid/slick.dataview.js | 1920 +++--- .../webapp/js/jquery/slickgrid/slick.editors.js | 994 +-- .../js/jquery/slickgrid/slick.formatters.js | 86 +- .../webapp/js/jquery/slickgrid/slick.grid.js| 6254 ++ 25 files changed, 6144 insertions(+), 5343 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4c959f72/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/WEB-INF/pages/canvas.jsp -- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/WEB-INF/pages/canvas.jsp b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/WEB-INF/pages/canvas.jsp index c8f2ff7..09c8207 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/WEB-INF/pages/canvas.jsp +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/WEB-INF/pages/canvas.jsp @@ -48,7 +48,7 @@ script type=text/javascript src=js/jquery/modal/jquery.modal.js?${project.version}/script script type=text/javascript src=js/jquery/minicolors/jquery.minicolors.min.js/script script type=text/javascript src=js/jquery/qtip2/jquery.qtip.min.js/script -script type=text/javascript src=js/jquery/jquery.event.drag-2.0.min.js/script +script type=text/javascript src=js/jquery/jquery.event.drag-2.2.min.js/script script type=text/javascript src=js/jquery/slickgrid/plugins/slick.cellrangeselector.js/script script type=text/javascript src=js/jquery/slickgrid/plugins/slick.cellselectionmodel.js/script script type=text/javascript src=js/jquery/slickgrid/plugins/slick.rowselectionmodel.js/script http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4c959f72/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/WEB-INF/pages/cluster.jsp -- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/WEB-INF/pages/cluster.jsp b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/WEB-INF/pages/cluster.jsp index e3e7b86..a0bda24 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/WEB-INF/pages/cluster.jsp +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/WEB-INF/pages/cluster.jsp @@ -36,7 +36,7 @@ script type=text/javascript src=js/jquery/jquery.each.js/script script type=text/javascript src=js/jquery/jquery-ui-1.8.10.custom.min.js/script script type=text/javascript src=js/jquery/qtip2/jquery.qtip.min.js/script -script type=text/javascript src=js/jquery/jquery.event.drag-2.0.min.js/script +script type=text/javascript src=js/jquery/jquery.event.drag-2.2.min.js/script script type=text/javascript
[24/51] [abbrv] incubator-nifi git commit: NIFI-27: - Starting to upgrade jQuery and jQuery UI.
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/71e53ae5/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/ui-smoothness/jquery-ui-1.10.4.min.js -- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/ui-smoothness/jquery-ui-1.10.4.min.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/ui-smoothness/jquery-ui-1.10.4.min.js new file mode 100755 index 000..df6064c --- /dev/null +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/ui-smoothness/jquery-ui-1.10.4.min.js @@ -0,0 +1,7 @@ +/*! jQuery UI - v1.10.4 - 2014-12-08 +* http://jqueryui.com +* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.menu.js, jquery.ui.progressbar.js, jquery.ui.slider.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js, jquery.ui.effect.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js +* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */ + +(function(e,t){function i(t,i){var n,a,o,r=t.nodeName.toLowerCase();returnarea===r?(n=t.parentNode,a=n.name,t.hrefamap===n.nodeName.toLowerCase()?(o=e(img[usemap=#+a+])[0],!!os(o)):!1):(/input|select|textarea|button|object/.test(r)?!t.disabled:a===r?t.href||i:i)s(t)}function s(t){return e.expr.filters.visible(t)!e(t).parents().addBack().filter(function(){returnhidden===e.css(this,visibility)}).length}var n=0,a=/^ui-id-\d+$/;e.ui=e.ui||{},e.extend(e.ui,{version:1.10.4,keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({focus:function(t){return function(i,s){returnnumber==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),ss.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),scrollParent:function(){var t; return t=e.ui.ie/(static|relative)/.test(this.css(position))||/absolute/.test(this.css(position))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,position))/(auto|scroll)/.test(e.css(this,overflow)+e.css(this,overflow-y)+e.css(this,overflow-x))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,overflow)+e.css(this,overflow-y)+e.css(this,overflow-x))}).eq(0),/fixed/.test(this.css(position))||!t.length?e(document):t},zIndex:function(i){if(i!==t)return this.css(zIndex,i);if(this.length)for(var s,n,a=e(this[0]);a.lengtha[0]!==document;){if(s=a.css(position),(absolute===s||relative===s||fixed===s)(n=parseInt(a.css(zIndex),10),!isNaN(n)0!==n))return n;a=a.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id=ui-id-+ ++n)})},removeUniqueId:function(){return this.each(function(){a.test(this.id)e(this).removeAttr(id)})}}),e.extend(e.expr[:],{data:e. expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,s){return!!e.data(t,s[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,tabindex)))},tabbable:function(t){var s=e.attr(t,tabindex),n=isNaN(s);return(n||s=0)i(t,!n)}}),e(a).outerWidth(1).jquery||e.each([Width,Height],function(i,s){function n(t,i,s,n){return e.each(a,function(){i-=parseFloat(e.css(t,padding+this))||0,s(i-=parseFloat(e.css(t,border+this+Width))||0),n(i-=parseFloat(e.css(t,margin+this))||0)}),i}var a=Width===s?[Left,Right]:[Top,Bottom],o=s.toLowerCase(),r={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn[inner+s]=function(i){return i===t?r[inner+s].call(this):this.each(function(){e(this).css(o,n(this,i)+px)})},e.fn[outer+s]=function(t,i){returnnumber!=typeof t?r[outer+s].call(this,t):this.each(function(){e(this).css(o,n(this,t,!0,i)+px)})}}),e.f n.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e(a).data(a-b,a).removeData(a-b).data(a-b)(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.support.selectstart=onselectstartin
[23/51] [abbrv] incubator-nifi git commit: NIFI-27: - Starting to upgrade jQuery and jQuery UI.
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/71e53ae5/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-search.js -- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-search.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-search.js index a9d8d27..c1c4117 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-search.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-search.js @@ -32,25 +32,15 @@ nf.Search = (function () { reset: function () { this.term = null; }, -_response: function (content) { -if (!this.options.disabled content) { -this._suggest(content); -this._trigger('open'); -} else { -this.close(); -} -this.pending--; -if (!this.pending) { -this.element.removeClass('ui-autocomplete-loading'); -} -}, _resizeMenu: function () { var ul = this.menu.element; ul.width(399); }, _renderMenu: function (ul, items) { var self = this; -var searchResults = items.searchResultsDTO; + +// the object that holds the search results is normalized into a single element array +var searchResults = items[0]; // show all processors if (!nf.Common.isEmpty(searchResults.processorResults)) { @@ -118,12 +108,13 @@ nf.Search = (function () { $.each(match.matches, function (i, match) { itemContent.append($('div class=search-match/div').text(match)); }); -return $('li/li').data('item.autocomplete', match).append(itemContent).appendTo(ul); +return $('li/li').data('ui-autocomplete-item', match).append(itemContent).appendTo(ul); } }); // configure the search field $('#search-field').zIndex(1250).searchAutocomplete({ +appendTo: '#search-flow-results', position: { my: 'right top', at: 'right bottom',
[02/51] [abbrv] incubator-nifi git commit: NIFI-27: - Latest version of qtip2.
NIFI-27: - Latest version of qtip2. Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/57b4178f Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/57b4178f Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/57b4178f Branch: refs/heads/NIFI-169 Commit: 57b4178f19960bb4359d79f462c6e790e3e8f1a1 Parents: f60a97b Author: Matt Gilman matt.c.gil...@gmail.com Authored: Wed Dec 10 08:35:31 2014 -0500 Committer: Matt Gilman matt.c.gil...@gmail.com Committed: Wed Dec 10 12:19:26 2014 -0500 -- .../webapp/WEB-INF/pages/bulletin-board.jsp | 2 +- .../src/main/webapp/WEB-INF/pages/canvas.jsp| 2 +- .../src/main/webapp/WEB-INF/pages/cluster.jsp | 2 +- .../src/main/webapp/WEB-INF/pages/counters.jsp | 2 +- .../src/main/webapp/WEB-INF/pages/history.jsp | 2 +- .../main/webapp/WEB-INF/pages/provenance.jsp| 2 +- .../src/main/webapp/WEB-INF/pages/summary.jsp | 2 +- .../src/main/webapp/WEB-INF/pages/templates.jsp | 2 +- .../src/main/webapp/WEB-INF/pages/users.jsp | 2 +- .../main/webapp/js/jquery/qtip2/jquery.qtip.css | 557 --- .../webapp/js/jquery/qtip2/jquery.qtip.min.css | 3 + .../webapp/js/jquery/qtip2/jquery.qtip.min.js | 711 +-- 12 files changed, 17 insertions(+), 1272 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/57b4178f/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/WEB-INF/pages/bulletin-board.jsp -- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/WEB-INF/pages/bulletin-board.jsp b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/WEB-INF/pages/bulletin-board.jsp index 8669f6c..083862d 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/WEB-INF/pages/bulletin-board.jsp +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/WEB-INF/pages/bulletin-board.jsp @@ -24,7 +24,7 @@ ${nf.bulletin.board.style.tags} link rel=stylesheet href=js/jquery/combo/jquery.combo.css?${project.version} type=text/css / link rel=stylesheet href=js/jquery/modal/jquery.modal.css?${project.version} type=text/css / -link rel=stylesheet href=js/jquery/qtip2/jquery.qtip.css? type=text/css / +link rel=stylesheet href=js/jquery/qtip2/jquery.qtip.min.css? type=text/css / link rel=stylesheet href=js/jquery/css/smoothness/jquery-ui-1.8.10.custom.css type=text/css / script type=text/javascript src=js/jquery/jquery-1.7.min.js/script script type=text/javascript src=js/jquery/jquery.center.js/script http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/57b4178f/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/WEB-INF/pages/canvas.jsp -- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/WEB-INF/pages/canvas.jsp b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/WEB-INF/pages/canvas.jsp index acdd147..c8f2ff7 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/WEB-INF/pages/canvas.jsp +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/WEB-INF/pages/canvas.jsp @@ -28,7 +28,7 @@ link rel=stylesheet href=js/jquery/tabbs/jquery.tabbs.css?${project.version} type=text/css / link rel=stylesheet href=js/jquery/combo/jquery.combo.css?${project.version} type=text/css / link rel=stylesheet href=js/jquery/modal/jquery.modal.css?${project.version} type=text/css / -link rel=stylesheet href=js/jquery/qtip2/jquery.qtip.css? type=text/css / +link rel=stylesheet href=js/jquery/qtip2/jquery.qtip.min.css? type=text/css / link rel=stylesheet href=js/jquery/css/smoothness/jquery-ui-1.8.10.custom.css type=text/css / link rel=stylesheet href=js/jquery/minicolors/jquery.minicolors.css type=text/css / link rel=stylesheet href=js/jquery/slickgrid/css/slick.grid.css type=text/css / http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/57b4178f/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/WEB-INF/pages/cluster.jsp -- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/WEB-INF/pages/cluster.jsp b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/WEB-INF/pages/cluster.jsp index 33fdbb0..e3e7b86 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/WEB-INF/pages/cluster.jsp +++
[34/51] [abbrv] incubator-nifi git commit: NIFI-27: - Better result normalization. - Updated styles.
NIFI-27: - Better result normalization. - Updated styles. Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/d307a13c Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/d307a13c Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/d307a13c Branch: refs/heads/NIFI-169 Commit: d307a13c5d4610dd3aa8bdeacab850725bedeb7d Parents: 68e0898 Author: Matt Gilman matt.c.gil...@gmail.com Authored: Fri Dec 12 10:37:02 2014 -0500 Committer: Matt Gilman matt.c.gil...@gmail.com Committed: Fri Dec 12 10:37:02 2014 -0500 -- .../framework/web/nifi-web-ui/src/main/webapp/css/header.css | 1 + .../web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-search.js | 7 ++- 2 files changed, 7 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/d307a13c/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/css/header.css -- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/css/header.css b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/css/header.css index 6b096a1..0f08b47 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/css/header.css +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/css/header.css @@ -456,6 +456,7 @@ input.search-flow { overflow: auto; border: 1px solid #aa; z-index: 1251; +border-radius: 0; } #search-flow-results .ui-menu .ui-menu-item a.ui-state-focus { http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/d307a13c/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-search.js -- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-search.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-search.js index c1c4117..2016721 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-search.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-search.js @@ -36,6 +36,11 @@ nf.Search = (function () { var ul = this.menu.element; ul.width(399); }, +_normalize: function(searchResults) { +var items = []; +items.push(searchResults); +return items; +}, _renderMenu: function (ul, items) { var self = this; @@ -130,7 +135,7 @@ nf.Search = (function () { dataType: 'json', url: config.urls.search }).done(function (searchResponse) { -response(searchResponse); +response(searchResponse.searchResultsDTO); }); }, select: function (event, ui) {
[12/51] [abbrv] incubator-nifi git commit: NIFI-27: - Latest version of slickgrid.
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4c959f72/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/slickgrid/slick.dataview.js -- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/slickgrid/slick.dataview.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/slickgrid/slick.dataview.js index 07f5900..f1c1b5e 100755 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/slickgrid/slick.dataview.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/slickgrid/slick.dataview.js @@ -1,914 +1,1126 @@ (function ($) { -$.extend(true, window, { -Slick: { -Data: { -DataView: DataView, -Aggregators: { -Avg: AvgAggregator, -Min: MinAggregator, -Max: MaxAggregator, -Sum: SumAggregator -} -} + $.extend(true, window, { +Slick: { + Data: { +DataView: DataView, +Aggregators: { + Avg: AvgAggregator, + Min: MinAggregator, + Max: MaxAggregator, + Sum: SumAggregator } -}); - + } +} + }); + + + /*** + * A sample Model implementation. + * Provides a filtered view of the underlying data. + * + * Relies on the data item having an id property uniquely identifying it. + */ + function DataView(options) { +var self = this; + +var defaults = { + groupItemMetadataProvider: null, + inlineFilters: false +}; + + +// private +var idProperty = id; // property holding a unique row id +var items = []; // data by index +var rows = []; // data by row +var idxById = {}; // indexes by id +var rowsById = null;// rows by id; lazy-calculated +var filter = null; // filter function +var updated = null; // updated item ids +var suspend = false;// suspends the recalculation +var sortAsc = true; +var fastSortField; +var sortComparer; +var refreshHints = {}; +var prevRefreshHints = {}; +var filterArgs; +var filteredItems = []; +var compiledFilter; +var compiledFilterWithCaching; +var filterCache = []; + +// grouping +var groupingInfoDefaults = { + getter: null, + formatter: null, + comparer: function(a, b) { return a.value - b.value; }, + predefinedValues: [], + aggregators: [], + aggregateEmpty: false, + aggregateCollapsed: false, + aggregateChildGroups: false, + collapsed: false, + displayTotalsRow: true, + lazyTotalsCalculation: false +}; +var groupingInfos = []; +var groups = []; +var toggledGroupsByLevel = []; +var groupingDelimiter = ':|:'; + +var pagesize = 0; +var pagenum = 0; +var totalRows = 0; + +// events +var onRowCountChanged = new Slick.Event(); +var onRowsChanged = new Slick.Event(); +var onPagingInfoChanged = new Slick.Event(); + +options = $.extend(true, {}, defaults, options); + + +function beginUpdate() { + suspend = true; +} + +function endUpdate() { + suspend = false; + refresh(); +} + +function setRefreshHints(hints) { + refreshHints = hints; +} + +function setFilterArgs(args) { + filterArgs = args; +} + +function updateIdxById(startingIndex) { + startingIndex = startingIndex || 0; + var id; + for (var i = startingIndex, l = items.length; i l; i++) { +id = items[i][idProperty]; +if (id === undefined) { + throw Each data element must implement a unique 'id' property; +} +idxById[id] = i; + } +} + +function ensureIdUniqueness() { + var id; + for (var i = 0, l = items.length; i l; i++) { +id = items[i][idProperty]; +if (id === undefined || idxById[id] !== i) { + throw Each data element must implement a unique 'id' property; +} + } +} + +function getItems() { + return items; +} + +function setItems(data, objectIdProperty) { + if (objectIdProperty !== undefined) { +idProperty = objectIdProperty; + } + items = filteredItems = data; + idxById = {}; + updateIdxById(); + ensureIdUniqueness(); + refresh(); +} + +function setPagingOptions(args) { + if (args.pageSize != undefined) { +pagesize = args.pageSize; +pagenum = pagesize ? Math.min(pagenum, Math.max(0, Math.ceil(totalRows / pagesize) - 1)) : 0; + } + + if (args.pageNum != undefined) { +pagenum = Math.min(args.pageNum, Math.max(0, Math.ceil(totalRows / pagesize) - 1)); + } + + onPagingInfoChanged.notify(getPagingInfo(),
[25/51] [abbrv] incubator-nifi git commit: NIFI-27: - Starting to upgrade jQuery and jQuery UI.
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/71e53ae5/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/ui-smoothness/jquery-ui-1.10.4.min.css -- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/ui-smoothness/jquery-ui-1.10.4.min.css b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/ui-smoothness/jquery-ui-1.10.4.min.css new file mode 100755 index 000..1aa929c --- /dev/null +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/ui-smoothness/jquery-ui-1.10.4.min.css @@ -0,0 +1,7 @@ +/*! jQuery UI - v1.10.4 - 2014-12-11 +* http://jqueryui.com +* Includes: jquery.ui.core.css, jquery.ui.resizable.css, jquery.ui.selectable.css, jquery.ui.accordion.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.datepicker.css, jquery.ui.dialog.css, jquery.ui.menu.css, jquery.ui.progressbar.css, jquery.ui.slider.css, jquery.ui.spinner.css, jquery.ui.tabs.css, jquery.ui.tooltip.css, jquery.ui.theme.css +* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana%2CArial%2Csans-seriffwDefault=normalfsDefault=1.1emcornerRadius=4pxbgColorHeader=ccbgTextureHeader=highlight_softbgImgOpacityHeader=75borderColorHeader=aafcHeader=22iconColorHeader=22bgColorContent=ffbgTextureContent=flatbgImgOpacityContent=75borderColorContent=aafcContent=22iconColorContent=22bgColorDefault=e6e6e6bgTextureDefault=glassbgImgOpacityDefault=75borderColorDefault=d3d3d3fcDefault=55iconColorDefault=88bgColorHover=dadadabgTextureHover=glassbgImgOpacityHover=75borderColorHover=99fcHover=212121iconColorHover=454545bgColorActive=ffbgTextureActive=glassbgImgOpacityActive=65borderColorActive=aafcActive=212121iconColorActive=454545bgColorHighlight=fbf9eebgTextureHighlight=glassbgImgOpacityHighlight=55borderColorHighlight=fcefa1fcHighlight=363636iconColorHighlight=2e83ffbgColorError=fef1ecbgTextureE rror=glassbgImgOpacityError=95borderColorError=cd0a0afcError=cd0a0aiconColorError=cd0a0abgColorOverlay=aabgTextureOverlay=flatbgImgOpacityOverlay=0opacityOverlay=30bgColorShadow=aabgTextureShadow=flatbgImgOpacityShadow=0opacityShadow=30thicknessShadow=8pxoffsetTopShadow=-8pxoffsetLeftShadow=-8pxcornerRadiusShadow=8px +* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */ + +.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:;display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-9px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:0.1px;display:block}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-re sizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin-top:2px;padding:.5em .5em .5em .7em;min-height:0}.ui-accordion .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-noicons{padding-left:.7em}.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-acc ordion-header .ui-accordion-header-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em
[43/51] [abbrv] incubator-nifi git commit: NIFI-27: - Upgrading jQuery and jQuery UI. - Updating autocomplete as appropriate. - Restoring line returns between methods.
NIFI-27: - Upgrading jQuery and jQuery UI. - Updating autocomplete as appropriate. - Restoring line returns between methods. Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/888d1baf Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/888d1baf Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/888d1baf Branch: refs/heads/NIFI-169 Commit: 888d1bafc784e6052b14c4e35f1e1c63c246f743 Parents: 2965258 Author: Matt Gilman matt.c.gil...@gmail.com Authored: Tue Dec 16 09:40:56 2014 -0500 Committer: Matt Gilman matt.c.gil...@gmail.com Committed: Tue Dec 16 09:40:56 2014 -0500 -- .../src/main/webapp/WEB-INF/jsp/worksheet.jsp | 33 +- .../ui/src/main/webapp/css/main.css | 17 - .../ui/src/main/webapp/css/reset.css| 59 - .../ui/src/main/webapp/js/application.js| 67 ++-- 4 files changed, 80 insertions(+), 96 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/888d1baf/nar-bundles/update-attribute-bundle/ui/src/main/webapp/WEB-INF/jsp/worksheet.jsp -- diff --git a/nar-bundles/update-attribute-bundle/ui/src/main/webapp/WEB-INF/jsp/worksheet.jsp b/nar-bundles/update-attribute-bundle/ui/src/main/webapp/WEB-INF/jsp/worksheet.jsp index e882030..3c32299 100644 --- a/nar-bundles/update-attribute-bundle/ui/src/main/webapp/WEB-INF/jsp/worksheet.jsp +++ b/nar-bundles/update-attribute-bundle/ui/src/main/webapp/WEB-INF/jsp/worksheet.jsp @@ -19,17 +19,29 @@ html head meta http-equiv=Content-Type content=text/html; charset=UTF-8 -script type=text/javascript src=../nifi/js/jquery/jquery-1.7.min.js/script +link rel=stylesheet href=../nifi/js/jquery/ui-smoothness/jquery-ui-1.10.4.min.css type=text/css / +link rel=stylesheet href=../nifi/js/jquery/slickgrid/css/slick.grid.css type=text/css / +link rel=stylesheet href=../nifi/js/jquery/slickgrid/css/slick-default-theme.css type=text/css / +link rel=stylesheet href=../nifi/js/jquery/modal/jquery.modal.css type=text/css / +link rel=stylesheet href=../nifi/js/jquery/combo/jquery.combo.css type=text/css / +link rel=stylesheet href=../nifi/js/jquery/qtip2/jquery.qtip.min.css type=text/css / +link rel=stylesheet href=../nifi/js/codemirror/lib/codemirror.css type=text/css / +link rel=stylesheet href=../nifi/js/codemirror/addon/hint/show-hint.css type=text/css / +link rel=stylesheet href=../nifi/js/jquery/nfeditor/jquery.nfeditor.css type=text/css / +link rel=stylesheet href=../nifi/css/reset.css type=text/css / +link rel=stylesheet href=css/main.css type=text/css / +script type=text/javascript src=../nifi/js/jquery/jquery-2.1.1.min.js/script +script src=http://code.jquery.com/jquery-migrate-1.2.1.js;/script script type=text/javascript src=../nifi/js/jquery/jquery.center.js/script script type=text/javascript src=../nifi/js/jquery/jquery.each.js/script script type=text/javascript src=../nifi/js/jquery/jquery.tab.js/script script type=text/javascript src=../nifi/js/jquery/modal/jquery.modal.js/script script type=text/javascript src=../nifi/js/jquery/combo/jquery.combo.js/script script type=text/javascript src=../nifi/js/jquery/jquery.ellipsis.js/script -script type=text/javascript src=../nifi/js/jquery/jquery-ui-1.8.10.custom.min.js/script +script type=text/javascript src=../nifi/js/jquery/ui-smoothness/jquery-ui-1.10.4.min.js/script script type=text/javascript src=../nifi/js/jquery/qtip2/jquery.qtip.min.js/script script type=text/javascript src=../nifi/js/json2.js/script -script type=text/javascript src=../nifi/js/jquery/jquery.event.drag-2.0.min.js/script +script type=text/javascript src=../nifi/js/jquery/jquery.event.drag-2.2.min.js/script script type=text/javascript src=../nifi/js/jquery/slickgrid/plugins/slick.cellrangedecorator.js/script script type=text/javascript src=../nifi/js/jquery/slickgrid/plugins/slick.cellrangeselector.js/script script type=text/javascript src=../nifi/js/jquery/slickgrid/plugins/slick.cellselectionmodel.js/script @@ -39,24 +51,11 @@ script type=text/javascript src=../nifi/js/jquery/slickgrid/slick.dataview.js/script script type=text/javascript src=../nifi/js/jquery/slickgrid/slick.core.js/script script type=text/javascript src=../nifi/js/jquery/slickgrid/slick.grid.js/script -script type=text/javascript src=../nifi/js/codemirror/lib/codemirror.js/script -script type=text/javascript
[31/51] [abbrv] incubator-nifi git commit: NIFI-27: - Starting to upgrade jQuery and jQuery UI.
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/71e53ae5/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/jquery-1.7.js -- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/jquery-1.7.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/jquery-1.7.js deleted file mode 100755 index f9563e1..000 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/jquery-1.7.js +++ /dev/null @@ -1,9017 +0,0 @@ -/*! - * jQuery JavaScript Library v1.7 - * http://jquery.com/ - * - * Copyright 2011, John Resig - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * Copyright 2011, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * - * Date: Thu Nov 3 16:18:21 2011 -0400 - */ -(function (window, undefined) { - -// Use the correct document accordingly with window argument (sandbox) -var document = window.document, -navigator = window.navigator, -location = window.location; -var jQuery = (function () { - -// Define a local copy of jQuery -var jQuery = function (selector, context) { -// The jQuery object is actually just the init constructor 'enhanced' -return new jQuery.fn.init(selector, context, rootjQuery); -}, -// Map over jQuery in case of overwrite -_jQuery = window.jQuery, -// Map over the $ in case of overwrite -_$ = window.$, -// A central reference to the root jQuery(document) -rootjQuery, -// A simple way to check for HTML strings or ID strings -// Prioritize #id over tag to avoid XSS via location.hash (#9521) -quickExpr = /^(?:[^#]*([\w\W]+)[^]*$|#([\w\-]*)$)/, -// Check if a string has a non-whitespace character in it -rnotwhite = /\S/, -// Used for trimming whitespace -trimLeft = /^\s+/, -trimRight = /\s+$/, -// Check for digits -rdigit = /\d/, -// Match a standalone tag -rsingleTag = /^(\w+)\s*\/?(?:\/\1)?$/, -// JSON RegExp -rvalidchars = /^[\],:{}\s]*$/, -rvalidescape = /\\(?:[\\\/bfnrt]|u[0-9a-fA-F]{4})/g, -rvalidtokens = /[^\\\n\r]*|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, -rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, -// Useragent RegExp -rwebkit = /(webkit)[ \/]([\w.]+)/, -ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/, -rmsie = /(msie) ([\w.]+)/, -rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/, -// Matches dashed string for camelizing -rdashAlpha = /-([a-z]|[0-9])/ig, -rmsPrefix = /^-ms-/, -// Used by jQuery.camelCase as callback to replace() -fcamelCase = function (all, letter) { -return (letter + ).toUpperCase(); -}, -// Keep a UserAgent string for use with jQuery.browser -userAgent = navigator.userAgent, -// For matching the engine and version of the browser -browserMatch, -// The deferred used on DOM ready -readyList, -// The ready event handler -DOMContentLoaded, -// Save a reference to some core methods -toString = Object.prototype.toString, -hasOwn = Object.prototype.hasOwnProperty, -push = Array.prototype.push, -slice = Array.prototype.slice, -trim = String.prototype.trim, -indexOf = Array.prototype.indexOf, -// [[Class]] - type pairs -class2type = {}; - -jQuery.fn = jQuery.prototype = { -constructor: jQuery, -init: function (selector, context, rootjQuery) { -var match, elem, ret, doc; - -// Handle $(), $(null), or $(undefined) -if (!selector) { -return this; -} - -// Handle $(DOMElement) -if (selector.nodeType) { -this.context = this[0] = selector; -this.length = 1; -return this; -} - -// The body element only exists once, optimize finding it -if (selector === body !context document.body) { -this.context = document; -this[0] = document.body; -this.selector =
[27/51] [abbrv] incubator-nifi git commit: NIFI-27: - Starting to upgrade jQuery and jQuery UI.
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/71e53ae5/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/slickgrid/css/slick.grid.css -- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/slickgrid/css/slick.grid.css b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/slickgrid/css/slick.grid.css index de94dbf..3ecf3d2 100755 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/slickgrid/css/slick.grid.css +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/slickgrid/css/slick.grid.css @@ -8,7 +8,8 @@ classes should alter those! .slick-header.ui-state-default, .slick-headerrow.ui-state-default { width: 100%; overflow: hidden; - border-left: 0px; + /*border-left: 0px;*/ + border: 0px; } .slick-header-columns, .slick-headerrow-columns { http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/71e53ae5/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/ui-smoothness/images/animated-overlay.gif -- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/ui-smoothness/images/animated-overlay.gif b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/ui-smoothness/images/animated-overlay.gif new file mode 100755 index 000..d441f75 Binary files /dev/null and b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/ui-smoothness/images/animated-overlay.gif differ http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/71e53ae5/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/ui-smoothness/images/ui-bg_flat_0_aa_40x100.png -- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/ui-smoothness/images/ui-bg_flat_0_aa_40x100.png b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/ui-smoothness/images/ui-bg_flat_0_aa_40x100.png new file mode 100755 index 000..b1776f8 Binary files /dev/null and b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/ui-smoothness/images/ui-bg_flat_0_aa_40x100.png differ http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/71e53ae5/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/ui-smoothness/images/ui-bg_flat_75_ff_40x100.png -- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/ui-smoothness/images/ui-bg_flat_75_ff_40x100.png b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/ui-smoothness/images/ui-bg_flat_75_ff_40x100.png new file mode 100755 index 000..79969e6 Binary files /dev/null and b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/ui-smoothness/images/ui-bg_flat_75_ff_40x100.png differ http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/71e53ae5/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/ui-smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png -- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/ui-smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/ui-smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png new file mode 100755 index 000..1e35525 Binary files /dev/null and b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/ui-smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png differ http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/71e53ae5/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/ui-smoothness/images/ui-bg_glass_65_ff_1x400.png -- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/ui-smoothness/images/ui-bg_glass_65_ff_1x400.png b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/ui-smoothness/images/ui-bg_glass_65_ff_1x400.png new file mode 100755 index 000..103f966 Binary files /dev/null and b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/ui-smoothness/images/ui-bg_glass_65_ff_1x400.png differ
[41/51] [abbrv] incubator-nifi git commit: NIFI-27: - Upgrading jQuery and jQuery UI. - Replacing all instances of Deferred.then with Deferred.done/fail due to API change introduced in 1.8. - Restorin
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2965258e/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/minicolors/jquery.minicolors.css -- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/minicolors/jquery.minicolors.css b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/minicolors/jquery.minicolors.css index a1d0caf..91363b8 100755 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/minicolors/jquery.minicolors.css +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/minicolors/jquery.minicolors.css @@ -2,10 +2,18 @@ position: relative; } +.minicolors-sprite { +background-image: url(data:image/png;base64,iVBORw0KGgoNSUhEUgAAA2YAAACWCAYAAAC1r5t6AAEuWklEQVR42uz9a8xt25YVhrU+1ner7qseLiEjhERwfkDFeWAEl6dCQcAUCBDCwUSJwg+jRPIzgGVZMcZ2DCKyIycxiSOi2JbMr8hBgFNVGKNAHgKCTBnbUYCYEsHYIoiKKuYW9zzu2XvP0fNjjUfrbfQx5/r23ufWPnX2PvrOWmvOueYc87HmHG201luzv/GzvstvVmG4/3N39H8GAwzAnASHw8zgDpjRdAcOFPz0v/J1mvrm/374h3+48Oevfe1rOh/PnF/xdv+5TvgLf+EvLAv9vJ/38/ATsdzP/bk/l9tZ6c/l/XEyr8/3B9ZT3X07r/1hM/04+U62XW1X2ka/X9Rn63l0e33fHmnLbtvhONOxqiffw9m+9HW4+9h+X87dR5vbv4M+11prHW/mP3/16lU9jqO+fPnSP/nkk/rxxx/XDz74oP7Yj/2Y/8iP/Ej9F/7l/8lLfAXAVwB8mV75L5v26LwvAh8X4EMAHwH40O9//P5Dm58/wn3ZD/pnu7//AMA3APw4gB9ty8GSX++Y9iXAfyqA7wbsOwH/jtYg/vvquiP+ZcC+StO+dJ+GrwDHF+4N+tCBj+3+NxrdduJjzJ3t0z+k6R+01w8B/B0AXwfwX2R3H6AA+J7291UAX4Xjq7DldH0Fjq/A8GV425v7+/s00PRxSnDDJ9TQj0ejDB/D23RrO+Ft+n3+R+F17tQ32s58HUCFHzWen7d9p7Zv0cre6rZ+QnbwJ6AZ9MVnrGMu2t+tX7bvKOnPNnz+0sl96er+9kWEX8ZH9P7Di/f9l6D3q/9ve3/+7zsB/FQA39Xef0f71ev9Sm/U8U4Qpr26xR3Iduijzfv++QO6Z32j3av+Nj3N6N+3Afi72x58B7X4q9JCPkVfkcOfff42AMCLTcO1w Wdn7IPkfvW3743/o2/xB/cE4MmAL2D+PXl7tfv78NrmP9F3nxy4GQ5zvALwCoYDwCsAB7y9WpvnOML87LUv4+174/NT+/xLDthX27LffwD/JV0n/+n65zbw1w7Yn2yfv3HA/lzb5qtX67bHfvB613Va2O/dsXA8wfAExxOAG9A+zwP7BThusPYKfAEWTxIcX2jffUuXwk/HJ4DX/S3PLZ9mhMh6z8YNZvZWnwx//s//+bf9pHkHnlzfun+1VrRr8VFAspvn1Ol/k/U8GwwlgITbA26btNN3856zzBusiwYunHsOBsDatPQzvS9t/8PASfbq7n1Zb5/HX1/mOI7Spo1lGhDDcRx49eoVXr165S9fvsSLFy/w4sUL//jjj/HBBx/gx3/8x/G3/tbf8h/5kR95rLeU/HkG7elMO51Zr3rhbQ6uzRejASNr/7PWHitJG4v27qwt2E6LtVcvbXppG7f1z6gxTt+1Ns/ae8fcsOkdSXbGbV3Ozu9i/aKZLbOweAm7baMza2NJH9+6z3VaJ+9zRLVlLD2/c35hrONbDofXdujaOeFu9iP99dNlfF3Q274/H2P4g0N2vj56rnbkdcCNt2vmbQKr1wJZ/bo9+/JunofB3kfPtS/fr3Qtzp/uuJD1D8uPJv6Q9Admj/UoXL6S/Yz7342ac3u4m9c7j7dkB3jndjvzGsPPdvEH2oki72u+B9miu9XuDr8/66J+ZGcgF8kNsNs8O3Z8nrqSX76PVuL77jjafmMjb34RYF+6vy/hmVPGrzBekbW93h/5Tsv572xn5EMAf76dgz8K4McA/F/akORHn4eD/XQfV5VfS+/ZKC0We5qzwzGuewPwN98q8Pna175mb8iQfa6BGTOgz1yWAUJpAxHt8rC3ts0z4IJ9l9Toe/UChNtVm2jesm1337alzSsEVvV54SfgqzSGq7ehgypdDjTNGtgO66O/oy/XAJe5u7XXDsxqm4fjOFBrtfbeXr16Za9evS ovX770Fy9e+CeffGLf/OY38eGHH9o3vvEN+/rXv24/+qM/ih/7sR8zz35JHVBhgiG+XVwCNY8Ard7HelB9351Huw110BZm2WwPdn1Wz3p5Gb52mZ5darxTm1uNKyponVjfdfapk+s21+2vdxuzDn7aJ0sOgtOrJ03vc9bT760rzHN17CTrLIn0wufjxNu+ejsvxnvRgLC5w3UPze64tnfPra+HwG77yfK6nbv5xmOTNpFCmN1b5APOTqjHx7kddeNz5+OaXLbL63I0lYrPdVGb5jctXHtm/Vje97t42HRsedj8fVvG5JVbU8vMTYz9Nx6c9fBrsAC6+8CHj9/tvP9mR65dTeZ0PzEB0u1Y+Bxc6Oc4rL8kIxY7sGXJz1e/43t87gkgQ7Jq7bDqwMrTQ7/mpw2oKEmDffcYze9VdoJfrnYo25myh5ZFxsjKCVQ6G5/yizvfeWOxOStlDtZZaeDsJ3038osAfjaA7wfwXwHs1wL2RYN9l4VBuzscm09GC5KhOI9BmY/391cf593hXynwX9GA269og3xftzsp/e8C+MsA/k8A/l+NEv3JCMy+C7B6/sMcd2JbAVlY9u0Ds0/hF/B5ZMweAUV6p/LnAK8N8HkEZIHATxhT6+vsQFAAFOi7fTmTZXwDNHcADFfATJfj7XFb5HvhcwNObmaF2KxKoCoFZg2QIQNpDYDd7pPqYMRqrf3vrmM8Dj+Ow2ut3hiy2l7tOA57+fIl2l/55JNP8PHHH/sHH3yAv/N3/g5+/Md/HF//+tf9gw8+CEM5jgmsLMMw9NkSMLaAMwJmFe2VcElt/TCvE7ghYdX4SnbIIL7vrhJPAFRNgJogSdR7Q8YOtmnmQOWdcfoqIcoOzsJ7BmXc+b1mRjJQtVLMVR6a1s7rBBQV3qZ7W+ZoU/qjtT+OK33LCbx56JjPLncEgsbAFkYsr7ULAksXv19vlad1YC1gbZDZnowYeNjyipEds9PvK4BFwMtzG3RnAN8 exzbGaTUaW54jCR0c3XcnwuJ5Mce23MHs/cfhPNDQLruJeH2AngD4x2/Hm5CmL9v2k7oK7tbOu9GPOIP30pfwDjh9gfV92GACQKdDwmebAKj7OMbekLShtvtCO07KkFny2RJEgAQ1IQcndgF7rv60OSck04aWKgnytM10CPjwPclkZ0OeJ0RdETrwtoeWJVnMNntjD+DB65254jIZiLH6oRBr9uonW3fxSwD+mwB+PYBfDdjPLiioA3yZ3NXX1yqMGT8huYNnBNBW9iy+lvuT5rsNjgL/h+rc4n8C4E8A+CEAfxZ3bf1PEmBm38nDZ3l3vJjchHyzrH0WgNR7YLYCsvPBpmsQtrtX+gMMmm9A2hlQ8k27+Dm2kwyeMmEbIHYGzFy27y49DmLTOnM11snAirY/ANYdazqfS+/va63eARsDtVpr6V9qrBg6GOt/r1696sAMx3F4B2QvXryoL168wMuXL8vLly/x0Ucf+QcffIBvfOMb+MY3voEPPvjAP/roI0LPiKUhZ4jAG4hSfFMnGGNpY/UJyjrBUQnP9PkO6m9b7P+5EmGgJ0NKUFnojId7njPwYtAm83ln7ADqrTW2s2QdpNUVhDnp91xqbnB2711/UFcAbf3z8YD0AMYqFTs6jXdmpagd3jHn4QKpnDrWHrvZdc67E1Se7KqFNclNIDkez1ANnM7ziy9Zun09Ab5dIBvwum6pL8v7+Q65zs9Y2mQFvrK+ft7ITTv8ep927dqdFd+dKT8HD0qOnNE02yfcvnUZaDhTTKqU8RyYMZR5RL6oSNOxlfj5BRjDBshmgIx3Kvl3S1b1iKr0SmH6WBcF+ZZNQJkpWHt79UQ/wf++DcAvBPDfAezXGexn3ve0DPjTQdmUJzJL1sGYEdiyFJA5saGRQWP2LANnE6D5+OwowPdW1O8F8NsN/tcA/2MA/g8A/n0ALz/jwOyr8ZdoOx1u6GoDKmH47ACpt7q+d8noI1vuww8/3B6HM5Dz
[29/51] [abbrv] incubator-nifi git commit: NIFI-27: - Starting to upgrade jQuery and jQuery UI.
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/71e53ae5/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/jquery-2.1.1.min.js -- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/jquery-2.1.1.min.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/jquery-2.1.1.min.js new file mode 100644 index 000..e5ace11 --- /dev/null +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/jquery-2.1.1.min.js @@ -0,0 +1,4 @@ +/*! jQuery v2.1.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ +!function(a,b){object==typeof moduleobject==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error(jQuery requires a window with a document);return b(a)}:b(a)}(undefined!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m=2.1.1,n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:,length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply( this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0a?b:0);return this.pushStack(c=0bc?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for(boolean==typeof g(j=g,g=arguments[h]||{},h++),object==typeof g||n.isFunction(g)||(g={}),h===i(g=this,h--);ih;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d(jd(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=cn.isArray(c)?c:[]):f=cn.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d(g[b]=d));return g},n.extend({expando:jQuery+(m+Math.random()).replace(/\D/g,),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){returnfunction===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=aa===a.window},isNumeric:functi on(a){return!n.isArray(a)a-parseFloat(a)=0},isPlainObject:function(a){returnobject!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor!j.call(a.constructor.prototype,isPrototypeOf)?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+:object==typeof a||function==typeof a?h[i.call(a)]||object:typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a(1===a.indexOf(use strict)?(b=l.createElement(script),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,ms-).replace(q,r)},nodeName:function(a,b){return a.nodeNamea.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;fe;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;fe;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){ return null==a?:(a+).replace(o,)},makeArray:function(a,b){var c=b||[];return null!=a(s(Object(a))?n.merge(c,string==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;cd;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;gf;f++)d=!b(a[f],f),d!==he.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;gf;f++)d=b(a[f],f,c),null!=di.push(d);else for(f in a)d=b(a[f],f,c),null!=di.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;returnstring==typeof b(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each(Boolean Number String Function Array Date RegExp Object Error.split( ),function(a,b){h[[object +b+]]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);returnfunction===c||n.isWindow(a)?!1:1===a.nodeTypeb?!0:array===c||0===b||number==typeof bb0b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u=sizzle+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return
[17/51] [abbrv] incubator-nifi git commit: NIFI-27: - Latest version of D3.
NIFI-27: - Latest version of D3. Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/8a0e2cee Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/8a0e2cee Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/8a0e2cee Branch: refs/heads/NIFI-169 Commit: 8a0e2cee4a2ccdf0f253922a3f900409821e4776 Parents: 4c959f7 Author: Matt Gilman matt.c.gil...@gmail.com Authored: Wed Dec 10 11:26:27 2014 -0500 Committer: Matt Gilman matt.c.gil...@gmail.com Committed: Wed Dec 10 14:36:35 2014 -0500 -- .../nifi-web-ui/src/main/webapp/js/d3/LICENSE | 52 +- .../nifi-web-ui/src/main/webapp/js/d3/d3.min.js | 5390 +- .../src/main/webapp/js/nf/nf-status-history.js | 62 +- 3 files changed, 42 insertions(+), 5462 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/8a0e2cee/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/d3/LICENSE -- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/d3/LICENSE b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/d3/LICENSE old mode 100755 new mode 100644 index 83602d5..8301346 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/d3/LICENSE +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/d3/LICENSE @@ -1,26 +1,26 @@ -Copyright (c) 2013, Michael Bostock -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* The name Michael Bostock may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL MICHAEL BOSTOCK BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +Copyright (c) 2010-2014, Michael Bostock +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* The name Michael Bostock may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL MICHAEL BOSTOCK BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
[36/51] [abbrv] incubator-nifi git commit: NIFI-27: - Upgrading jQuery and jQuery UI. - Replacing all instances of Deferred.then with Deferred.done/fail due to API change introduced in 1.8. - Restorin
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2965258e/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-common.js -- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-common.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-common.js index 9e2514c..cdc3ea7 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-common.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-common.js @@ -72,14 +72,17 @@ nf.Common = { } } }, + /** * Determines if the current broswer supports SVG. */ SUPPORTS_SVG: !!document.createElementNS !!document.createElementNS('http://www.w3.org/2000/svg', 'svg').createSVGRect, + /** * The authorities for the current user. */ authorities: undefined, + /** * Sets the authorities for the current user. * @@ -88,6 +91,7 @@ nf.Common = { setAuthorities: function (roles) { nf.Common.authorities = roles; }, + /** * Loads a script at the specified URL. Supports caching the script on the browser. * @@ -100,6 +104,7 @@ nf.Common = { url: url }); }, + /** * Determines whether the current user can access provenance. * @@ -117,6 +122,7 @@ nf.Common = { } return canAccessProvenance; }, + /** * Returns whether or not the current user is a DFM. */ @@ -132,6 +138,7 @@ nf.Common = { } return dfm; }, + /** * Returns whether or not the current user is a DFM. */ @@ -147,6 +154,7 @@ nf.Common = { } return admin; }, + /** * Adds a mouse over effect for the specified selector using * the specified styles. @@ -163,6 +171,7 @@ nf.Common = { }); return $(selector).addClass(normalStyle); }, + /** * Method for handling ajax errors. * @@ -237,6 +246,7 @@ nf.Common = { nf.Common.closeCanvas(); } }, + /** * Closes the canvas by removing the splash screen and stats poller. */ @@ -256,6 +266,7 @@ nf.Common = { nf.Canvas.stopStatusPolling(); } }, + /** * Populates the specified field with the specified value. If the value is * undefined, the field will read 'No value set.' If the value is an empty @@ -273,6 +284,7 @@ nf.Common = { return $('#' + target).text(value); } }, + /** * Clears the specified field. Removes any style that may have been applied * by a preceeding call to populateField. @@ -282,6 +294,7 @@ nf.Common = { clearField: function (target) { return $('#' + target).removeClass('unset blank').text(''); }, + /** * Formats the tooltip for the specified property. * @@ -321,6 +334,7 @@ nf.Common = { return null; } }, + /** * Formats the specified property (name and value) accordingly. * @@ -330,6 +344,7 @@ nf.Common = { formatProperty: function (name, value) { return 'divspan class=label' + nf.Common.formatValue(name) + ': /span' + nf.Common.formatValue(value) + '/div'; }, + /** * Formats the specified value accordingly. * @@ -346,6 +361,7 @@ nf.Common = { return 'span class=unsetNo value set/span'; } }, + /** * HTML escapes the specified string. If the string is null * or undefined, an empty string is returned. @@ -372,6 +388,7 @@ nf.Common = { } }; }()), + /** * Creates a form inline in order to submit the specified params to the specified URL * using the specified method. @@ -407,6 +424,7 @@ nf.Common = { window.onbeforeunload = previousBeforeUnload; } }, + /** * Formats the specified array as an unordered list. If the array is not an * array, null is returned. @@ -429,6 +447,7 @@ nf.Common = { return null; } }, + /** * Extracts the contents of the specified str after the strToFind. If the * strToFind is not found or the last part of the str, an empty string is @@ -448,6 +467,7 @@ nf.Common = { } return result; }, + /** * Updates the mouse pointer. * @@ -461,6 +481,7 @@ nf.Common = { $('#' + domId).removeClass('pointer'); } }, + /** * Constants for time duration formatting. */ @@ -468,6 +489,7 @@ nf.Common = { MILLIS_PER_HOUR: 360, MILLIS_PER_MINUTE: 6, MILLIS_PER_SECOND: 1000, + /** *
[30/51] [abbrv] incubator-nifi git commit: NIFI-27: - Starting to upgrade jQuery and jQuery UI.
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/71e53ae5/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/jquery-1.7.min.js -- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/jquery-1.7.min.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/jquery-1.7.min.js deleted file mode 100755 index af79a71..000 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/jquery-1.7.min.js +++ /dev/null @@ -1,2934 +0,0 @@ -/*! jQuery v1.7 jquery.com | jquery.org/license */ -(function (a, b) { -function cA(a) { -return f.isWindow(a) ? a : a.nodeType === 9 ? a.defaultView || a.parentWindow : !1 -} -function cx(a) { -if (!cm[a]) { -var b = c.body, d = f( + a + ).appendTo(b), e = d.css(display); -d.remove(); -if (e === none || e === ) { -cn || (cn = c.createElement(iframe), cn.frameBorder = cn.width = cn.height = 0), b.appendChild(cn); -if (!co || !cn.createElement) -co = (cn.contentWindow || cn.contentDocument).document, co.write((c.compatMode === CSS1Compat ? !doctype html : ) + htmlbody), co.close(); -d = co.createElement(a), co.body.appendChild(d), e = f.css(d, display), b.removeChild(cn) -} -cm[a] = e -} -return cm[a] -} -function cw(a, b) { -var c = {}; -f.each(cs.concat.apply([], cs.slice(0, b)), function () { -c[this] = a -}); -return c -} -function cv() { -ct = b -} -function cu() { -setTimeout(cv, 0); -return ct = f.now() -} -function cl() { -try { -return new a.ActiveXObject(Microsoft.XMLHTTP) -} catch (b) { -} -} -function ck() { -try { -return new a.XMLHttpRequest -} catch (b) { -} -} -function ce(a, c) { -a.dataFilter (c = a.dataFilter(c, a.dataType)); -var d = a.dataTypes, e = {}, g, h, i = d.length, j, k = d[0], l, m, n, o, p; -for (g = 1; g i; g++) { -if (g === 1) -for (h in a.converters) -typeof h == string (e[h.toLowerCase()] = a.converters[h]); -l = k, k = d[g]; -if (k === *) -k = l; -else if (l !== * l !== k) { -m = l + + k, n = e[m] || e[* + k]; -if (!n) { -p = b; -for (o in e) { -j = o.split( ); -if (j[0] === l || j[0] === *) { -p = e[j[1] + + k]; -if (p) { -o = e[o], o === !0 ? n = p : p === !0 (n = o); -break -} -} -} -} -!n !p f.error(No conversion from + m.replace( , to )), n !== !0 (c = n ? n(c) : p(o(c))) -} -} -return c -} -function cd(a, c, d) { -var e = a.contents, f = a.dataTypes, g = a.responseFields, h, i, j, k; -for (i in g) -i in d (c[g[i]] = d[i]); -while (f[0] === *) -f.shift(), h === b (h = a.mimeType || c.getResponseHeader(content-type)); -if (h) -for (i in e) -if (e[i] e[i].test(h)) { -f.unshift(i); -break -} -if (f[0]in d) -j = f[0]; -else { -for (i in d) { -if (!f[0] || a.converters[i + + f[0]]) { -j = i; -break -} -k || (k = i) -} -j = j || k -} -if (j) { -j !== f[0] f.unshift(j); -return d[j] -} -} -function cc(a, b, c, d) { -if (f.isArray(b)) -f.each(b, function (b, e) { -c || bG.test(a) ? d(a, e) : cc(a + [ + (typeof e == object || f.isArray(e) ? b : ) + ], e, c, d) -}); -else if (!c b != null typeof b == object) -for (var e in b) -cc(a + [ + e + ], b[e], c, d); -else -d(a, b) -} -function cb(a, c) { -var d, e, g = f.ajaxSettings.flatOptions || {}; -for (d in c) -c[d] !== b ((g[d] ? a : e || (e = {}))[d] = c[d]); -e f.extend(!0, a, e) -} -function ca(a, c, d, e, f, g) { -f = f || c.dataTypes[0], g = g || {}, g[f] = !0; -var h = a[f], i = 0, j = h ? h.length : 0, k = a === bV, l; -for (; i j (k || !l); i++) -l = h[i](c, d, e), typeof l
[26/51] [abbrv] incubator-nifi git commit: NIFI-27: - Starting to upgrade jQuery and jQuery UI.
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/71e53ae5/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/ui-smoothness/jquery-ui-1.10.4.js -- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/ui-smoothness/jquery-ui-1.10.4.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/ui-smoothness/jquery-ui-1.10.4.js new file mode 100755 index 000..ecac757 --- /dev/null +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/jquery/ui-smoothness/jquery-ui-1.10.4.js @@ -0,0 +1,15008 @@ +/*! jQuery UI - v1.10.4 - 2014-12-08 +* http://jqueryui.com +* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.menu.js, jquery.ui.progressbar.js, jquery.ui.slider.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js, jquery.ui.effect.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js +* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */ + +(function( $, undefined ) { + +var uuid = 0, + runiqueId = /^ui-id-\d+$/; + +// $.ui might exist from components with no dependencies, e.g., $.ui.position +$.ui = $.ui || {}; + +$.extend( $.ui, { + version: 1.10.4, + + keyCode: { + BACKSPACE: 8, + COMMA: 188, + DELETE: 46, + DOWN: 40, + END: 35, + ENTER: 13, + ESCAPE: 27, + HOME: 36, + LEFT: 37, + NUMPAD_ADD: 107, + NUMPAD_DECIMAL: 110, + NUMPAD_DIVIDE: 111, + NUMPAD_ENTER: 108, + NUMPAD_MULTIPLY: 106, + NUMPAD_SUBTRACT: 109, + PAGE_DOWN: 34, + PAGE_UP: 33, + PERIOD: 190, + RIGHT: 39, + SPACE: 32, + TAB: 9, + UP: 38 + } +}); + +// plugins +$.fn.extend({ + focus: (function( orig ) { + return function( delay, fn ) { + return typeof delay === number ? + this.each(function() { + var elem = this; + setTimeout(function() { + $( elem ).focus(); + if ( fn ) { + fn.call( elem ); + } + }, delay ); + }) : + orig.apply( this, arguments ); + }; + })( $.fn.focus ), + + scrollParent: function() { + var scrollParent; + if (($.ui.ie (/(static|relative)/).test(this.css(position))) || (/absolute/).test(this.css(position))) { + scrollParent = this.parents().filter(function() { + return (/(relative|absolute|fixed)/).test($.css(this,position)) (/(auto|scroll)/).test($.css(this,overflow)+$.css(this,overflow-y)+$.css(this,overflow-x)); + }).eq(0); + } else { + scrollParent = this.parents().filter(function() { + return (/(auto|scroll)/).test($.css(this,overflow)+$.css(this,overflow-y)+$.css(this,overflow-x)); + }).eq(0); + } + + return (/fixed/).test(this.css(position)) || !scrollParent.length ? $(document) : scrollParent; + }, + + zIndex: function( zIndex ) { + if ( zIndex !== undefined ) { + return this.css( zIndex, zIndex ); + } + + if ( this.length ) { + var elem = $( this[ 0 ] ), position, value; + while ( elem.length elem[ 0 ] !== document ) { + // Ignore z-index if position is set to a value where z-index is ignored by the browser + // This makes behavior of this function consistent across browsers + // WebKit always returns auto if the element is positioned +
[09/51] [abbrv] incubator-nifi git commit: NIFI-27: - Latest version of qtip2.
NIFI-27: - Latest version of qtip2. Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/658131de Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/658131de Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/658131de Branch: refs/heads/NIFI-169 Commit: 658131de13d3a571d2a764600d7fa5b3f85e8e5f Parents: fe2a331 Author: Matt Gilman matt.c.gil...@gmail.com Authored: Wed Dec 10 08:35:31 2014 -0500 Committer: Matt Gilman matt.c.gil...@gmail.com Committed: Wed Dec 10 14:36:33 2014 -0500 -- .../webapp/WEB-INF/pages/bulletin-board.jsp | 2 +- .../src/main/webapp/WEB-INF/pages/canvas.jsp| 2 +- .../src/main/webapp/WEB-INF/pages/cluster.jsp | 2 +- .../src/main/webapp/WEB-INF/pages/counters.jsp | 2 +- .../src/main/webapp/WEB-INF/pages/history.jsp | 2 +- .../main/webapp/WEB-INF/pages/provenance.jsp| 2 +- .../src/main/webapp/WEB-INF/pages/summary.jsp | 2 +- .../src/main/webapp/WEB-INF/pages/templates.jsp | 2 +- .../src/main/webapp/WEB-INF/pages/users.jsp | 2 +- .../main/webapp/js/jquery/qtip2/jquery.qtip.css | 557 --- .../webapp/js/jquery/qtip2/jquery.qtip.min.css | 3 + .../webapp/js/jquery/qtip2/jquery.qtip.min.js | 711 +-- 12 files changed, 17 insertions(+), 1272 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/658131de/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/WEB-INF/pages/bulletin-board.jsp -- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/WEB-INF/pages/bulletin-board.jsp b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/WEB-INF/pages/bulletin-board.jsp index 8669f6c..083862d 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/WEB-INF/pages/bulletin-board.jsp +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/WEB-INF/pages/bulletin-board.jsp @@ -24,7 +24,7 @@ ${nf.bulletin.board.style.tags} link rel=stylesheet href=js/jquery/combo/jquery.combo.css?${project.version} type=text/css / link rel=stylesheet href=js/jquery/modal/jquery.modal.css?${project.version} type=text/css / -link rel=stylesheet href=js/jquery/qtip2/jquery.qtip.css? type=text/css / +link rel=stylesheet href=js/jquery/qtip2/jquery.qtip.min.css? type=text/css / link rel=stylesheet href=js/jquery/css/smoothness/jquery-ui-1.8.10.custom.css type=text/css / script type=text/javascript src=js/jquery/jquery-1.7.min.js/script script type=text/javascript src=js/jquery/jquery.center.js/script http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/658131de/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/WEB-INF/pages/canvas.jsp -- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/WEB-INF/pages/canvas.jsp b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/WEB-INF/pages/canvas.jsp index acdd147..c8f2ff7 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/WEB-INF/pages/canvas.jsp +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/WEB-INF/pages/canvas.jsp @@ -28,7 +28,7 @@ link rel=stylesheet href=js/jquery/tabbs/jquery.tabbs.css?${project.version} type=text/css / link rel=stylesheet href=js/jquery/combo/jquery.combo.css?${project.version} type=text/css / link rel=stylesheet href=js/jquery/modal/jquery.modal.css?${project.version} type=text/css / -link rel=stylesheet href=js/jquery/qtip2/jquery.qtip.css? type=text/css / +link rel=stylesheet href=js/jquery/qtip2/jquery.qtip.min.css? type=text/css / link rel=stylesheet href=js/jquery/css/smoothness/jquery-ui-1.8.10.custom.css type=text/css / link rel=stylesheet href=js/jquery/minicolors/jquery.minicolors.css type=text/css / link rel=stylesheet href=js/jquery/slickgrid/css/slick.grid.css type=text/css / http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/658131de/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/WEB-INF/pages/cluster.jsp -- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/WEB-INF/pages/cluster.jsp b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/WEB-INF/pages/cluster.jsp index 33fdbb0..e3e7b86 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/WEB-INF/pages/cluster.jsp +++