From 9e54a3d260e037dd2ad154777771883a12ec42ba Mon Sep 17 00:00:00 2001 From: Matt Gilman Date: Tue, 21 Jun 2016 16:55:49 -0400 Subject: [PATCH] NIFI-1946: - Updating palette styling. - Providing selection context. - Updating add connection icon. NIFI-2058: - Updating defaults for connection backpressure. NIFI-2014: - Updating birds eye colors. NIFI-2016: - Updating default label color. NIFI-2013: - Updating how we color processors. NIFI-2043: - Using correct group id when creating controller services inline. Signed-off-by: Bryan Bende --- .../controller/StandardFlowFileQueue.java | 43 +++-- .../nifi-web/nifi-web-api/pom.xml | 5 - .../nifi/web/StandardNiFiServiceFacade.java | 3 +- .../partials/canvas/fill-color-dialog.jsp | 2 +- .../WEB-INF/partials/canvas/navigation.jsp | 11 ++ .../src/main/webapp/css/dialog.css | 6 + .../nifi-web-ui/src/main/webapp/css/graph.css | 6 +- .../src/main/webapp/css/navigation.css | 49 +++++ .../src/main/webapp/images/addConnect.png | Bin 1996 -> 0 bytes .../propertytable/jquery.propertytable.js | 19 +- .../nf-ng-canvas-graph-controls-controller.js | 172 ++++++++++++++---- .../main/webapp/js/nf/canvas/nf-birdseye.js | 9 +- .../webapp/js/nf/canvas/nf-canvas-utils.js | 2 +- .../src/main/webapp/js/nf/canvas/nf-canvas.js | 25 ++- .../webapp/js/nf/canvas/nf-connectable.js | 17 +- .../nf/canvas/nf-connection-configuration.js | 4 +- .../js/nf/canvas/nf-controller-service.js | 5 +- .../js/nf/canvas/nf-label-configuration.js | 3 + .../src/main/webapp/js/nf/canvas/nf-label.js | 2 +- .../js/nf/canvas/nf-port-configuration.js | 3 + .../canvas/nf-process-group-configuration.js | 3 + .../nf/canvas/nf-processor-configuration.js | 5 +- .../main/webapp/js/nf/canvas/nf-processor.js | 11 +- .../nf-remote-process-group-configuration.js | 3 + .../webapp/js/nf/canvas/nf-reporting-task.js | 4 +- .../main/webapp/js/nf/canvas/nf-settings.js | 7 + 26 files changed, 324 insertions(+), 95 deletions(-) delete mode 100755 nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/images/addConnect.png diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardFlowFileQueue.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardFlowFileQueue.java index 673595961a..aa77765f92 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardFlowFileQueue.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardFlowFileQueue.java @@ -16,25 +16,6 @@ */ package org.apache.nifi.controller; -import java.io.FileNotFoundException; -import java.io.IOException; -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.Map; -import java.util.PriorityQueue; -import java.util.Queue; -import java.util.Set; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentMap; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicReference; -import java.util.concurrent.locks.ReentrantReadWriteLock; - import org.apache.nifi.connectable.Connection; import org.apache.nifi.controller.queue.DropFlowFileState; import org.apache.nifi.controller.queue.DropFlowFileStatus; @@ -74,6 +55,25 @@ import org.apache.nifi.util.concurrency.TimedLock; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.io.FileNotFoundException; +import java.io.IOException; +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.Map; +import java.util.PriorityQueue; +import java.util.Queue; +import java.util.Set; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicReference; +import java.util.concurrent.locks.ReentrantReadWriteLock; + /** * A FlowFileQueue is used to queue FlowFile objects that are awaiting further * processing. Must be thread safe. @@ -95,7 +95,10 @@ public final class StandardFlowFileQueue implements FlowFileQueue { private boolean swapMode = false; - private final AtomicReference maxQueueSize = new AtomicReference<>(new MaxQueueSize("0 MB", 0L, 0L)); + public static final int DEFAULT_BACKPRESSURE_COUNT = 10000; + public static final String DEFAULT_BACKPRESSURE_SIZE = "1 GB"; + private final AtomicReference maxQueueSize = new AtomicReference<>(new MaxQueueSize(DEFAULT_BACKPRESSURE_SIZE, + DataUnit.parseDataSize(DEFAULT_BACKPRESSURE_SIZE, DataUnit.B).longValue(), DEFAULT_BACKPRESSURE_COUNT)); private final AtomicReference expirationPeriod = new AtomicReference<>(new TimePeriod("0 mins", 0L)); private final EventReporter eventReporter; diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/pom.xml b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/pom.xml index b0d4dda454..98824865ea 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/pom.xml +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/pom.xml @@ -360,10 +360,5 @@ spock-core test - - cglib - cglib-nodep - test - diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiServiceFacade.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiServiceFacade.java index a1e88cab45..af3f8a4100 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiServiceFacade.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiServiceFacade.java @@ -2664,7 +2664,8 @@ public class StandardNiFiServiceFacade implements NiFiServiceFacade { descriptor = new PropertyDescriptor.Builder().name(property).addValidator(Validator.INVALID).dynamic(true).build(); } - return dtoFactory.createPropertyDescriptorDto(descriptor, controllerService.getProcessGroup().getIdentifier()); + final String groupId = controllerService.getProcessGroup() == null ? null : controllerService.getProcessGroup().getIdentifier(); + return dtoFactory.createPropertyDescriptorDto(descriptor, groupId); }); } diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/fill-color-dialog.jsp b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/fill-color-dialog.jsp index e6c7ae3a56..04844a77af 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/fill-color-dialog.jsp +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/fill-color-dialog.jsp @@ -15,7 +15,7 @@ limitations under the License. --%> <%@ page contentType="text/html" pageEncoding="UTF-8" session="false" %> -