You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by sc...@apache.org on 2018/05/30 17:42:32 UTC
[3/5] nifi git commit: NIFI-5208: - Fixing missing message when a
node is disconnected from a cluster. - Updating endpoints to accept a flag to
allow for changes to be made to a disconnected node. - Updating custom UIs to
acknowledge disconnected nodes p
http://git-wip-us.apache.org/repos/asf/nifi/blob/05a1d630/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/RemoteProcessGroupResource.java
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/RemoteProcessGroupResource.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/RemoteProcessGroupResource.java
index 391e469..79c5aaf 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/RemoteProcessGroupResource.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/RemoteProcessGroupResource.java
@@ -185,6 +185,11 @@ public class RemoteProcessGroupResource extends ApplicationResource {
)
@QueryParam(CLIENT_ID) @DefaultValue(StringUtils.EMPTY) final ClientIdParameter clientId,
@ApiParam(
+ value = "Acknowledges that this node is disconnected to allow for mutable requests to proceed.",
+ required = false
+ )
+ @QueryParam(DISCONNECTED_NODE_ACKNOWLEDGED) @DefaultValue("false") final Boolean disconnectedNodeAcknowledged,
+ @ApiParam(
value = "The remote process group id.",
required = true
)
@@ -192,6 +197,8 @@ public class RemoteProcessGroupResource extends ApplicationResource {
if (isReplicateRequest()) {
return replicate(HttpMethod.DELETE);
+ } else if (isDisconnectedFromCluster()) {
+ verifyDisconnectedNodeModification(disconnectedNodeAcknowledged);
}
final RemoteProcessGroupEntity requestRemoteProcessGroupEntity = new RemoteProcessGroupEntity();
@@ -290,6 +297,8 @@ public class RemoteProcessGroupResource extends ApplicationResource {
if (isReplicateRequest()) {
return replicate(HttpMethod.PUT, requestRemoteProcessGroupPortEntity);
+ } else if (isDisconnectedFromCluster()) {
+ verifyDisconnectedNodeModification(requestRemoteProcessGroupPortEntity.isDisconnectedNodeAcknowledged());
}
final Revision requestRevision = getRevision(requestRemoteProcessGroupPortEntity, id);
@@ -391,6 +400,8 @@ public class RemoteProcessGroupResource extends ApplicationResource {
if (isReplicateRequest()) {
return replicate(HttpMethod.PUT, requestRemoteProcessGroupPortEntity);
+ } else if (isDisconnectedFromCluster()) {
+ verifyDisconnectedNodeModification(requestRemoteProcessGroupPortEntity.isDisconnectedNodeAcknowledged());
}
// handle expects request (usually from the cluster manager)
@@ -487,6 +498,8 @@ public class RemoteProcessGroupResource extends ApplicationResource {
if (isReplicateRequest()) {
return replicate(HttpMethod.PUT, requestRemoteProcessGroupEntity);
+ } else if (isDisconnectedFromCluster()) {
+ verifyDisconnectedNodeModification(requestRemoteProcessGroupEntity.isDisconnectedNodeAcknowledged());
}
// handle expects request (usually from the cluster manager)
http://git-wip-us.apache.org/repos/asf/nifi/blob/05a1d630/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ReportingTaskResource.java
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ReportingTaskResource.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ReportingTaskResource.java
index 38fd3ff..278c372 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ReportingTaskResource.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ReportingTaskResource.java
@@ -418,6 +418,8 @@ public class ReportingTaskResource extends ApplicationResource {
if (isReplicateRequest()) {
return replicate(HttpMethod.PUT, requestReportingTaskEntity);
+ } else if (isDisconnectedFromCluster()) {
+ verifyDisconnectedNodeModification(requestReportingTaskEntity.isDisconnectedNodeAcknowledged());
}
// handle expects request (usually from the cluster manager)
@@ -494,6 +496,11 @@ public class ReportingTaskResource extends ApplicationResource {
)
@QueryParam(CLIENT_ID) @DefaultValue(StringUtils.EMPTY) ClientIdParameter clientId,
@ApiParam(
+ value = "Acknowledges that this node is disconnected to allow for mutable requests to proceed.",
+ required = false
+ )
+ @QueryParam(DISCONNECTED_NODE_ACKNOWLEDGED) @DefaultValue("false") final Boolean disconnectedNodeAcknowledged,
+ @ApiParam(
value = "The reporting task id.",
required = true
)
@@ -501,6 +508,8 @@ public class ReportingTaskResource extends ApplicationResource {
if (isReplicateRequest()) {
return replicate(HttpMethod.DELETE);
+ } else if (isDisconnectedFromCluster()) {
+ verifyDisconnectedNodeModification(disconnectedNodeAcknowledged);
}
final ReportingTaskEntity requestReportingTaskEntity = new ReportingTaskEntity();
http://git-wip-us.apache.org/repos/asf/nifi/blob/05a1d630/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/SnippetResource.java
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/SnippetResource.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/SnippetResource.java
index 15c75d1..c00c8b3 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/SnippetResource.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/SnippetResource.java
@@ -16,19 +16,12 @@
*/
package org.apache.nifi.web.api;
-import javax.servlet.http.HttpServletRequest;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.HttpMethod;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
+import io.swagger.annotations.Authorization;
import org.apache.nifi.authorization.AccessDeniedException;
import org.apache.nifi.authorization.AuthorizableLookup;
import org.apache.nifi.authorization.Authorizer;
@@ -42,18 +35,25 @@ import org.apache.nifi.web.api.dto.SnippetDTO;
import org.apache.nifi.web.api.entity.ComponentEntity;
import org.apache.nifi.web.api.entity.SnippetEntity;
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.DefaultValue;
+import javax.ws.rs.HttpMethod;
+import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
import java.net.URI;
import java.util.Set;
import java.util.function.Consumer;
import java.util.stream.Collectors;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import io.swagger.annotations.ApiResponse;
-import io.swagger.annotations.ApiResponses;
-import io.swagger.annotations.Authorization;
-
/**
* RESTful endpoint for querying dataflow snippets.
*/
@@ -170,6 +170,8 @@ public class SnippetResource extends ApplicationResource {
if (isReplicateRequest()) {
return replicate(HttpMethod.POST, requestSnippetEntity);
+ } else if (isDisconnectedFromCluster()) {
+ verifyDisconnectedNodeModification(requestSnippetEntity.isDisconnectedNodeAcknowledged());
}
return withWriteLock(
@@ -259,6 +261,8 @@ public class SnippetResource extends ApplicationResource {
if (isReplicateRequest()) {
return replicate(HttpMethod.PUT, requestSnippetEntity);
+ } else if (isDisconnectedFromCluster()) {
+ verifyDisconnectedNodeModification(requestSnippetEntity.isDisconnectedNodeAcknowledged());
}
// get the revision from this snippet
@@ -318,6 +322,11 @@ public class SnippetResource extends ApplicationResource {
public Response deleteSnippet(
@Context final HttpServletRequest httpServletRequest,
@ApiParam(
+ value = "Acknowledges that this node is disconnected to allow for mutable requests to proceed.",
+ required = false
+ )
+ @QueryParam(DISCONNECTED_NODE_ACKNOWLEDGED) @DefaultValue("false") final Boolean disconnectedNodeAcknowledged,
+ @ApiParam(
value = "The snippet id.",
required = true
)
@@ -325,6 +334,8 @@ public class SnippetResource extends ApplicationResource {
if (isReplicateRequest()) {
return replicate(HttpMethod.DELETE);
+ } else if (isDisconnectedFromCluster()) {
+ verifyDisconnectedNodeModification(disconnectedNodeAcknowledged);
}
final ComponentEntity requestEntity = new ComponentEntity();
http://git-wip-us.apache.org/repos/asf/nifi/blob/05a1d630/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/TemplateResource.java
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/TemplateResource.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/TemplateResource.java
index c31daa1..4a3de4f 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/TemplateResource.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/TemplateResource.java
@@ -35,11 +35,13 @@ import org.apache.nifi.web.api.entity.TemplateEntity;
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
+import javax.ws.rs.DefaultValue;
import javax.ws.rs.GET;
import javax.ws.rs.HttpMethod;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
@@ -181,6 +183,11 @@ public class TemplateResource extends ApplicationResource {
public Response removeTemplate(
@Context final HttpServletRequest httpServletRequest,
@ApiParam(
+ value = "Acknowledges that this node is disconnected to allow for mutable requests to proceed.",
+ required = false
+ )
+ @QueryParam(DISCONNECTED_NODE_ACKNOWLEDGED) @DefaultValue("false") final Boolean disconnectedNodeAcknowledged,
+ @ApiParam(
value = "The template id.",
required = true
)
@@ -188,6 +195,8 @@ public class TemplateResource extends ApplicationResource {
if (isReplicateRequest()) {
return replicate(HttpMethod.DELETE);
+ } else if (isDisconnectedFromCluster()) {
+ verifyDisconnectedNodeModification(disconnectedNodeAcknowledged);
}
final TemplateEntity requestTemplateEntity = new TemplateEntity();
http://git-wip-us.apache.org/repos/asf/nifi/blob/05a1d630/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/TenantsResource.java
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/TenantsResource.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/TenantsResource.java
index f339e31..c8e5be6 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/TenantsResource.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/TenantsResource.java
@@ -171,6 +171,8 @@ public class TenantsResource extends ApplicationResource {
if (isReplicateRequest()) {
return replicate(HttpMethod.POST, requestUserEntity);
+ } else if (isDisconnectedFromCluster()) {
+ verifyDisconnectedNodeModification(requestUserEntity.isDisconnectedNodeAcknowledged());
}
return withWriteLock(
@@ -373,6 +375,8 @@ public class TenantsResource extends ApplicationResource {
if (isReplicateRequest()) {
return replicate(HttpMethod.PUT, requestUserEntity);
+ } else if (isDisconnectedFromCluster()) {
+ verifyDisconnectedNodeModification(requestUserEntity.isDisconnectedNodeAcknowledged());
}
// Extract the revision
@@ -442,6 +446,11 @@ public class TenantsResource extends ApplicationResource {
)
@QueryParam(CLIENT_ID) @DefaultValue(StringUtils.EMPTY) final ClientIdParameter clientId,
@ApiParam(
+ value = "Acknowledges that this node is disconnected to allow for mutable requests to proceed.",
+ required = false
+ )
+ @QueryParam(DISCONNECTED_NODE_ACKNOWLEDGED) @DefaultValue("false") final Boolean disconnectedNodeAcknowledged,
+ @ApiParam(
value = "The user id.",
required = true
)
@@ -454,6 +463,8 @@ public class TenantsResource extends ApplicationResource {
if (isReplicateRequest()) {
return replicate(HttpMethod.DELETE);
+ } else if (isDisconnectedFromCluster()) {
+ verifyDisconnectedNodeModification(disconnectedNodeAcknowledged);
}
final UserEntity requestUserEntity = new UserEntity();
@@ -560,6 +571,8 @@ public class TenantsResource extends ApplicationResource {
if (isReplicateRequest()) {
return replicate(HttpMethod.POST, requestUserGroupEntity);
+ } else if (isDisconnectedFromCluster()) {
+ verifyDisconnectedNodeModification(requestUserGroupEntity.isDisconnectedNodeAcknowledged());
}
return withWriteLock(
@@ -761,6 +774,8 @@ public class TenantsResource extends ApplicationResource {
if (isReplicateRequest()) {
return replicate(HttpMethod.PUT, requestUserGroupEntity);
+ } else if (isDisconnectedFromCluster()) {
+ verifyDisconnectedNodeModification(requestUserGroupEntity.isDisconnectedNodeAcknowledged());
}
// Extract the revision
@@ -830,6 +845,11 @@ public class TenantsResource extends ApplicationResource {
)
@QueryParam(CLIENT_ID) @DefaultValue(StringUtils.EMPTY) final ClientIdParameter clientId,
@ApiParam(
+ value = "Acknowledges that this node is disconnected to allow for mutable requests to proceed.",
+ required = false
+ )
+ @QueryParam(DISCONNECTED_NODE_ACKNOWLEDGED) @DefaultValue("false") final Boolean disconnectedNodeAcknowledged,
+ @ApiParam(
value = "The user group id.",
required = true
)
@@ -842,6 +862,8 @@ public class TenantsResource extends ApplicationResource {
if (isReplicateRequest()) {
return replicate(HttpMethod.DELETE);
+ } else if (isDisconnectedFromCluster()) {
+ verifyDisconnectedNodeModification(disconnectedNodeAcknowledged);
}
final UserGroupEntity requestUserGroupEntity = new UserGroupEntity();
http://git-wip-us.apache.org/repos/asf/nifi/blob/05a1d630/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/VersionsResource.java
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/VersionsResource.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/VersionsResource.java
index b80b4d3..394048c 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/VersionsResource.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/VersionsResource.java
@@ -200,6 +200,8 @@ public class VersionsResource extends ApplicationResource {
if (isReplicateRequest()) {
return replicate(HttpMethod.POST, requestEntity);
+ } else if (isDisconnectedFromCluster()) {
+ verifyDisconnectedNodeModification(requestEntity.isDisconnectedNodeAcknowledged());
}
final NiFiUser user = NiFiUserUtils.getNiFiUser();
@@ -288,6 +290,8 @@ public class VersionsResource extends ApplicationResource {
// Replicate if necessary
if (isReplicateRequest()) {
return replicate(HttpMethod.PUT, requestEntity);
+ } else if (isDisconnectedFromCluster()) {
+ verifyDisconnectedNodeModification(requestEntity.isDisconnectedNodeAcknowledged());
}
// Perform the update
@@ -363,9 +367,18 @@ public class VersionsResource extends ApplicationResource {
@ApiResponse(code = 404, message = "The specified resource could not be found."),
@ApiResponse(code = 409, message = "The request was valid but NiFi was not in the appropriate state to process it. Retrying the same request later may be successful.")
})
- public Response deleteVersionControlRequest(@ApiParam("The request ID.") @PathParam("id") final String requestId) {
+ public Response deleteVersionControlRequest(
+ @ApiParam(
+ value = "Acknowledges that this node is disconnected to allow for mutable requests to proceed.",
+ required = false
+ )
+ @QueryParam(DISCONNECTED_NODE_ACKNOWLEDGED) @DefaultValue("false") final Boolean disconnectedNodeAcknowledged,
+ @ApiParam("The request ID.") @PathParam("id") final String requestId) {
+
if (isReplicateRequest()) {
return replicate(HttpMethod.DELETE);
+ } else if (isDisconnectedFromCluster()) {
+ verifyDisconnectedNodeModification(disconnectedNodeAcknowledged);
}
synchronized (activeRequestMonitor) {
@@ -457,6 +470,10 @@ public class VersionsResource extends ApplicationResource {
throw new IllegalArgumentException("Comments cannot exceed 65,535 characters");
}
+ if (isDisconnectedFromCluster()) {
+ verifyDisconnectedNodeModification(requestEntity.isDisconnectedNodeAcknowledged());
+ }
+
// ensure we're not attempting to version the root group
final ProcessGroupEntity root = serviceFacade.getProcessGroup(FlowController.ROOT_GROUP_ID_ALIAS);
if (root.getId().equals(groupId)) {
@@ -671,10 +688,17 @@ public class VersionsResource extends ApplicationResource {
value = "If the client id is not specified, a new one will be generated. This value (whether specified or generated) is included in the response.",
required = false)
@QueryParam(CLIENT_ID) @DefaultValue(StringUtils.EMPTY) final ClientIdParameter clientId,
+ @ApiParam(
+ value = "Acknowledges that this node is disconnected to allow for mutable requests to proceed.",
+ required = false
+ )
+ @QueryParam(DISCONNECTED_NODE_ACKNOWLEDGED) @DefaultValue("false") final Boolean disconnectedNodeAcknowledged,
@ApiParam("The process group id.") @PathParam("id") final String groupId) {
if (isReplicateRequest()) {
return replicate(HttpMethod.DELETE);
+ } else if (isDisconnectedFromCluster()) {
+ verifyDisconnectedNodeModification(disconnectedNodeAcknowledged);
}
final Revision requestRevision = new Revision(version == null ? null : version.getLong(), clientId.getClientId(), groupId);
@@ -752,6 +776,8 @@ public class VersionsResource extends ApplicationResource {
// Perform the request
if (isReplicateRequest()) {
return replicate(HttpMethod.PUT, requestEntity);
+ } else if (isDisconnectedFromCluster()) {
+ verifyDisconnectedNodeModification(requestEntity.isDisconnectedNodeAcknowledged());
}
final Revision requestRevision = getRevision(requestEntity.getProcessGroupRevision(), groupId);
@@ -912,8 +938,15 @@ public class VersionsResource extends ApplicationResource {
@ApiResponse(code = 404, message = "The specified resource could not be found."),
@ApiResponse(code = 409, message = "The request was valid but NiFi was not in the appropriate state to process it. Retrying the same request later may be successful.")
})
- public Response deleteUpdateRequest(@ApiParam("The ID of the Update Request") @PathParam("id") final String updateRequestId) {
- return deleteRequest("update-requests", updateRequestId);
+ public Response deleteUpdateRequest(
+ @ApiParam(
+ value = "Acknowledges that this node is disconnected to allow for mutable requests to proceed.",
+ required = false
+ )
+ @QueryParam(DISCONNECTED_NODE_ACKNOWLEDGED) @DefaultValue("false") final Boolean disconnectedNodeAcknowledged,
+ @ApiParam("The ID of the Update Request") @PathParam("id") final String updateRequestId) {
+
+ return deleteRequest("update-requests", updateRequestId, disconnectedNodeAcknowledged.booleanValue());
}
@DELETE
@@ -937,16 +970,27 @@ public class VersionsResource extends ApplicationResource {
@ApiResponse(code = 404, message = "The specified resource could not be found."),
@ApiResponse(code = 409, message = "The request was valid but NiFi was not in the appropriate state to process it. Retrying the same request later may be successful.")
})
- public Response deleteRevertRequest(@ApiParam("The ID of the Revert Request") @PathParam("id") final String revertRequestId) {
- return deleteRequest("revert-requests", revertRequestId);
+ public Response deleteRevertRequest(
+ @ApiParam(
+ value = "Acknowledges that this node is disconnected to allow for mutable requests to proceed.",
+ required = false
+ )
+ @QueryParam(DISCONNECTED_NODE_ACKNOWLEDGED) @DefaultValue("false") final Boolean disconnectedNodeAcknowledged,
+ @ApiParam("The ID of the Revert Request") @PathParam("id") final String revertRequestId) {
+
+ return deleteRequest("revert-requests", revertRequestId, disconnectedNodeAcknowledged.booleanValue());
}
- private Response deleteRequest(final String requestType, final String requestId) {
+ private Response deleteRequest(final String requestType, final String requestId, final boolean disconnectedNodeAcknowledged) {
if (requestId == null) {
throw new IllegalArgumentException("Request ID must be specified.");
}
+ if (isDisconnectedFromCluster()) {
+ verifyDisconnectedNodeModification(disconnectedNodeAcknowledged);
+ }
+
final NiFiUser user = NiFiUserUtils.getNiFiUser();
// request manager will ensure that the current is the user that submitted this request
@@ -1046,6 +1090,10 @@ public class VersionsResource extends ApplicationResource {
throw new IllegalArgumentException("The Version of the flow must be supplied.");
}
+ if (isDisconnectedFromCluster()) {
+ verifyDisconnectedNodeModification(requestEntity.isDisconnectedNodeAcknowledged());
+ }
+
// We will perform the updating of the Versioned Flow in a background thread because it can be a long-running process.
// In order to do this, we will need some parameters that are only available as Thread-Local variables to the current
// thread, so we will gather the values for these parameters up front.
@@ -1236,6 +1284,10 @@ public class VersionsResource extends ApplicationResource {
throw new IllegalArgumentException("The Version of the flow must be supplied.");
}
+ if (isDisconnectedFromCluster()) {
+ verifyDisconnectedNodeModification(requestEntity.isDisconnectedNodeAcknowledged());
+ }
+
// We will perform the updating of the Versioned Flow in a background thread because it can be a long-running process.
// In order to do this, we will need some parameters that are only available as Thread-Local variables to the current
// thread, so we will gather the values for these parameters up front.
http://git-wip-us.apache.org/repos/asf/nifi/blob/05a1d630/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/flow-status.jsp
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/flow-status.jsp b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/flow-status.jsp
index 1db3396..fbf33a9 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/flow-status.jsp
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/flow-status.jsp
@@ -17,7 +17,8 @@
<%@ page contentType="text/html" pageEncoding="UTF-8" session="false" %>
<div id="flow-status" flex layout="row" layout-align="space-between center">
<div id="flow-status-container" layout="row" layout-align="space-around center">
- <div class="fa fa-cubes" ng-if="appCtrl.nf.ClusterSummary.isClustered()" title="Connected nodes / Total number of nodes in the cluster">
+ <div class="fa fa-cubes" ng-if="appCtrl.nf.ClusterSummary.isClustered()" ng-class="appCtrl.serviceProvider.headerCtrl.flowStatusCtrl.getExtraClusterStyles()"
+ title="Connected nodes / Total number of nodes in the cluster">
<span id="connected-nodes-count">{{appCtrl.serviceProvider.headerCtrl.flowStatusCtrl.connectedNodesCount}}</span>
</div>
<div class="icon icon-threads" ng-class="appCtrl.serviceProvider.headerCtrl.flowStatusCtrl.getExtraThreadStyles()"
http://git-wip-us.apache.org/repos/asf/nifi/blob/05a1d630/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js
index 2aa96a4..56551f7 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js
@@ -26,6 +26,7 @@
'nf.Common',
'nf.UniversalCapture',
'nf.Dialog',
+ 'nf.Storage',
'nf.Client',
'nf.ErrorHandler',
'nf.ProcessGroupConfiguration',
@@ -35,6 +36,7 @@
nfCommon,
nfUniversalCapture,
nfDialog,
+ nfStorage,
nfClient,
nfErrorHandler,
nfProcessGroupConfiguration,
@@ -44,6 +46,7 @@
nfCommon,
nfUniversalCapture,
nfDialog,
+ nfStorage,
nfClient,
nfErrorHandler,
nfProcessGroupConfiguration,
@@ -55,6 +58,7 @@
require('nf.Common'),
require('nf.UniversalCapture'),
require('nf.Dialog'),
+ require('nf.Storage'),
require('nf.Client'),
require('nf.ErrorHandler'),
require('nf.ProcessGroupConfiguration'),
@@ -65,6 +69,7 @@
root.nf.Common,
root.nf.UniversalCapture,
root.nf.Dialog,
+ root.nf.Storage,
root.nf.Client,
root.nf.ErrorHandler,
root.nf.ProcessGroupConfiguration,
@@ -75,6 +80,7 @@
nfCommon,
nfUniversalCapture,
nfDialog,
+ nfStorage,
nfClient,
nfErrorHandler,
nfProcessGroupConfiguration,
@@ -1115,6 +1121,7 @@
'version': 0,
}
}),
+ 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(),
'component': {
'type': newControllerServiceType.type,
'bundle': newControllerServiceType.bundle
http://git-wip-us.apache.org/repos/asf/nifi/blob/05a1d630/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/controllers/nf-ng-canvas-flow-status-controller.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/controllers/nf-ng-canvas-flow-status-controller.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/controllers/nf-ng-canvas-flow-status-controller.js
index f301c9a..10ea150 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/controllers/nf-ng-canvas-flow-status-controller.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/controllers/nf-ng-canvas-flow-status-controller.js
@@ -66,6 +66,7 @@
function FlowStatusCtrl() {
this.connectedNodesCount = "-";
+ this.clusterConnectionWarning = false;
this.activeThreadCount = "-";
this.terminatedThreadCount = "-";
this.threadCounts = "-";
@@ -407,35 +408,18 @@
* @param summary
*/
updateClusterSummary: function (summary) {
- // see if this node has been (dis)connected
- if (nfClusterSummary.isConnectedToCluster() !== summary.connectedToCluster) {
- if (summary.connectedToCluster) {
- nfDialog.showConnectedToClusterMessage();
- } else {
- nfDialog.showDisconnectedFromClusterMessage();
- }
- }
-
- var color = '#728E9B';
-
// update the connection state
if (summary.connectedToCluster) {
- if (nfCommon.isDefinedAndNotNull(summary.connectedNodes)) {
- var connectedNodes = summary.connectedNodes.split(' / ');
- if (connectedNodes.length === 2 && connectedNodes[0] !== connectedNodes[1]) {
- this.clusterConnectionWarning = true;
- color = '#BA554A';
- }
+ var connectedNodes = summary.connectedNodes.split(' / ');
+ if (connectedNodes.length === 2 && connectedNodes[0] !== connectedNodes[1]) {
+ this.clusterConnectionWarning = true;
+ } else {
+ this.clusterConnectionWarning = false;
}
- this.connectedNodesCount =
- nfCommon.isDefinedAndNotNull(summary.connectedNodes) ? summary.connectedNodes : '-';
+ this.connectedNodesCount = summary.connectedNodes;
} else {
this.connectedNodesCount = 'Disconnected';
- color = '#BA554A';
}
-
- // update the color
- $('#connected-nodes-count').closest('div.fa-cubes').css('color', color);
},
/**
@@ -467,6 +451,19 @@
},
/**
+ * Returns any additional styles to apply to the cluster label.
+ *
+ * @returns {string}
+ */
+ getExtraClusterStyles: function () {
+ if (this.connectedNodesCount === 'Disconnected' || this.clusterConnectionWarning === true) {
+ return 'warning';
+ }
+
+ return '';
+ },
+
+ /**
* Update the flow status counts.
*
* @param status The controller status returned from the `../nifi-api/flow/status` endpoint.
http://git-wip-us.apache.org/repos/asf/nifi/blob/05a1d630/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/controllers/nf-ng-canvas-operate-controller.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/controllers/nf-ng-canvas-operate-controller.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/controllers/nf-ng-canvas-operate-controller.js
index c1068bb..f22f3a7 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/controllers/nf-ng-canvas-operate-controller.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/controllers/nf-ng-canvas-operate-controller.js
@@ -22,19 +22,21 @@
define(['jquery',
'd3',
'nf.Dialog',
+ 'nf.Storage',
'nf.Birdseye',
'nf.CanvasUtils',
'nf.Common',
'nf.Client',
'nf.Processor'],
- function ($, d3, nfDialog, nfBirdseye, nfCanvasUtils, nfCommon, nfClient, nfProcessor) {
- return (nf.ng.Canvas.OperateCtrl = factory($, d3, nfDialog, nfBirdseye, nfCanvasUtils, nfCommon, nfClient, nfProcessor));
+ function ($, d3, nfDialog, nfStorage, nfBirdseye, nfCanvasUtils, nfCommon, nfClient, nfProcessor) {
+ return (nf.ng.Canvas.OperateCtrl = factory($, d3, nfDialog, nfStorage, nfBirdseye, nfCanvasUtils, nfCommon, nfClient, nfProcessor));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.ng.Canvas.OperateCtrl =
factory(require('jquery'),
require('d3'),
require('nf.Dialog'),
+ require('nf.Storage'),
require('nf.Birdseye'),
require('nf.CanvasUtils'),
require('nf.Common'),
@@ -44,13 +46,14 @@
nf.ng.Canvas.OperateCtrl = factory(root.$,
root.d3,
root.nf.Dialog,
+ root.nf.Storage,
root.nf.Birdseye,
root.nf.CanvasUtils,
root.nf.Common,
root.nf.Client,
root.nf.Processor);
}
-}(this, function ($, d3, nfDialog, nfBirdseye, nfCanvasUtils, nfCommon, nfClient, nfProcessor) {
+}(this, function ($, d3, nfDialog, nfStorage, nfBirdseye, nfCanvasUtils, nfCommon, nfClient, nfProcessor) {
'use strict';
return function () {
@@ -153,6 +156,12 @@
url: '../nifi-api/process-groups/',
dataType: 'xml',
beforeSubmit: function (formData, $form, options) {
+ // indicate if a disconnected node is acknowledged
+ formData.push({
+ name: 'disconnectedNodeAcknowledged',
+ value: nfStorage.isDisconnectionAcknowledged()
+ });
+
// ensure uploading to the current process group
options.url += (encodeURIComponent(nfCanvasUtils.getGroupId()) + '/templates/upload');
},
@@ -335,6 +344,7 @@
// build the request entity
var entity = {
'revision': nfClient.getRevision(selectedData),
+ 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(),
'component': {
'id': selectedData.id,
'style': {
http://git-wip-us.apache.org/repos/asf/nifi/blob/05a1d630/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-funnel-component.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-funnel-component.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-funnel-component.js
index 1384954..700f6d3 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-funnel-component.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-funnel-component.js
@@ -22,17 +22,19 @@
define(['jquery',
'nf.Client',
'nf.Birdseye',
+ 'nf.Storage',
'nf.Graph',
'nf.CanvasUtils',
'nf.ErrorHandler'],
- function ($, nfClient, nfBirdseye, nfGraph, nfCanvasUtils, nfErrorHandler) {
- return (nf.ng.FunnelComponent = factory($, nfClient, nfBirdseye, nfGraph, nfCanvasUtils, nfErrorHandler));
+ function ($, nfClient, nfBirdseye, nfStorage, nfGraph, nfCanvasUtils, nfErrorHandler) {
+ return (nf.ng.FunnelComponent = factory($, nfClient, nfBirdseye, nfStorage, nfGraph, nfCanvasUtils, nfErrorHandler));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.ng.FunnelComponent =
factory(require('jquery'),
require('nf.Client'),
require('nf.Birdseye'),
+ require('nf.Storage'),
require('nf.Graph'),
require('nf.CanvasUtils'),
require('nf.ErrorHandler')));
@@ -40,11 +42,12 @@
nf.ng.FunnelComponent = factory(root.$,
root.nf.Client,
root.nf.Birdseye,
+ root.nf.Storage,
root.nf.Graph,
root.nf.CanvasUtils,
root.nf.ErrorHandler);
}
-}(this, function ($, nfClient, nfBirdseye, nfGraph, nfCanvasUtils, nfErrorHandler) {
+}(this, function ($, nfClient, nfBirdseye, nfStorage, nfGraph, nfCanvasUtils, nfErrorHandler) {
'use strict';
return function (serviceProvider) {
@@ -113,6 +116,7 @@
'version': 0
}
}),
+ 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(),
'component': {
'position': {
'x': pt.x,
http://git-wip-us.apache.org/repos/asf/nifi/blob/05a1d630/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-group-component.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-group-component.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-group-component.js
index 0458b87..9f603b2 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-group-component.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-group-component.js
@@ -22,19 +22,21 @@
define(['jquery',
'nf.Client',
'nf.Birdseye',
+ 'nf.Storage',
'nf.Graph',
'nf.CanvasUtils',
'nf.ErrorHandler',
'nf.Common',
'nf.Dialog'],
- function ($, nfClient, nfBirdseye, nfGraph, nfCanvasUtils, nfErrorHandler, nfCommon, nfDialog) {
- return (nf.ng.GroupComponent = factory($, nfClient, nfBirdseye, nfGraph, nfCanvasUtils, nfErrorHandler, nfCommon, nfDialog));
+ function ($, nfClient, nfBirdseye, nfStorage, nfGraph, nfCanvasUtils, nfErrorHandler, nfCommon, nfDialog) {
+ return (nf.ng.GroupComponent = factory($, nfClient, nfBirdseye, nfStorage, nfGraph, nfCanvasUtils, nfErrorHandler, nfCommon, nfDialog));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.ng.GroupComponent =
factory(require('jquery'),
require('nf.Client'),
require('nf.Birdseye'),
+ require('nf.Storage'),
require('nf.Graph'),
require('nf.CanvasUtils'),
require('nf.ErrorHandler'),
@@ -44,13 +46,14 @@
nf.ng.GroupComponent = factory(root.$,
root.nf.Client,
root.nf.Birdseye,
+ root.nf.Storage,
root.nf.Graph,
root.nf.CanvasUtils,
root.nf.ErrorHandler,
root.nf.Common,
root.nf.Dialog);
}
-}(this, function ($, nfClient, nfBirdseye, nfGraph, nfCanvasUtils, nfErrorHandler, nfCommon, nfDialog) {
+}(this, function ($, nfClient, nfBirdseye, nfStorage, nfGraph, nfCanvasUtils, nfErrorHandler, nfCommon, nfDialog) {
'use strict';
return function (serviceProvider) {
@@ -69,6 +72,7 @@
'version': 0
}
}),
+ 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(),
'component': {
'name': groupName,
'position': {
http://git-wip-us.apache.org/repos/asf/nifi/blob/05a1d630/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-input-port-component.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-input-port-component.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-input-port-component.js
index 3c682a9..9bcc56a 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-input-port-component.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-input-port-component.js
@@ -22,17 +22,19 @@
define(['jquery',
'nf.Client',
'nf.Birdseye',
+ 'nf.Storage',
'nf.Graph',
'nf.CanvasUtils',
'nf.ErrorHandler'],
- function ($, nfClient, nfBirdseye, nfGraph, nfCanvasUtils, nfErrorHandler) {
- return (nf.ng.InputPortComponent = factory($, nfClient, nfBirdseye, nfGraph, nfCanvasUtils, nfErrorHandler));
+ function ($, nfClient, nfBirdseye, nfStorage, nfGraph, nfCanvasUtils, nfErrorHandler) {
+ return (nf.ng.InputPortComponent = factory($, nfClient, nfBirdseye, nfStorage, nfGraph, nfCanvasUtils, nfErrorHandler));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.ng.InputPortComponent =
factory(require('jquery'),
require('nf.Client'),
require('nf.Birdseye'),
+ require('nf.Storage'),
require('nf.Graph'),
require('nf.CanvasUtils'),
require('nf.ErrorHandler')));
@@ -40,11 +42,12 @@
nf.ng.InputPortComponent = factory(root.$,
root.nf.Client,
root.nf.Birdseye,
+ root.nf.Storage,
root.nf.Graph,
root.nf.CanvasUtils,
root.nf.ErrorHandler);
}
-}(this, function ($, nfClient, nfBirdseye, nfGraph, nfCanvasUtils, nfErrorHandler) {
+}(this, function ($, nfClient, nfBirdseye, nfStorage, nfGraph, nfCanvasUtils, nfErrorHandler) {
'use strict';
return function (serviceProvider) {
@@ -63,6 +66,7 @@
'version': 0
}
}),
+ 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(),
'component': {
'name': portName,
'position': {
http://git-wip-us.apache.org/repos/asf/nifi/blob/05a1d630/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-label-component.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-label-component.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-label-component.js
index 394c395..a0e23ca 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-label-component.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-label-component.js
@@ -22,18 +22,20 @@
define(['jquery',
'nf.Client',
'nf.Birdseye',
+ 'nf.Storage',
'nf.Graph',
'nf.CanvasUtils',
'nf.ErrorHandler',
'nf.Label'],
- function ($, nfClient, nfBirdseye, nfGraph, nfCanvasUtils, nfErrorHandler, nfLabel) {
- return (nf.ng.LabelComponent = factory($, nfClient, nfBirdseye, nfGraph, nfCanvasUtils, nfErrorHandler, nfLabel));
+ function ($, nfClient, nfBirdseye, nfStorage, nfGraph, nfCanvasUtils, nfErrorHandler, nfLabel) {
+ return (nf.ng.LabelComponent = factory($, nfClient, nfBirdseye, nfStorage, nfGraph, nfCanvasUtils, nfErrorHandler, nfLabel));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.ng.LabelComponent =
factory(require('jquery'),
require('nf.Client'),
require('nf.Birdseye'),
+ require('nf.Storage'),
require('nf.Graph'),
require('nf.CanvasUtils'),
require('nf.ErrorHandler'),
@@ -42,12 +44,13 @@
nf.ng.LabelComponent = factory(root.$,
root.nf.Client,
root.nf.Birdseye,
+ root.nf.Storage,
root.nf.Graph,
root.nf.CanvasUtils,
root.nf.ErrorHandler,
root.nf.Label);
}
-}(this, function ($, nfClient, nfBirdseye, nfGraph, nfCanvasUtils, nfErrorHandler, nfLabel) {
+}(this, function ($, nfClient, nfBirdseye, nfStorage, nfGraph, nfCanvasUtils, nfErrorHandler, nfLabel) {
'use strict';
return function (serviceProvider) {
@@ -116,6 +119,7 @@
'version': 0
}
}),
+ 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(),
'component': {
'width': nfLabel.config.width,
'height': nfLabel.config.height,
http://git-wip-us.apache.org/repos/asf/nifi/blob/05a1d630/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-output-port-component.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-output-port-component.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-output-port-component.js
index 6bb1752..6abf4fb 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-output-port-component.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-output-port-component.js
@@ -22,17 +22,19 @@
define(['jquery',
'nf.Client',
'nf.Birdseye',
+ 'nf.Storage',
'nf.Graph',
'nf.CanvasUtils',
'nf.ErrorHandler'],
- function ($, nfClient, nfBirdseye, nfGraph, nfCanvasUtils, nfErrorHandler) {
- return (nf.ng.OutputPortComponent = factory($, nfClient, nfBirdseye, nfGraph, nfCanvasUtils, nfErrorHandler));
+ function ($, nfClient, nfBirdseye, nfStorage, nfGraph, nfCanvasUtils, nfErrorHandler) {
+ return (nf.ng.OutputPortComponent = factory($, nfClient, nfBirdseye, nfStorage, nfGraph, nfCanvasUtils, nfErrorHandler));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.ng.OutputPortComponent =
factory(require('jquery'),
require('nf.Client'),
require('nf.Birdseye'),
+ require('nf.Storage'),
require('nf.Graph'),
require('nf.CanvasUtils'),
require('nf.ErrorHandler')));
@@ -40,11 +42,12 @@
nf.ng.OutputPortComponent = factory(root.$,
root.nf.Client,
root.nf.Birdseye,
+ root.nf.Storage,
root.nf.Graph,
root.nf.CanvasUtils,
root.nf.ErrorHandler);
}
-}(this, function ($, nfClient, nfBirdseye, nfGraph, nfCanvasUtils, nfErrorHandler) {
+}(this, function ($, nfClient, nfBirdseye, nfStorage, nfGraph, nfCanvasUtils, nfErrorHandler) {
'use strict';
return function (serviceProvider) {
@@ -63,6 +66,7 @@
'version': 0
}
}),
+ 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(),
'component': {
'name': portName,
'position': {
http://git-wip-us.apache.org/repos/asf/nifi/blob/05a1d630/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-processor-component.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-processor-component.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-processor-component.js
index c111dcf..5caa131 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-processor-component.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-processor-component.js
@@ -23,14 +23,15 @@
'Slick',
'nf.Client',
'nf.Birdseye',
+ 'nf.Storage',
'nf.Graph',
'nf.CanvasUtils',
'nf.ErrorHandler',
'nf.FilteredDialogCommon',
'nf.Dialog',
'nf.Common'],
- function ($, Slick, nfClient, nfBirdseye, nfGraph, nfCanvasUtils, nfErrorHandler, nfFilteredDialogCommon, nfDialog, nfCommon) {
- return (nf.ng.ProcessorComponent = factory($, Slick, nfClient, nfBirdseye, nfGraph, nfCanvasUtils, nfErrorHandler, nfFilteredDialogCommon, nfDialog, nfCommon));
+ function ($, Slick, nfClient, nfBirdseye, nfStorage, nfGraph, nfCanvasUtils, nfErrorHandler, nfFilteredDialogCommon, nfDialog, nfCommon) {
+ return (nf.ng.ProcessorComponent = factory($, Slick, nfClient, nfBirdseye, nfStorage, nfGraph, nfCanvasUtils, nfErrorHandler, nfFilteredDialogCommon, nfDialog, nfCommon));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.ng.ProcessorComponent =
@@ -38,6 +39,7 @@
require('Slick'),
require('nf.Client'),
require('nf.Birdseye'),
+ require('nf.Storage'),
require('nf.Graph'),
require('nf.CanvasUtils'),
require('nf.ErrorHandler'),
@@ -49,6 +51,7 @@
root.Slick,
root.nf.Client,
root.nf.Birdseye,
+ root.nf.Storage,
root.nf.Graph,
root.nf.CanvasUtils,
root.nf.ErrorHandler,
@@ -56,7 +59,7 @@
root.nf.Dialog,
root.nf.Common);
}
-}(this, function ($, Slick, nfClient, nfBirdseye, nfGraph, nfCanvasUtils, nfErrorHandler, nfFilteredDialogCommon, nfDialog, nfCommon) {
+}(this, function ($, Slick, nfClient, nfBirdseye, nfStorage, nfGraph, nfCanvasUtils, nfErrorHandler, nfFilteredDialogCommon, nfDialog, nfCommon) {
'use strict';
return function (serviceProvider) {
@@ -248,6 +251,7 @@
'version': 0
}
}),
+ 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(),
'component': {
'type': processorType,
'bundle': bundle,
http://git-wip-us.apache.org/repos/asf/nifi/blob/05a1d630/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-remote-process-group-component.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-remote-process-group-component.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-remote-process-group-component.js
index 08f1b1a..30b5ccb 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-remote-process-group-component.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-remote-process-group-component.js
@@ -22,19 +22,21 @@
define(['jquery',
'nf.Client',
'nf.Birdseye',
+ 'nf.Storage',
'nf.Graph',
'nf.CanvasUtils',
'nf.ErrorHandler',
'nf.Dialog',
'nf.Common'],
- function ($, nfClient, nfBirdseye, nfGraph, nfCanvasUtils, nfErrorHandler, nfDialog, nfCommon) {
- return (nf.ng.RemoteProcessGroupComponent = factory($, nfClient, nfBirdseye, nfGraph, nfCanvasUtils, nfErrorHandler, nfDialog, nfCommon));
+ function ($, nfClient, nfBirdseye, nfStorage, nfGraph, nfCanvasUtils, nfErrorHandler, nfDialog, nfCommon) {
+ return (nf.ng.RemoteProcessGroupComponent = factory($, nfClient, nfBirdseye, nfStorage, nfGraph, nfCanvasUtils, nfErrorHandler, nfDialog, nfCommon));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.ng.RemoteProcessGroupComponent =
factory(require('jquery'),
require('nf.Client'),
require('nf.Birdseye'),
+ require('nf.Storage'),
require('nf.Graph'),
require('nf.CanvasUtils'),
require('nf.ErrorHandler'),
@@ -44,13 +46,14 @@
nf.ng.RemoteProcessGroupComponent = factory(root.$,
root.nf.Client,
root.nf.Birdseye,
+ root.nf.Storage,
root.nf.Graph,
root.nf.CanvasUtils,
root.nf.ErrorHandler,
root.nf.Dialog,
root.nf.Common);
}
-}(this, function ($, nfClient, nfBirdseye, nfGraph, nfCanvasUtils, nfErrorHandler, nfDialog, nfCommon) {
+}(this, function ($, nfClient, nfBirdseye, nfStorage, nfGraph, nfCanvasUtils, nfErrorHandler, nfDialog, nfCommon) {
'use strict';
return function (serviceProvider) {
@@ -69,6 +72,7 @@
'version': 0
}
}),
+ 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(),
'component': {
'targetUris': $('#new-remote-process-group-uris').val(),
'position': {
http://git-wip-us.apache.org/repos/asf/nifi/blob/05a1d630/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-template-component.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-template-component.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-template-component.js
index 99fe0ec..a23269a 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-template-component.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-template-component.js
@@ -22,19 +22,21 @@
define(['jquery',
'nf.Client',
'nf.Birdseye',
+ 'nf.Storage',
'nf.Graph',
'nf.CanvasUtils',
'nf.ErrorHandler',
'nf.Dialog',
'nf.Common'],
- function ($, nfClient, nfBirdseye, nfGraph, nfCanvasUtils, nfErrorHandler, nfDialog, nfCommon) {
- return (nf.ng.TemplateComponent = factory($, nfClient, nfBirdseye, nfGraph, nfCanvasUtils, nfErrorHandler, nfDialog, nfCommon));
+ function ($, nfClient, nfBirdseye, nfStorage, nfGraph, nfCanvasUtils, nfErrorHandler, nfDialog, nfCommon) {
+ return (nf.ng.TemplateComponent = factory($, nfClient, nfBirdseye, nfStorage, nfGraph, nfCanvasUtils, nfErrorHandler, nfDialog, nfCommon));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.ng.TemplateComponent =
factory(require('jquery'),
require('nf.Client'),
require('nf.Birdseye'),
+ require('nf.Storage'),
require('nf.Graph'),
require('nf.CanvasUtils'),
require('nf.ErrorHandler'),
@@ -44,13 +46,14 @@
nf.ng.TemplateComponent = factory(root.$,
root.nf.Client,
root.nf.Birdseye,
+ root.nf.Storage,
root.nf.Graph,
root.nf.CanvasUtils,
root.nf.ErrorHandler,
root.nf.Dialog,
root.nf.Common);
}
-}(this, function ($, nfClient, nfBirdseye, nfGraph, nfCanvasUtils, nfErrorHandler, nfDialog, nfCommon) {
+}(this, function ($, nfClient, nfBirdseye, nfStorage, nfGraph, nfCanvasUtils, nfErrorHandler, nfDialog, nfCommon) {
'use strict';
return function (serviceProvider) {
@@ -66,7 +69,8 @@
var instantiateTemplateInstance = {
'templateId': templateId,
'originX': pt.x,
- 'originY': pt.y
+ 'originY': pt.y,
+ 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged()
};
// create a new instance of the new template
http://git-wip-us.apache.org/repos/asf/nifi/blob/05a1d630/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-actions.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-actions.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-actions.js
index b8587cd..33d108f 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-actions.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-actions.js
@@ -24,6 +24,7 @@
'nf.CanvasUtils',
'nf.Common',
'nf.Dialog',
+ 'nf.Storage',
'nf.Client',
'nf.ErrorHandler',
'nf.Clipboard',
@@ -56,8 +57,8 @@
'nf.ComponentVersion',
'nf.QueueListing',
'nf.StatusHistory'],
- function ($, d3, nfCanvasUtils, nfCommon, nfDialog, nfClient, nfErrorHandler, nfClipboard, nfSnippet, nfGoto, nfNgBridge, nfShell, nfVariableRegistry, nfComponentState, nfFlowVersion, nfDraggable, nfBirdseye, nfConnection, nfGraph, nfProcessGroupConfiguration, nfProcessorConfiguration, nfProcessorDetails, nfLabelConfiguration, nfRemoteProcessGroupConfiguration, nfRemoteProcessGroupDetails, nfPortConfiguration, nfPortDetails, nfConnectionConfiguration, nfConnectionDetails, nfPolicyManagement, nfRemoteProcessGroup, nfLabel, nfProcessor, nfRemoteProcessGroupPorts, nfComponentVersion, nfQueueListing, nfStatusHistory) {
- return (nf.Actions = factory($, d3, nfCanvasUtils, nfCommon, nfDialog, nfClient, nfErrorHandler, nfClipboard, nfSnippet, nfGoto, nfNgBridge, nfShell, nfVariableRegistry, nfComponentState, nfFlowVersion, nfDraggable, nfBirdseye, nfConnection, nfGraph, nfProcessGroupConfiguration, nfProcessorConfiguration, nfProcessorDetails, nfLabelConfiguration, nfRemoteProcessGroupConfiguration, nfRemoteProcessGroupDetails, nfPortConfiguration, nfPortDetails, nfConnectionConfiguration, nfConnectionDetails, nfPolicyManagement, nfRemoteProcessGroup, nfLabel, nfProcessor, nfRemoteProcessGroupPorts, nfComponentVersion, nfQueueListing, nfStatusHistory));
+ function ($, d3, nfCanvasUtils, nfCommon, nfDialog, nfStorage, nfClient, nfErrorHandler, nfClipboard, nfSnippet, nfGoto, nfNgBridge, nfShell, nfVariableRegistry, nfComponentState, nfFlowVersion, nfDraggable, nfBirdseye, nfConnection, nfGraph, nfProcessGroupConfiguration, nfProcessorConfiguration, nfProcessorDetails, nfLabelConfiguration, nfRemoteProcessGroupConfiguration, nfRemoteProcessGroupDetails, nfPortConfiguration, nfPortDetails, nfConnectionConfiguration, nfConnectionDetails, nfPolicyManagement, nfRemoteProcessGroup, nfLabel, nfProcessor, nfRemoteProcessGroupPorts, nfComponentVersion, nfQueueListing, nfStatusHistory) {
+ return (nf.Actions = factory($, d3, nfCanvasUtils, nfCommon, nfDialog, nfStorage, nfClient, nfErrorHandler, nfClipboard, nfSnippet, nfGoto, nfNgBridge, nfShell, nfVariableRegistry, nfComponentState, nfFlowVersion, nfDraggable, nfBirdseye, nfConnection, nfGraph, nfProcessGroupConfiguration, nfProcessorConfiguration, nfProcessorDetails, nfLabelConfiguration, nfRemoteProcessGroupConfiguration, nfRemoteProcessGroupDetails, nfPortConfiguration, nfPortDetails, nfConnectionConfiguration, nfConnectionDetails, nfPolicyManagement, nfRemoteProcessGroup, nfLabel, nfProcessor, nfRemoteProcessGroupPorts, nfComponentVersion, nfQueueListing, nfStatusHistory));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.Actions =
@@ -66,6 +67,7 @@
require('nf.CanvasUtils'),
require('nf.Common'),
require('nf.Dialog'),
+ require('nf.Storage'),
require('nf.Client'),
require('nf.ErrorHandler'),
require('nf.Clipboard'),
@@ -104,6 +106,7 @@
root.nf.CanvasUtils,
root.nf.Common,
root.nf.Dialog,
+ root.nf.Storage,
root.nf.Client,
root.nf.ErrorHandler,
root.nf.Clipboard,
@@ -137,7 +140,7 @@
root.nf.QueueListing,
root.nf.StatusHistory);
}
-}(this, function ($, d3, nfCanvasUtils, nfCommon, nfDialog, nfClient, nfErrorHandler, nfClipboard, nfSnippet, nfGoto, nfNgBridge, nfShell, nfVariableRegistry, nfComponentState, nfFlowVersion, nfDraggable, nfBirdseye, nfConnection, nfGraph, nfProcessGroupConfiguration, nfProcessorConfiguration, nfProcessorDetails, nfLabelConfiguration, nfRemoteProcessGroupConfiguration, nfRemoteProcessGroupDetails, nfPortConfiguration, nfPortDetails, nfConnectionConfiguration, nfConnectionDetails, nfPolicyManagement, nfRemoteProcessGroup, nfLabel, nfProcessor, nfRemoteProcessGroupPorts, nfComponentVersion, nfQueueListing, nfStatusHistory) {
+}(this, function ($, d3, nfCanvasUtils, nfCommon, nfDialog, nfStorage, nfClient, nfErrorHandler, nfClipboard, nfSnippet, nfGoto, nfNgBridge, nfShell, nfVariableRegistry, nfComponentState, nfFlowVersion, nfDraggable, nfBirdseye, nfConnection, nfGraph, nfProcessGroupConfiguration, nfProcessorConfiguration, nfProcessorDetails, nfLabelConfiguration, nfRemoteProcessGroupConfiguration, nfRemoteProcessGroupDetails, nfPortConfiguration, nfPortDetails, nfConnectionConfiguration, nfConnectionDetails, nfPolicyManagement, nfRemoteProcessGroup, nfLabel, nfProcessor, nfRemoteProcessGroupPorts, nfComponentVersion, nfQueueListing, nfStatusHistory) {
'use strict';
var config = {
@@ -171,6 +174,8 @@
* @param {object} entity
*/
var updateResource = function (uri, entity) {
+ entity['disconnectedNodeAcknowledged'] = nfStorage.isDisconnectionAcknowledged();
+
return $.ajax({
type: 'PUT',
url: uri,
@@ -973,8 +978,9 @@
$.ajax({
type: 'DELETE',
url: selectionData.uri + '?' + $.param({
- version: revision.version,
- clientId: revision.clientId
+ 'version': revision.version,
+ 'clientId': revision.clientId,
+ 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged()
}),
dataType: 'json'
}).done(function (response) {
@@ -1675,7 +1681,8 @@
var createSnippetEntity = {
'name': templateName,
'description': templateDescription,
- 'snippetId': response.snippet.id
+ 'snippetId': response.snippet.id,
+ 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged()
};
// create the template
@@ -1863,6 +1870,7 @@
// build the connection entity
var connectionEntity = {
'revision': nfClient.getRevision(connection),
+ 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(),
'component': {
'id': connection.id,
'zIndex': zIndex
@@ -1878,7 +1886,7 @@
contentType: 'application/json'
}).done(function (response) {
nfConnection.set(response);
- });
+ }).fail(nfErrorHandler.handleAjaxError);
}
}
};
http://git-wip-us.apache.org/repos/asf/nifi/blob/05a1d630/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-bootstrap.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-bootstrap.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-bootstrap.js
index 4286bff..14aaf71 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-bootstrap.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-bootstrap.js
@@ -25,7 +25,6 @@
'nf.CanvasUtils',
'nf.ErrorHandler',
'nf.Client',
- 'nf.ClusterSummary',
'nf.Dialog',
'nf.Storage',
'nf.Canvas',
@@ -83,8 +82,8 @@
'nf.ng.Canvas.OperateCtrl',
'nf.ng.BreadcrumbsDirective',
'nf.ng.DraggableDirective'],
- function ($, angular, nfCommon, nfCanvasUtils, nfErrorHandler, nfClient, nfClusterSummary, nfDialog, nfStorage, nfCanvas, nfGraph, nfContextMenu, nfQuickSelect, nfShell, nfSettings, nfActions, nfSnippet, nfQueueListing, nfVariableRegistry, nfComponentState, nfFlowVersion, nfComponentVersion, nfDraggable, nfConnectable, nfStatusHistory, nfBirdseye, nfConnectionConfiguration, nfControllerService, nfReportingTask, nfPolicyManagement, nfProcessorConfiguration, nfProcessGroupConfiguration, nfControllerServices, nfRemoteProcessGroupConfiguration, nfRemoteProcessGroupPorts, nfPortConfiguration, nfLabelConfiguration, nfProcessorDetails, nfPortDetails, nfConnectionDetails, nfRemoteProcessGroupDetails, nfGoto, nfNgBridge, appCtrl, appConfig, serviceProvider, breadcrumbsCtrl, headerCtrl, flowStatusCtrl, globalMenuCtrl, toolboxCtrl, processorComponent, inputPortComponent, outputPortComponent, processGroupComponent, remoteProcessGroupComponent, funnelComponent, templateComponent, lab
elComponent, graphControlsCtrl, navigateCtrl, operateCtrl, breadcrumbsDirective, draggableDirective) {
- return factory($, angular, nfCommon, nfCanvasUtils, nfErrorHandler, nfClient, nfClusterSummary, nfDialog, nfStorage, nfCanvas, nfGraph, nfContextMenu, nfQuickSelect, nfShell, nfSettings, nfActions, nfSnippet, nfQueueListing, nfVariableRegistry, nfComponentState, nfFlowVersion, nfComponentVersion, nfDraggable, nfConnectable, nfStatusHistory, nfBirdseye, nfConnectionConfiguration, nfControllerService, nfReportingTask, nfPolicyManagement, nfProcessorConfiguration, nfProcessGroupConfiguration, nfControllerServices, nfRemoteProcessGroupConfiguration, nfRemoteProcessGroupPorts, nfPortConfiguration, nfLabelConfiguration, nfProcessorDetails, nfPortDetails, nfConnectionDetails, nfRemoteProcessGroupDetails, nfGoto, nfNgBridge, appCtrl, appConfig, serviceProvider, breadcrumbsCtrl, headerCtrl, flowStatusCtrl, globalMenuCtrl, toolboxCtrl, processorComponent, inputPortComponent, outputPortComponent, processGroupComponent, remoteProcessGroupComponent, funnelComponent, templateCompo
nent, labelComponent, graphControlsCtrl, navigateCtrl, operateCtrl, breadcrumbsDirective, draggableDirective);
+ function ($, angular, nfCommon, nfCanvasUtils, nfErrorHandler, nfClient, nfDialog, nfStorage, nfCanvas, nfGraph, nfContextMenu, nfQuickSelect, nfShell, nfSettings, nfActions, nfSnippet, nfQueueListing, nfVariableRegistry, nfComponentState, nfFlowVersion, nfComponentVersion, nfDraggable, nfConnectable, nfStatusHistory, nfBirdseye, nfConnectionConfiguration, nfControllerService, nfReportingTask, nfPolicyManagement, nfProcessorConfiguration, nfProcessGroupConfiguration, nfControllerServices, nfRemoteProcessGroupConfiguration, nfRemoteProcessGroupPorts, nfPortConfiguration, nfLabelConfiguration, nfProcessorDetails, nfPortDetails, nfConnectionDetails, nfRemoteProcessGroupDetails, nfGoto, nfNgBridge, appCtrl, appConfig, serviceProvider, breadcrumbsCtrl, headerCtrl, flowStatusCtrl, globalMenuCtrl, toolboxCtrl, processorComponent, inputPortComponent, outputPortComponent, processGroupComponent, remoteProcessGroupComponent, funnelComponent, templateComponent, labelComponent, graph
ControlsCtrl, navigateCtrl, operateCtrl, breadcrumbsDirective, draggableDirective) {
+ return factory($, angular, nfCommon, nfCanvasUtils, nfErrorHandler, nfClient, nfDialog, nfStorage, nfCanvas, nfGraph, nfContextMenu, nfQuickSelect, nfShell, nfSettings, nfActions, nfSnippet, nfQueueListing, nfVariableRegistry, nfComponentState, nfFlowVersion, nfComponentVersion, nfDraggable, nfConnectable, nfStatusHistory, nfBirdseye, nfConnectionConfiguration, nfControllerService, nfReportingTask, nfPolicyManagement, nfProcessorConfiguration, nfProcessGroupConfiguration, nfControllerServices, nfRemoteProcessGroupConfiguration, nfRemoteProcessGroupPorts, nfPortConfiguration, nfLabelConfiguration, nfProcessorDetails, nfPortDetails, nfConnectionDetails, nfRemoteProcessGroupDetails, nfGoto, nfNgBridge, appCtrl, appConfig, serviceProvider, breadcrumbsCtrl, headerCtrl, flowStatusCtrl, globalMenuCtrl, toolboxCtrl, processorComponent, inputPortComponent, outputPortComponent, processGroupComponent, remoteProcessGroupComponent, funnelComponent, templateComponent, labelCompone
nt, graphControlsCtrl, navigateCtrl, operateCtrl, breadcrumbsDirective, draggableDirective);
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = factory(require('jquery'),
@@ -93,7 +92,6 @@
require('nf.CanvasUtils'),
require('nf.ErrorHandler'),
require('nf.Client'),
- require('nf.ClusterSummary'),
require('nf.Dialog'),
require('f.Storage'),
require('nf.Canvas'),
@@ -158,7 +156,6 @@
root.nf.CanvasUtils,
root.nf.ErrorHandler,
root.nf.Client,
- root.nf.ClusterSummary,
root.nf.Dialog,
root.nf.Storage,
root.nf.Canvas,
@@ -217,7 +214,7 @@
root.nf.ng.BreadcrumbsDirective,
root.nf.ng.DraggableDirective);
}
-}(this, function ($, angular, nfCommon, nfCanvasUtils, nfErrorHandler, nfClient, nfClusterSummary, nfDialog, nfStorage, nfCanvas, nfGraph, nfContextMenu, nfQuickSelect, nfShell, nfSettings, nfActions, nfSnippet, nfQueueListing, nfVariableRegistry, nfComponentState, nfFlowVersion, nfComponentVersion, nfDraggable, nfConnectable, nfStatusHistory, nfBirdseye, nfConnectionConfiguration, nfControllerService, nfReportingTask, nfPolicyManagement, nfProcessorConfiguration, nfProcessGroupConfiguration, nfControllerServices, nfRemoteProcessGroupConfiguration, nfRemoteProcessGroupPorts, nfPortConfiguration, nfLabelConfiguration, nfProcessorDetails, nfPortDetails, nfConnectionDetails, nfRemoteProcessGroupDetails, nfGoto, nfNgBridge, appCtrl, appConfig, serviceProvider, breadcrumbsCtrl, headerCtrl, flowStatusCtrl, globalMenuCtrl, toolboxCtrl, processorComponent, inputPortComponent, outputPortComponent, processGroupComponent, remoteProcessGroupComponent, funnelComponent, templateComponent, labelCo
mponent, graphControlsCtrl, navigateCtrl, operateCtrl, breadcrumbsDirective, draggableDirective) {
+}(this, function ($, angular, nfCommon, nfCanvasUtils, nfErrorHandler, nfClient, nfDialog, nfStorage, nfCanvas, nfGraph, nfContextMenu, nfQuickSelect, nfShell, nfSettings, nfActions, nfSnippet, nfQueueListing, nfVariableRegistry, nfComponentState, nfFlowVersion, nfComponentVersion, nfDraggable, nfConnectable, nfStatusHistory, nfBirdseye, nfConnectionConfiguration, nfControllerService, nfReportingTask, nfPolicyManagement, nfProcessorConfiguration, nfProcessGroupConfiguration, nfControllerServices, nfRemoteProcessGroupConfiguration, nfRemoteProcessGroupPorts, nfPortConfiguration, nfLabelConfiguration, nfProcessorDetails, nfPortDetails, nfConnectionDetails, nfRemoteProcessGroupDetails, nfGoto, nfNgBridge, appCtrl, appConfig, serviceProvider, breadcrumbsCtrl, headerCtrl, flowStatusCtrl, globalMenuCtrl, toolboxCtrl, processorComponent, inputPortComponent, outputPortComponent, processGroupComponent, remoteProcessGroupComponent, funnelComponent, templateComponent, labelComponent, graphCont
rolsCtrl, navigateCtrl, operateCtrl, breadcrumbsDirective, draggableDirective) {
var config = {
urls: {
@@ -315,7 +312,7 @@
});
// ensure the config requests are loaded
- $.when(configXhr, nfClusterSummary.loadClusterSummary(), userXhr, clientXhr).done(function (configResult) {
+ $.when(configXhr, userXhr, clientXhr).done(function (configResult) {
var configResponse = configResult[0];
// calculate the canvas offset
@@ -325,11 +322,6 @@
// get the config details
var configDetails = configResponse.flowConfiguration;
- // show disconnected message on load if necessary
- if (nfClusterSummary.isClustered() && !nfClusterSummary.isConnectedToCluster()) {
- nfDialog.showDisconnectedFromClusterMessage();
- }
-
// get the auto refresh interval
var autoRefreshIntervalSeconds = parseInt(configDetails.autoRefreshIntervalSeconds, 10);
http://git-wip-us.apache.org/repos/asf/nifi/blob/05a1d630/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
index 1afcae5..bd2906d 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
@@ -22,6 +22,7 @@
define(['jquery',
'd3',
'nf.Common',
+ 'nf.Dialog',
'nf.Graph',
'nf.Shell',
'nf.ng.Bridge',
@@ -33,14 +34,15 @@
'nf.ContextMenu',
'nf.Actions',
'nf.ProcessGroup'],
- function ($, d3, nfCommon, nfGraph, nfShell, nfNgBridge, nfClusterSummary, nfErrorHandler, nfStorage, nfCanvasUtils, nfBirdseye, nfContextMenu, nfActions, nfProcessGroup) {
- return (nf.Canvas = factory($, d3, nfCommon, nfGraph, nfShell, nfNgBridge, nfClusterSummary, nfErrorHandler, nfStorage, nfCanvasUtils, nfBirdseye, nfContextMenu, nfActions, nfProcessGroup));
+ function ($, d3, nfCommon, nfDialog, nfGraph, nfShell, nfNgBridge, nfClusterSummary, nfErrorHandler, nfStorage, nfCanvasUtils, nfBirdseye, nfContextMenu, nfActions, nfProcessGroup) {
+ return (nf.Canvas = factory($, d3, nfCommon, nfDialog, nfGraph, nfShell, nfNgBridge, nfClusterSummary, nfErrorHandler, nfStorage, nfCanvasUtils, nfBirdseye, nfContextMenu, nfActions, nfProcessGroup));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.Canvas =
factory(require('jquery'),
require('d3'),
require('nf.Common'),
+ require('nf.Dialog'),
require('nf.Graph'),
require('nf.Shell'),
require('nf.ng.Bridge'),
@@ -56,6 +58,7 @@
nf.Canvas = factory(root.$,
root.d3,
root.nf.Common,
+ root.nf.Dialog,
root.nf.Graph,
root.nf.Shell,
root.nf.ng.Bridge,
@@ -68,7 +71,7 @@
root.nf.Actions,
root.nf.ProcessGroup);
}
-}(this, function ($, d3, nfCommon, nfGraph, nfShell, nfNgBridge, nfClusterSummary, nfErrorHandler, nfStorage, nfCanvasUtils, nfBirdseye, nfContextMenu, nfActions, nfProcessGroup) {
+}(this, function ($, d3, nfCommon, nfDialog, nfGraph, nfShell, nfNgBridge, nfClusterSummary, nfErrorHandler, nfStorage, nfCanvasUtils, nfBirdseye, nfContextMenu, nfActions, nfProcessGroup) {
'use strict';
var SCALE = 1;
@@ -255,6 +258,19 @@
var clusterSummary = nfClusterSummary.loadClusterSummary().done(function (response) {
var clusterSummary = response.clusterSummary;
+ // see if this node has been (dis)connected
+ if (nfClusterSummary.didConnectedStateChange()) {
+ if (clusterSummary.connectedToCluster) {
+ nfDialog.showConnectedToClusterMessage(function () {
+ nfStorage.resetDisconnectionAcknowledgement();
+ });
+ } else {
+ nfDialog.showDisconnectedFromClusterMessage(function () {
+ nfStorage.acknowledgeDisconnection();
+ });
+ }
+ }
+
// update the cluster summary
nfNgBridge.injector.get('flowStatusCtrl').updateClusterSummary(clusterSummary);
});
http://git-wip-us.apache.org/repos/asf/nifi/blob/05a1d630/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-component-version.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-component-version.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-component-version.js
index 02abac1..e1b7f9b 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-component-version.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-component-version.js
@@ -172,6 +172,7 @@
// build the request entity
var requestEntity = {
'revision': nfClient.getRevision(componentEntity),
+ 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(),
'component': {
'id': componentEntity.id,
'bundle': {