mirror of
https://github.com/apache/nifi.git
synced 2025-02-28 22:49:10 +00:00
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 prior to performing modifications.
This commit is contained in:
parent
3a248e96de
commit
05a1d63090
@ -29,4 +29,14 @@ public interface NiFiWebConfigurationRequestContext extends NiFiWebRequestContex
|
||||
*/
|
||||
Revision getRevision();
|
||||
|
||||
/**
|
||||
* Returns whether the node disconnection is acknowledged. By acknowledging disconnection, the
|
||||
* user is able to modify the flow on a disconnected node.
|
||||
*
|
||||
* @return whether the disconnection is acknowledged
|
||||
*/
|
||||
default boolean isDisconnectionAcknowledged() {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -30,6 +30,7 @@ public class ActivateControllerServicesEntity extends Entity {
|
||||
private String id;
|
||||
private String state;
|
||||
private Map<String, RevisionDTO> components;
|
||||
private Boolean disconnectedNodeAcknowledged;
|
||||
|
||||
@ApiModelProperty("The id of the ProcessGroup")
|
||||
public String getId() {
|
||||
@ -61,4 +62,15 @@ public class ActivateControllerServicesEntity extends Entity {
|
||||
public void setComponents(Map<String, RevisionDTO> components) {
|
||||
this.components = components;
|
||||
}
|
||||
|
||||
@ApiModelProperty(
|
||||
value = "Acknowledges that this node is disconnected to allow for mutable requests to proceed."
|
||||
)
|
||||
public Boolean isDisconnectedNodeAcknowledged() {
|
||||
return disconnectedNodeAcknowledged;
|
||||
}
|
||||
|
||||
public void setDisconnectedNodeAcknowledged(Boolean disconnectedNodeAcknowledged) {
|
||||
this.disconnectedNodeAcknowledged = disconnectedNodeAcknowledged;
|
||||
}
|
||||
}
|
||||
|
@ -37,6 +37,7 @@ public class ComponentEntity extends Entity {
|
||||
private PositionDTO position;
|
||||
private PermissionsDTO permissions;
|
||||
private List<BulletinEntity> bulletins;
|
||||
private Boolean disconnectedNodeAcknowledged;
|
||||
|
||||
/**
|
||||
* @return revision for this request/response
|
||||
@ -132,6 +133,17 @@ public class ComponentEntity extends Entity {
|
||||
this.bulletins = bulletins;
|
||||
}
|
||||
|
||||
@ApiModelProperty(
|
||||
value = "Acknowledges that this node is disconnected to allow for mutable requests to proceed."
|
||||
)
|
||||
public Boolean isDisconnectedNodeAcknowledged() {
|
||||
return disconnectedNodeAcknowledged;
|
||||
}
|
||||
|
||||
public void setDisconnectedNodeAcknowledged(Boolean disconnectedNodeAcknowledged) {
|
||||
this.disconnectedNodeAcknowledged = disconnectedNodeAcknowledged;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(id);
|
||||
|
@ -32,6 +32,7 @@ public class ControllerConfigurationEntity extends Entity implements Permissible
|
||||
private ControllerConfigurationDTO controllerConfiguration;
|
||||
private RevisionDTO revision;
|
||||
private PermissionsDTO permissions;
|
||||
private Boolean disconnectedNodeAcknowledged;
|
||||
|
||||
/**
|
||||
* @return revision for this request/response
|
||||
@ -83,4 +84,14 @@ public class ControllerConfigurationEntity extends Entity implements Permissible
|
||||
this.permissions = permissions;
|
||||
}
|
||||
|
||||
@ApiModelProperty(
|
||||
value = "Acknowledges that this node is disconnected to allow for mutable requests to proceed."
|
||||
)
|
||||
public Boolean isDisconnectedNodeAcknowledged() {
|
||||
return disconnectedNodeAcknowledged;
|
||||
}
|
||||
|
||||
public void setDisconnectedNodeAcknowledged(Boolean disconnectedNodeAcknowledged) {
|
||||
this.disconnectedNodeAcknowledged = disconnectedNodeAcknowledged;
|
||||
}
|
||||
}
|
||||
|
@ -29,6 +29,7 @@ public class CopySnippetRequestEntity extends Entity {
|
||||
private String snippetId;
|
||||
private Double originX;
|
||||
private Double originY;
|
||||
private Boolean disconnectedNodeAcknowledged;
|
||||
|
||||
@ApiModelProperty(
|
||||
value = "The identifier of the snippet."
|
||||
@ -62,4 +63,15 @@ public class CopySnippetRequestEntity extends Entity {
|
||||
public void setOriginY(Double originY) {
|
||||
this.originY = originY;
|
||||
}
|
||||
|
||||
@ApiModelProperty(
|
||||
value = "Acknowledges that this node is disconnected to allow for mutable requests to proceed."
|
||||
)
|
||||
public Boolean isDisconnectedNodeAcknowledged() {
|
||||
return disconnectedNodeAcknowledged;
|
||||
}
|
||||
|
||||
public void setDisconnectedNodeAcknowledged(Boolean disconnectedNodeAcknowledged) {
|
||||
this.disconnectedNodeAcknowledged = disconnectedNodeAcknowledged;
|
||||
}
|
||||
}
|
||||
|
@ -24,6 +24,7 @@ import javax.xml.bind.annotation.XmlRootElement;
|
||||
@XmlRootElement(name = "createActiveRequestEntity")
|
||||
public class CreateActiveRequestEntity extends Entity {
|
||||
private String processGroupId;
|
||||
private Boolean disconnectedNodeAcknowledged;
|
||||
|
||||
@ApiModelProperty("The Process Group ID that this active request will update")
|
||||
public String getProcessGroupId() {
|
||||
@ -33,4 +34,15 @@ public class CreateActiveRequestEntity extends Entity {
|
||||
public void setProcessGroupId(String processGroupId) {
|
||||
this.processGroupId = processGroupId;
|
||||
}
|
||||
|
||||
@ApiModelProperty(
|
||||
value = "Acknowledges that this node is disconnected to allow for mutable requests to proceed."
|
||||
)
|
||||
public Boolean isDisconnectedNodeAcknowledged() {
|
||||
return disconnectedNodeAcknowledged;
|
||||
}
|
||||
|
||||
public void setDisconnectedNodeAcknowledged(Boolean disconnectedNodeAcknowledged) {
|
||||
this.disconnectedNodeAcknowledged = disconnectedNodeAcknowledged;
|
||||
}
|
||||
}
|
||||
|
@ -29,6 +29,7 @@ public class CreateTemplateRequestEntity extends Entity {
|
||||
private String name;
|
||||
private String description;
|
||||
private String snippetId;
|
||||
private Boolean disconnectedNodeAcknowledged;
|
||||
|
||||
@ApiModelProperty(
|
||||
value = "The name of the template."
|
||||
@ -62,4 +63,15 @@ public class CreateTemplateRequestEntity extends Entity {
|
||||
public void setSnippetId(String snippetId) {
|
||||
this.snippetId = snippetId;
|
||||
}
|
||||
|
||||
@ApiModelProperty(
|
||||
value = "Acknowledges that this node is disconnected to allow for mutable requests to proceed."
|
||||
)
|
||||
public Boolean isDisconnectedNodeAcknowledged() {
|
||||
return disconnectedNodeAcknowledged;
|
||||
}
|
||||
|
||||
public void setDisconnectedNodeAcknowledged(Boolean disconnectedNodeAcknowledged) {
|
||||
this.disconnectedNodeAcknowledged = disconnectedNodeAcknowledged;
|
||||
}
|
||||
}
|
||||
|
@ -33,6 +33,7 @@ public class InstantiateTemplateRequestEntity extends Entity {
|
||||
private String templateId;
|
||||
private String encodingVersion;
|
||||
private FlowSnippetDTO snippet;
|
||||
private Boolean disconnectedNodeAcknowledged;
|
||||
|
||||
@ApiModelProperty(
|
||||
value = "The identifier of the template."
|
||||
@ -93,4 +94,15 @@ public class InstantiateTemplateRequestEntity extends Entity {
|
||||
public void setSnippet(FlowSnippetDTO snippet) {
|
||||
this.snippet = snippet;
|
||||
}
|
||||
|
||||
@ApiModelProperty(
|
||||
value = "Acknowledges that this node is disconnected to allow for mutable requests to proceed."
|
||||
)
|
||||
public Boolean isDisconnectedNodeAcknowledged() {
|
||||
return disconnectedNodeAcknowledged;
|
||||
}
|
||||
|
||||
public void setDisconnectedNodeAcknowledged(Boolean disconnectedNodeAcknowledged) {
|
||||
this.disconnectedNodeAcknowledged = disconnectedNodeAcknowledged;
|
||||
}
|
||||
}
|
||||
|
@ -35,6 +35,7 @@ public class ScheduleComponentsEntity extends Entity {
|
||||
private String id;
|
||||
private String state;
|
||||
private Map<String, RevisionDTO> components;
|
||||
private Boolean disconnectedNodeAcknowledged;
|
||||
|
||||
/**
|
||||
* @return The id of the ProcessGroup
|
||||
@ -78,4 +79,15 @@ public class ScheduleComponentsEntity extends Entity {
|
||||
public void setComponents(Map<String, RevisionDTO> components) {
|
||||
this.components = components;
|
||||
}
|
||||
|
||||
@ApiModelProperty(
|
||||
value = "Acknowledges that this node is disconnected to allow for mutable requests to proceed."
|
||||
)
|
||||
public Boolean isDisconnectedNodeAcknowledged() {
|
||||
return disconnectedNodeAcknowledged;
|
||||
}
|
||||
|
||||
public void setDisconnectedNodeAcknowledged(Boolean disconnectedNodeAcknowledged) {
|
||||
this.disconnectedNodeAcknowledged = disconnectedNodeAcknowledged;
|
||||
}
|
||||
}
|
||||
|
@ -28,6 +28,7 @@ import javax.xml.bind.annotation.XmlRootElement;
|
||||
public class SnippetEntity extends Entity {
|
||||
|
||||
private SnippetDTO snippet;
|
||||
private Boolean disconnectedNodeAcknowledged;
|
||||
|
||||
/**
|
||||
* The SnippetDTO that is being serialized.
|
||||
@ -43,4 +44,14 @@ public class SnippetEntity extends Entity {
|
||||
this.snippet = snippet;
|
||||
}
|
||||
|
||||
@ApiModelProperty(
|
||||
value = "Acknowledges that this node is disconnected to allow for mutable requests to proceed."
|
||||
)
|
||||
public Boolean isDisconnectedNodeAcknowledged() {
|
||||
return disconnectedNodeAcknowledged;
|
||||
}
|
||||
|
||||
public void setDisconnectedNodeAcknowledged(Boolean disconnectedNodeAcknowledged) {
|
||||
this.disconnectedNodeAcknowledged = disconnectedNodeAcknowledged;
|
||||
}
|
||||
}
|
||||
|
@ -27,6 +27,7 @@ import javax.xml.bind.annotation.XmlRootElement;
|
||||
public class StartVersionControlRequestEntity extends Entity {
|
||||
private VersionedFlowDTO versionedFlow;
|
||||
private RevisionDTO processGroupRevision;
|
||||
private Boolean disconnectedNodeAcknowledged;
|
||||
|
||||
@ApiModelProperty("The versioned flow")
|
||||
public VersionedFlowDTO getVersionedFlow() {
|
||||
@ -45,4 +46,15 @@ public class StartVersionControlRequestEntity extends Entity {
|
||||
public void setProcessGroupRevision(final RevisionDTO revision) {
|
||||
this.processGroupRevision = revision;
|
||||
}
|
||||
|
||||
@ApiModelProperty(
|
||||
value = "Acknowledges that this node is disconnected to allow for mutable requests to proceed."
|
||||
)
|
||||
public Boolean isDisconnectedNodeAcknowledged() {
|
||||
return disconnectedNodeAcknowledged;
|
||||
}
|
||||
|
||||
public void setDisconnectedNodeAcknowledged(Boolean disconnectedNodeAcknowledged) {
|
||||
this.disconnectedNodeAcknowledged = disconnectedNodeAcknowledged;
|
||||
}
|
||||
}
|
||||
|
@ -31,6 +31,7 @@ public class UpdateControllerServiceReferenceRequestEntity extends Entity {
|
||||
private String id;
|
||||
private String state;
|
||||
private Map<String, RevisionDTO> referencingComponentRevisions;
|
||||
private Boolean disconnectedNodeAcknowledged;
|
||||
|
||||
@ApiModelProperty(
|
||||
value = "The identifier of the Controller Service."
|
||||
@ -65,4 +66,15 @@ public class UpdateControllerServiceReferenceRequestEntity extends Entity {
|
||||
public void setReferencingComponentRevisions(Map<String, RevisionDTO> referencingComponentRevisions) {
|
||||
this.referencingComponentRevisions = referencingComponentRevisions;
|
||||
}
|
||||
|
||||
@ApiModelProperty(
|
||||
value = "Acknowledges that this node is disconnected to allow for mutable requests to proceed."
|
||||
)
|
||||
public Boolean isDisconnectedNodeAcknowledged() {
|
||||
return disconnectedNodeAcknowledged;
|
||||
}
|
||||
|
||||
public void setDisconnectedNodeAcknowledged(Boolean disconnectedNodeAcknowledged) {
|
||||
this.disconnectedNodeAcknowledged = disconnectedNodeAcknowledged;
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ import javax.xml.bind.annotation.XmlRootElement;
|
||||
public class VariableRegistryEntity extends Entity {
|
||||
private RevisionDTO processGroupRevision;
|
||||
private VariableRegistryDTO variableRegistry;
|
||||
|
||||
private Boolean disconnectedNodeAcknowledged;
|
||||
|
||||
@ApiModelProperty("The Variable Registry.")
|
||||
public VariableRegistryDTO getVariableRegistry() {
|
||||
@ -45,4 +45,15 @@ public class VariableRegistryEntity extends Entity {
|
||||
public void setProcessGroupRevision(RevisionDTO processGroupRevision) {
|
||||
this.processGroupRevision = processGroupRevision;
|
||||
}
|
||||
|
||||
@ApiModelProperty(
|
||||
value = "Acknowledges that this node is disconnected to allow for mutable requests to proceed."
|
||||
)
|
||||
public Boolean isDisconnectedNodeAcknowledged() {
|
||||
return disconnectedNodeAcknowledged;
|
||||
}
|
||||
|
||||
public void setDisconnectedNodeAcknowledged(Boolean disconnectedNodeAcknowledged) {
|
||||
this.disconnectedNodeAcknowledged = disconnectedNodeAcknowledged;
|
||||
}
|
||||
}
|
||||
|
@ -29,6 +29,7 @@ public class VersionControlComponentMappingEntity extends Entity {
|
||||
private VersionControlInformationDTO versionControlDto;
|
||||
private Map<String, String> versionControlComponentMapping;
|
||||
private RevisionDTO processGroupRevision;
|
||||
private Boolean disconnectedNodeAcknowledged;
|
||||
|
||||
@ApiModelProperty("The Version Control information")
|
||||
public VersionControlInformationDTO getVersionControlInformation() {
|
||||
@ -56,4 +57,15 @@ public class VersionControlComponentMappingEntity extends Entity {
|
||||
public void setProcessGroupRevision(RevisionDTO processGroupRevision) {
|
||||
this.processGroupRevision = processGroupRevision;
|
||||
}
|
||||
|
||||
@ApiModelProperty(
|
||||
value = "Acknowledges that this node is disconnected to allow for mutable requests to proceed."
|
||||
)
|
||||
public Boolean isDisconnectedNodeAcknowledged() {
|
||||
return disconnectedNodeAcknowledged;
|
||||
}
|
||||
|
||||
public void setDisconnectedNodeAcknowledged(Boolean disconnectedNodeAcknowledged) {
|
||||
this.disconnectedNodeAcknowledged = disconnectedNodeAcknowledged;
|
||||
}
|
||||
}
|
||||
|
@ -27,6 +27,7 @@ import javax.xml.bind.annotation.XmlRootElement;
|
||||
public class VersionControlInformationEntity extends Entity {
|
||||
private VersionControlInformationDTO versionControlInformation;
|
||||
private RevisionDTO processGroupRevision;
|
||||
private Boolean disconnectedNodeAcknowledged;
|
||||
|
||||
@ApiModelProperty("The Version Control information")
|
||||
public VersionControlInformationDTO getVersionControlInformation() {
|
||||
@ -45,4 +46,15 @@ public class VersionControlInformationEntity extends Entity {
|
||||
public void setProcessGroupRevision(RevisionDTO revision) {
|
||||
this.processGroupRevision = revision;
|
||||
}
|
||||
|
||||
@ApiModelProperty(
|
||||
value = "Acknowledges that this node is disconnected to allow for mutable requests to proceed."
|
||||
)
|
||||
public Boolean isDisconnectedNodeAcknowledged() {
|
||||
return disconnectedNodeAcknowledged;
|
||||
}
|
||||
|
||||
public void setDisconnectedNodeAcknowledged(Boolean disconnectedNodeAcknowledged) {
|
||||
this.disconnectedNodeAcknowledged = disconnectedNodeAcknowledged;
|
||||
}
|
||||
}
|
||||
|
@ -29,6 +29,7 @@ public class VersionedFlowSnapshotEntity extends Entity {
|
||||
private RevisionDTO processGroupRevision;
|
||||
private String registryId;
|
||||
private Boolean updateDescendantVersionedFlows;
|
||||
private Boolean disconnectedNodeAcknowledged;
|
||||
|
||||
@ApiModelProperty("The versioned flow snapshot")
|
||||
public VersionedFlowSnapshot getVersionedFlowSnapshot() {
|
||||
@ -66,4 +67,15 @@ public class VersionedFlowSnapshotEntity extends Entity {
|
||||
public void setUpdateDescendantVersionedFlows(Boolean update) {
|
||||
this.updateDescendantVersionedFlows = update;
|
||||
}
|
||||
|
||||
@ApiModelProperty(
|
||||
value = "Acknowledges that this node is disconnected to allow for mutable requests to proceed."
|
||||
)
|
||||
public Boolean isDisconnectedNodeAcknowledged() {
|
||||
return disconnectedNodeAcknowledged;
|
||||
}
|
||||
|
||||
public void setDisconnectedNodeAcknowledged(Boolean disconnectedNodeAcknowledged) {
|
||||
this.disconnectedNodeAcknowledged = disconnectedNodeAcknowledged;
|
||||
}
|
||||
}
|
||||
|
@ -27,6 +27,7 @@ public class HttpServletConfigurationRequestContext extends HttpServletRequestCo
|
||||
private static final String ID_PARAM = "id";
|
||||
private static final String CLIENT_ID_PARAM = "clientId";
|
||||
private static final String REVISION_PARAM = "revision";
|
||||
private static final String DISCONNECTION_ACKNOWLEDGED_PARAM = "disconnectedNodeAcknowledged";
|
||||
|
||||
private final HttpServletRequest request;
|
||||
|
||||
@ -55,4 +56,9 @@ public class HttpServletConfigurationRequestContext extends HttpServletRequestCo
|
||||
return new Revision(revision, clientId, componentId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isDisconnectionAcknowledged() {
|
||||
final String disconnectionAcknowledgedVal = request.getParameter(DISCONNECTION_ACKNOWLEDGED_PARAM);
|
||||
return Boolean.valueOf(disconnectionAcknowledgedVal);
|
||||
}
|
||||
}
|
||||
|
@ -262,6 +262,15 @@ public class StandardNiFiWebConfigurationContext implements NiFiWebConfiguration
|
||||
throw new IllegalArgumentException("UI extension type must support Processor, ControllerService, or ReportingTask configuration.");
|
||||
}
|
||||
|
||||
// if we're clustered, ensure this node is not disconnected
|
||||
if (StandardNiFiWebConfigurationContext.this.properties.isClustered() && clusterCoordinator != null && !clusterCoordinator.isConnected()) {
|
||||
// if we are disconnected, ensure the disconnection is acknowledged
|
||||
if (!Boolean.TRUE.equals(requestContext.isDisconnectionAcknowledged())) {
|
||||
throw new IllegalArgumentException("This node is disconnected from its configured cluster. The requested change "
|
||||
+ "will only be allowed if the flag to acknowledge the disconnected node is set.");
|
||||
}
|
||||
}
|
||||
|
||||
return componentFacade.updateComponent(requestContext, annotationData, properties);
|
||||
}
|
||||
|
||||
@ -379,7 +388,7 @@ public class StandardNiFiWebConfigurationContext implements NiFiWebConfiguration
|
||||
});
|
||||
|
||||
final ProcessorDTO processor;
|
||||
if (StandardNiFiWebConfigurationContext.this.properties.isClustered()) {
|
||||
if (StandardNiFiWebConfigurationContext.this.properties.isClustered() && clusterCoordinator != null && clusterCoordinator.isConnected()) {
|
||||
// create the request URL
|
||||
URI requestUrl;
|
||||
try {
|
||||
@ -507,17 +516,7 @@ public class StandardNiFiWebConfigurationContext implements NiFiWebConfiguration
|
||||
authorizable.authorize(authorizer, RequestAction.READ, NiFiUserUtils.getNiFiUser());
|
||||
});
|
||||
|
||||
// if the lookup has the service that means we are either a node or
|
||||
// the ncm and the service is available there only
|
||||
if (controllerServiceProvider.getControllerService(id) != null) {
|
||||
controllerService = serviceFacade.getControllerService(id).getComponent();
|
||||
} else {
|
||||
// if this is a standalone instance the service should have been found above... there should
|
||||
// no cluster to replicate the request to
|
||||
if (!properties.isClustered()) {
|
||||
throw new ResourceNotFoundException(String.format("Controller service[%s] could not be found on this NiFi.", id));
|
||||
}
|
||||
|
||||
if (properties.isClustered() && clusterCoordinator != null && clusterCoordinator.isConnected()) {
|
||||
// create the request URL
|
||||
URI requestUrl;
|
||||
try {
|
||||
@ -547,6 +546,8 @@ public class StandardNiFiWebConfigurationContext implements NiFiWebConfiguration
|
||||
entity = nodeResponse.getClientResponse().readEntity(ControllerServiceEntity.class);
|
||||
}
|
||||
controllerService = entity.getComponent();
|
||||
} else {
|
||||
controllerService = serviceFacade.getControllerService(id).getComponent();
|
||||
}
|
||||
|
||||
// return the controller service info
|
||||
@ -570,28 +571,7 @@ public class StandardNiFiWebConfigurationContext implements NiFiWebConfiguration
|
||||
});
|
||||
|
||||
final ControllerServiceDTO controllerService;
|
||||
if (controllerServiceProvider.getControllerService(id) != null) {
|
||||
final ControllerServiceDTO controllerServiceDto = new ControllerServiceDTO();
|
||||
controllerServiceDto.setId(id);
|
||||
controllerServiceDto.setAnnotationData(annotationData);
|
||||
controllerServiceDto.setProperties(properties);
|
||||
|
||||
// update controller service
|
||||
final ControllerServiceEntity entity = serviceFacade.updateControllerService(revision, controllerServiceDto);
|
||||
controllerService = entity.getComponent();
|
||||
} else {
|
||||
// if this is a standalone instance the service should have been found above... there should
|
||||
// no cluster to replicate the request to
|
||||
if (!StandardNiFiWebConfigurationContext.this.properties.isClustered()) {
|
||||
throw new ResourceNotFoundException(String.format("Controller service[%s] could not be found on this NiFi.", id));
|
||||
}
|
||||
|
||||
// since this PUT request can be interpreted as a request to create a controller service
|
||||
// we need to be sure that this service exists on the node before the request is replicated.
|
||||
// this is done by attempting to get the details. if the service doesn't exist it will
|
||||
// throw a ResourceNotFoundException
|
||||
getComponentDetails(requestContext);
|
||||
|
||||
if (StandardNiFiWebConfigurationContext.this.properties.isClustered() && clusterCoordinator != null && clusterCoordinator.isConnected()) {
|
||||
// create the request URL
|
||||
URI requestUrl;
|
||||
try {
|
||||
@ -638,6 +618,15 @@ public class StandardNiFiWebConfigurationContext implements NiFiWebConfiguration
|
||||
entity = nodeResponse.getClientResponse().readEntity(ControllerServiceEntity.class);
|
||||
}
|
||||
controllerService = entity.getComponent();
|
||||
} else {
|
||||
final ControllerServiceDTO controllerServiceDto = new ControllerServiceDTO();
|
||||
controllerServiceDto.setId(id);
|
||||
controllerServiceDto.setAnnotationData(annotationData);
|
||||
controllerServiceDto.setProperties(properties);
|
||||
|
||||
// update controller service
|
||||
final ControllerServiceEntity entity = serviceFacade.updateControllerService(revision, controllerServiceDto);
|
||||
controllerService = entity.getComponent();
|
||||
}
|
||||
|
||||
// return the controller service info
|
||||
@ -672,17 +661,7 @@ public class StandardNiFiWebConfigurationContext implements NiFiWebConfiguration
|
||||
authorizable.authorize(authorizer, RequestAction.READ, NiFiUserUtils.getNiFiUser());
|
||||
});
|
||||
|
||||
// if the provider has the service that means we are either a node or
|
||||
// the ncm and the service is available there only
|
||||
if (reportingTaskProvider.getReportingTaskNode(id) != null) {
|
||||
reportingTask = serviceFacade.getReportingTask(id).getComponent();
|
||||
} else {
|
||||
// if this is a standalone instance the task should have been found above... there should
|
||||
// no cluster to replicate the request to
|
||||
if (!properties.isClustered()) {
|
||||
throw new ResourceNotFoundException(String.format("Reporting task[%s] could not be found on this NiFi.", id));
|
||||
}
|
||||
|
||||
if (properties.isClustered() && clusterCoordinator != null && clusterCoordinator.isConnected()) {
|
||||
// create the request URL
|
||||
URI requestUrl;
|
||||
try {
|
||||
@ -712,6 +691,8 @@ public class StandardNiFiWebConfigurationContext implements NiFiWebConfiguration
|
||||
entity = nodeResponse.getClientResponse().readEntity(ReportingTaskEntity.class);
|
||||
}
|
||||
reportingTask = entity.getComponent();
|
||||
} else {
|
||||
reportingTask = serviceFacade.getReportingTask(id).getComponent();
|
||||
}
|
||||
|
||||
// return the reporting task info
|
||||
@ -735,29 +716,7 @@ public class StandardNiFiWebConfigurationContext implements NiFiWebConfiguration
|
||||
});
|
||||
|
||||
final ReportingTaskDTO reportingTask;
|
||||
if (reportingTaskProvider.getReportingTaskNode(id) != null) {
|
||||
final ReportingTaskDTO reportingTaskDto = new ReportingTaskDTO();
|
||||
reportingTaskDto.setId(id);
|
||||
reportingTaskDto.setAnnotationData(annotationData);
|
||||
reportingTaskDto.setProperties(properties);
|
||||
|
||||
// obtain write lock
|
||||
serviceFacade.verifyRevision(revision, user);
|
||||
final ReportingTaskEntity entity = serviceFacade.updateReportingTask(revision, reportingTaskDto);
|
||||
reportingTask = entity.getComponent();
|
||||
} else {
|
||||
// if this is a standalone instance the task should have been found above... there should
|
||||
// no cluster to replicate the request to
|
||||
if (!StandardNiFiWebConfigurationContext.this.properties.isClustered()) {
|
||||
throw new ResourceNotFoundException(String.format("Reporting task[%s] could not be found on this NiFi.", id));
|
||||
}
|
||||
|
||||
// since this PUT request can be interpreted as a request to create a reporting task
|
||||
// we need to be sure that this task exists on the node before the request is replicated.
|
||||
// this is done by attempting to get the details. if the service doesn't exist it will
|
||||
// throw a ResourceNotFoundException
|
||||
getComponentDetails(requestContext);
|
||||
|
||||
if (StandardNiFiWebConfigurationContext.this.properties.isClustered() && clusterCoordinator != null && clusterCoordinator.isConnected()) {
|
||||
// create the request URL
|
||||
URI requestUrl;
|
||||
try {
|
||||
@ -804,6 +763,16 @@ public class StandardNiFiWebConfigurationContext implements NiFiWebConfiguration
|
||||
entity = nodeResponse.getClientResponse().readEntity(ReportingTaskEntity.class);
|
||||
}
|
||||
reportingTask = entity.getComponent();
|
||||
} else {
|
||||
final ReportingTaskDTO reportingTaskDto = new ReportingTaskDTO();
|
||||
reportingTaskDto.setId(id);
|
||||
reportingTaskDto.setAnnotationData(annotationData);
|
||||
reportingTaskDto.setProperties(properties);
|
||||
|
||||
// obtain write lock
|
||||
serviceFacade.verifyRevision(revision, user);
|
||||
final ReportingTaskEntity entity = serviceFacade.updateReportingTask(revision, reportingTaskDto);
|
||||
reportingTask = entity.getComponent();
|
||||
}
|
||||
|
||||
// return the processor info
|
||||
@ -840,7 +809,7 @@ public class StandardNiFiWebConfigurationContext implements NiFiWebConfiguration
|
||||
throw new ClusterRequestException(nodeResponse.getThrowable());
|
||||
} else if (nodeResponse.getClientResponse().getStatus() == Response.Status.CONFLICT.getStatusCode()) {
|
||||
ClientResponseUtils.drainClientResponse(nodeResponse.getClientResponse());
|
||||
throw new InvalidRevisionException(String.format("Conflict: the flow may have been updated by another user."));
|
||||
throw new InvalidRevisionException(String.format("NiFi is unable to process the request at this time."));
|
||||
} else if (nodeResponse.getClientResponse().getStatus() == Response.Status.NOT_FOUND.getStatusCode()) {
|
||||
ClientResponseUtils.drainClientResponse(nodeResponse.getClientResponse());
|
||||
throw new ResourceNotFoundException("Unable to find component with id: " + id);
|
||||
|
@ -229,6 +229,8 @@ public class AccessPolicyResource extends ApplicationResource {
|
||||
|
||||
if (isReplicateRequest()) {
|
||||
return replicate(HttpMethod.POST, requestAccessPolicyEntity);
|
||||
} else if (isDisconnectedFromCluster()) {
|
||||
verifyDisconnectedNodeModification(requestAccessPolicyEntity.isDisconnectedNodeAcknowledged());
|
||||
}
|
||||
|
||||
// handle expects request (usually from the cluster manager)
|
||||
@ -377,6 +379,8 @@ public class AccessPolicyResource extends ApplicationResource {
|
||||
|
||||
if (isReplicateRequest()) {
|
||||
return replicate(HttpMethod.PUT, requestAccessPolicyEntity);
|
||||
} else if (isDisconnectedFromCluster()) {
|
||||
verifyDisconnectedNodeModification(requestAccessPolicyEntity.isDisconnectedNodeAcknowledged());
|
||||
}
|
||||
|
||||
// Extract the revision
|
||||
@ -447,6 +451,11 @@ public class AccessPolicyResource extends ApplicationResource {
|
||||
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(
|
||||
value = "The access policy id.",
|
||||
required = true
|
||||
@ -460,6 +469,8 @@ public class AccessPolicyResource extends ApplicationResource {
|
||||
|
||||
if (isReplicateRequest()) {
|
||||
return replicate(HttpMethod.DELETE);
|
||||
} else if (isDisconnectedFromCluster()) {
|
||||
verifyDisconnectedNodeModification(disconnectedNodeAcknowledged);
|
||||
}
|
||||
|
||||
final AccessPolicyEntity requestAccessPolicyEntity = new AccessPolicyEntity();
|
||||
|
@ -99,6 +99,7 @@ public abstract class ApplicationResource {
|
||||
|
||||
public static final String VERSION = "version";
|
||||
public static final String CLIENT_ID = "clientId";
|
||||
public static final String DISCONNECTED_NODE_ACKNOWLEDGED = "disconnectedNodeAcknowledged";
|
||||
|
||||
public static final String PROXY_SCHEME_HTTP_HEADER = "X-ProxyScheme";
|
||||
public static final String PROXY_HOST_HTTP_HEADER = "X-ProxyHost";
|
||||
@ -1058,6 +1059,17 @@ public abstract class ApplicationResource {
|
||||
return clusterCoordinator != null;
|
||||
}
|
||||
|
||||
boolean isDisconnectedFromCluster() {
|
||||
return isClustered() && !clusterCoordinator.isConnected();
|
||||
}
|
||||
|
||||
void verifyDisconnectedNodeModification(final Boolean disconnectionAcknowledged) {
|
||||
if (!Boolean.TRUE.equals(disconnectionAcknowledged)) {
|
||||
throw new IllegalArgumentException("This node is disconnected from its configured cluster. The requested change "
|
||||
+ "will only be allowed if the flag to acknowledge the disconnected node is set.");
|
||||
}
|
||||
}
|
||||
|
||||
public void setRequestReplicator(final RequestReplicator requestReplicator) {
|
||||
this.requestReplicator = requestReplicator;
|
||||
}
|
||||
|
@ -227,6 +227,8 @@ public class ConnectionResource extends ApplicationResource {
|
||||
|
||||
if (isReplicateRequest()) {
|
||||
return replicate(HttpMethod.PUT, requestConnectionEntity);
|
||||
} else if (isDisconnectedFromCluster()) {
|
||||
verifyDisconnectedNodeModification(requestConnectionEntity.isDisconnectedNodeAcknowledged());
|
||||
}
|
||||
|
||||
final Revision requestRevision = getRevision(requestConnectionEntity, id);
|
||||
@ -320,6 +322,11 @@ public class ConnectionResource extends ApplicationResource {
|
||||
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(
|
||||
value = "The connection id.",
|
||||
required = true
|
||||
@ -328,6 +335,8 @@ public class ConnectionResource extends ApplicationResource {
|
||||
|
||||
if (isReplicateRequest()) {
|
||||
return replicate(HttpMethod.DELETE);
|
||||
} else if (isDisconnectedFromCluster()) {
|
||||
verifyDisconnectedNodeModification(disconnectedNodeAcknowledged);
|
||||
}
|
||||
|
||||
// determine the specified version
|
||||
|
@ -188,6 +188,8 @@ public class ControllerResource extends ApplicationResource {
|
||||
|
||||
if (isReplicateRequest()) {
|
||||
return replicate(HttpMethod.PUT, requestConfigEntity);
|
||||
} else if (isDisconnectedFromCluster()) {
|
||||
verifyDisconnectedNodeModification(requestConfigEntity.isDisconnectedNodeAcknowledged());
|
||||
}
|
||||
|
||||
final Revision requestRevision = getRevision(requestConfigEntity.getRevision(), FlowController.class.getSimpleName());
|
||||
@ -264,6 +266,8 @@ public class ControllerResource extends ApplicationResource {
|
||||
|
||||
if (isReplicateRequest()) {
|
||||
return replicate(HttpMethod.POST, requestReportingTaskEntity);
|
||||
} else if (isDisconnectedFromCluster()) {
|
||||
verifyDisconnectedNodeModification(requestReportingTaskEntity.isDisconnectedNodeAcknowledged());
|
||||
}
|
||||
|
||||
return withWriteLock(
|
||||
@ -397,6 +401,8 @@ public class ControllerResource extends ApplicationResource {
|
||||
|
||||
if (isReplicateRequest()) {
|
||||
return replicate(HttpMethod.POST, requestRegistryClientEntity);
|
||||
} else if (isDisconnectedFromCluster()) {
|
||||
verifyDisconnectedNodeModification(requestRegistryClientEntity.isDisconnectedNodeAcknowledged());
|
||||
}
|
||||
|
||||
return withWriteLock(
|
||||
@ -527,6 +533,8 @@ public class ControllerResource extends ApplicationResource {
|
||||
|
||||
if (isReplicateRequest()) {
|
||||
return replicate(HttpMethod.PUT, requestRegistryEntity);
|
||||
} else if (isDisconnectedFromCluster()) {
|
||||
verifyDisconnectedNodeModification(requestRegistryEntity.isDisconnectedNodeAcknowledged());
|
||||
}
|
||||
|
||||
if (requestRegistryClient.getName() != null && StringUtils.isBlank(requestRegistryClient.getName())) {
|
||||
@ -603,6 +611,11 @@ public class ControllerResource extends ApplicationResource {
|
||||
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(
|
||||
value = "The registry id.",
|
||||
required = true
|
||||
@ -611,6 +624,8 @@ public class ControllerResource extends ApplicationResource {
|
||||
|
||||
if (isReplicateRequest()) {
|
||||
return replicate(HttpMethod.DELETE);
|
||||
} else if (isDisconnectedFromCluster()) {
|
||||
verifyDisconnectedNodeModification(disconnectedNodeAcknowledged);
|
||||
}
|
||||
|
||||
final RegistryClientEntity requestRegistryClientEntity = new RegistryClientEntity();
|
||||
@ -762,6 +777,8 @@ public class ControllerResource extends ApplicationResource {
|
||||
|
||||
if (isReplicateRequest()) {
|
||||
return replicate(HttpMethod.POST, requestControllerServiceEntity);
|
||||
} else if (isDisconnectedFromCluster()) {
|
||||
verifyDisconnectedNodeModification(requestControllerServiceEntity.isDisconnectedNodeAcknowledged());
|
||||
}
|
||||
|
||||
return withWriteLock(
|
||||
|
@ -503,6 +503,8 @@ public class ControllerServiceResource extends ApplicationResource {
|
||||
|
||||
if (isReplicateRequest()) {
|
||||
return replicate(HttpMethod.PUT, requestUpdateReferenceRequest);
|
||||
} else if (isDisconnectedFromCluster()) {
|
||||
verifyDisconnectedNodeModification(requestUpdateReferenceRequest.isDisconnectedNodeAcknowledged());
|
||||
}
|
||||
|
||||
// convert the referencing revisions
|
||||
@ -614,6 +616,8 @@ public class ControllerServiceResource extends ApplicationResource {
|
||||
|
||||
if (isReplicateRequest()) {
|
||||
return replicate(HttpMethod.PUT, requestControllerServiceEntity);
|
||||
} else if (isDisconnectedFromCluster()) {
|
||||
verifyDisconnectedNodeModification(requestControllerServiceEntity.isDisconnectedNodeAcknowledged());
|
||||
}
|
||||
|
||||
// handle expects request (usually from the cluster manager)
|
||||
@ -690,6 +694,11 @@ public class ControllerServiceResource extends ApplicationResource {
|
||||
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(
|
||||
value = "The controller service id.",
|
||||
required = true
|
||||
@ -698,6 +707,8 @@ public class ControllerServiceResource extends ApplicationResource {
|
||||
|
||||
if (isReplicateRequest()) {
|
||||
return replicate(HttpMethod.DELETE);
|
||||
} else if (isDisconnectedFromCluster()) {
|
||||
verifyDisconnectedNodeModification(disconnectedNodeAcknowledged);
|
||||
}
|
||||
|
||||
final ControllerServiceEntity requestControllerServiceEntity = new ControllerServiceEntity();
|
||||
|
@ -665,6 +665,8 @@ public class FlowResource extends ApplicationResource {
|
||||
|
||||
if (isReplicateRequest()) {
|
||||
return replicate(HttpMethod.PUT, requestScheduleComponentsEntity);
|
||||
} else if (isDisconnectedFromCluster()) {
|
||||
verifyDisconnectedNodeModification(requestScheduleComponentsEntity.isDisconnectedNodeAcknowledged());
|
||||
}
|
||||
|
||||
final Map<String, RevisionDTO> requestComponentsToSchedule = requestScheduleComponentsEntity.getComponents();
|
||||
@ -805,6 +807,8 @@ public class FlowResource extends ApplicationResource {
|
||||
|
||||
if (isReplicateRequest()) {
|
||||
return replicate(HttpMethod.PUT, requestEntity);
|
||||
} else if (isDisconnectedFromCluster()) {
|
||||
verifyDisconnectedNodeModification(requestEntity.isDisconnectedNodeAcknowledged());
|
||||
}
|
||||
|
||||
final Map<String, RevisionDTO> requestComponentsToSchedule = requestEntity.getComponents();
|
||||
|
@ -202,6 +202,8 @@ public class FunnelResource extends ApplicationResource {
|
||||
|
||||
if (isReplicateRequest()) {
|
||||
return replicate(HttpMethod.PUT, requestFunnelEntity);
|
||||
} else if (isDisconnectedFromCluster()) {
|
||||
verifyDisconnectedNodeModification(requestFunnelEntity.isDisconnectedNodeAcknowledged());
|
||||
}
|
||||
|
||||
// Extract the revision
|
||||
@ -270,6 +272,11 @@ public class FunnelResource extends ApplicationResource {
|
||||
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(
|
||||
value = "The funnel id.",
|
||||
required = true
|
||||
@ -278,6 +285,8 @@ public class FunnelResource extends ApplicationResource {
|
||||
|
||||
if (isReplicateRequest()) {
|
||||
return replicate(HttpMethod.DELETE);
|
||||
} else if (isDisconnectedFromCluster()) {
|
||||
verifyDisconnectedNodeModification(disconnectedNodeAcknowledged);
|
||||
}
|
||||
|
||||
final FunnelEntity requestFunnelEntity = new FunnelEntity();
|
||||
|
@ -202,6 +202,8 @@ public class InputPortResource extends ApplicationResource {
|
||||
|
||||
if (isReplicateRequest()) {
|
||||
return replicate(HttpMethod.PUT, requestPortEntity);
|
||||
} else if (isDisconnectedFromCluster()) {
|
||||
verifyDisconnectedNodeModification(requestPortEntity.isDisconnectedNodeAcknowledged());
|
||||
}
|
||||
|
||||
// handle expects request (usually from the cluster manager)
|
||||
@ -269,6 +271,11 @@ public class InputPortResource extends ApplicationResource {
|
||||
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(
|
||||
value = "The input port id.",
|
||||
required = true
|
||||
@ -277,6 +284,8 @@ public class InputPortResource extends ApplicationResource {
|
||||
|
||||
if (isReplicateRequest()) {
|
||||
return replicate(HttpMethod.DELETE);
|
||||
} else if (isDisconnectedFromCluster()) {
|
||||
verifyDisconnectedNodeModification(disconnectedNodeAcknowledged);
|
||||
}
|
||||
|
||||
final PortEntity requestPortEntity = new PortEntity();
|
||||
|
@ -202,6 +202,8 @@ public class LabelResource extends ApplicationResource {
|
||||
|
||||
if (isReplicateRequest()) {
|
||||
return replicate(HttpMethod.PUT, requestLabelEntity);
|
||||
} else if (isDisconnectedFromCluster()) {
|
||||
verifyDisconnectedNodeModification(requestLabelEntity.isDisconnectedNodeAcknowledged());
|
||||
}
|
||||
|
||||
// handle expects request (usually from the cluster manager)
|
||||
@ -269,6 +271,11 @@ public class LabelResource extends ApplicationResource {
|
||||
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(
|
||||
value = "The label id.",
|
||||
required = true
|
||||
@ -277,6 +284,8 @@ public class LabelResource extends ApplicationResource {
|
||||
|
||||
if (isReplicateRequest()) {
|
||||
return replicate(HttpMethod.DELETE);
|
||||
} else if (isDisconnectedFromCluster()) {
|
||||
verifyDisconnectedNodeModification(disconnectedNodeAcknowledged);
|
||||
}
|
||||
|
||||
final LabelEntity requestLabelEntity = new LabelEntity();
|
||||
|
@ -202,6 +202,8 @@ public class OutputPortResource extends ApplicationResource {
|
||||
|
||||
if (isReplicateRequest()) {
|
||||
return replicate(HttpMethod.PUT, requestPortEntity);
|
||||
} else if (isDisconnectedFromCluster()) {
|
||||
verifyDisconnectedNodeModification(requestPortEntity.isDisconnectedNodeAcknowledged());
|
||||
}
|
||||
|
||||
// handle expects request (usually from the cluster manager)
|
||||
@ -269,6 +271,11 @@ public class OutputPortResource extends ApplicationResource {
|
||||
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(
|
||||
value = "The output port id.",
|
||||
required = true
|
||||
@ -277,6 +284,8 @@ public class OutputPortResource extends ApplicationResource {
|
||||
|
||||
if (isReplicateRequest()) {
|
||||
return replicate(HttpMethod.DELETE);
|
||||
} else if (isDisconnectedFromCluster()) {
|
||||
verifyDisconnectedNodeModification(disconnectedNodeAcknowledged);
|
||||
}
|
||||
|
||||
final PortEntity requestPortEntity = new PortEntity();
|
||||
|
@ -456,6 +456,8 @@ public class ProcessGroupResource extends ApplicationResource {
|
||||
|
||||
if (isReplicateRequest()) {
|
||||
return replicate(HttpMethod.PUT, requestProcessGroupEntity);
|
||||
} else if (isDisconnectedFromCluster()) {
|
||||
verifyDisconnectedNodeModification(requestProcessGroupEntity.isDisconnectedNodeAcknowledged());
|
||||
}
|
||||
|
||||
// handle expects request (usually from the cluster manager)
|
||||
@ -552,13 +554,29 @@ public class ProcessGroupResource extends ApplicationResource {
|
||||
@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 deleteVariableRegistryUpdateRequest(
|
||||
@ApiParam(value = "The process group id.", required = true) @PathParam("groupId") final String groupId,
|
||||
@ApiParam(value = "The ID of the Variable Registry Update Request", required = true) @PathParam("updateId") final String updateId) {
|
||||
@ApiParam(
|
||||
value = "The process group id.",
|
||||
required = true
|
||||
)
|
||||
@PathParam("groupId") final String groupId,
|
||||
@ApiParam(
|
||||
value = "The ID of the Variable Registry Update Request",
|
||||
required = true)
|
||||
@PathParam("updateId") final String updateId,
|
||||
@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) {
|
||||
|
||||
if (groupId == null || updateId == null) {
|
||||
throw new IllegalArgumentException("Group ID and Update ID must both be specified.");
|
||||
}
|
||||
|
||||
if (isDisconnectedFromCluster()) {
|
||||
verifyDisconnectedNodeModification(disconnectedNodeAcknowledged);
|
||||
}
|
||||
|
||||
final NiFiUser user = NiFiUserUtils.getNiFiUser();
|
||||
|
||||
// authorize access
|
||||
@ -627,6 +645,8 @@ public class ProcessGroupResource extends ApplicationResource {
|
||||
|
||||
if (isReplicateRequest()) {
|
||||
return replicate(HttpMethod.PUT, requestVariableRegistryEntity);
|
||||
} else if (isDisconnectedFromCluster()) {
|
||||
verifyDisconnectedNodeModification(requestVariableRegistryEntity.isDisconnectedNodeAcknowledged());
|
||||
}
|
||||
|
||||
// handle expects request (usually from the cluster manager)
|
||||
@ -688,6 +708,10 @@ public class ProcessGroupResource extends ApplicationResource {
|
||||
throw new IllegalArgumentException("Process Group Revision must be specified.");
|
||||
}
|
||||
|
||||
if (isDisconnectedFromCluster()) {
|
||||
verifyDisconnectedNodeModification(requestVariableRegistryEntity.isDisconnectedNodeAcknowledged());
|
||||
}
|
||||
|
||||
// In order to update variables in a variable registry, we have to perform the following steps:
|
||||
// 1. Determine Affected Components (this includes any Processors and Controller Services and any components that reference an affected Controller Service).
|
||||
// 1a. Determine ID's of components
|
||||
@ -1528,6 +1552,11 @@ public class ProcessGroupResource extends ApplicationResource {
|
||||
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(
|
||||
value = "The process group id.",
|
||||
required = true
|
||||
@ -1537,6 +1566,8 @@ public class ProcessGroupResource extends ApplicationResource {
|
||||
// replicate if cluster manager
|
||||
if (isReplicateRequest()) {
|
||||
return replicate(HttpMethod.DELETE);
|
||||
} else if (isDisconnectedFromCluster()) {
|
||||
verifyDisconnectedNodeModification(disconnectedNodeAcknowledged);
|
||||
}
|
||||
|
||||
final ProcessGroupEntity requestProcessGroupEntity = new ProcessGroupEntity();
|
||||
@ -1683,6 +1714,8 @@ public class ProcessGroupResource extends ApplicationResource {
|
||||
// Step 6: Replicate the request or call serviceFacade.updateProcessGroup
|
||||
if (isReplicateRequest()) {
|
||||
return replicate(HttpMethod.POST, requestProcessGroupEntity);
|
||||
} else if (isDisconnectedFromCluster()) {
|
||||
verifyDisconnectedNodeModification(requestProcessGroupEntity.isDisconnectedNodeAcknowledged());
|
||||
}
|
||||
|
||||
return withWriteLock(
|
||||
@ -1885,6 +1918,8 @@ public class ProcessGroupResource extends ApplicationResource {
|
||||
|
||||
if (isReplicateRequest()) {
|
||||
return replicate(HttpMethod.POST, requestProcessorEntity);
|
||||
} else if (isDisconnectedFromCluster()) {
|
||||
verifyDisconnectedNodeModification(requestProcessorEntity.isDisconnectedNodeAcknowledged());
|
||||
}
|
||||
|
||||
return withWriteLock(
|
||||
@ -2059,6 +2094,8 @@ public class ProcessGroupResource extends ApplicationResource {
|
||||
|
||||
if (isReplicateRequest()) {
|
||||
return replicate(HttpMethod.POST, requestPortEntity);
|
||||
} else if (isDisconnectedFromCluster()) {
|
||||
verifyDisconnectedNodeModification(requestPortEntity.isDisconnectedNodeAcknowledged());
|
||||
}
|
||||
|
||||
return withWriteLock(
|
||||
@ -2207,6 +2244,8 @@ public class ProcessGroupResource extends ApplicationResource {
|
||||
|
||||
if (isReplicateRequest()) {
|
||||
return replicate(HttpMethod.POST, requestPortEntity);
|
||||
} else if (isDisconnectedFromCluster()) {
|
||||
verifyDisconnectedNodeModification(requestPortEntity.isDisconnectedNodeAcknowledged());
|
||||
}
|
||||
|
||||
return withWriteLock(
|
||||
@ -2356,6 +2395,8 @@ public class ProcessGroupResource extends ApplicationResource {
|
||||
|
||||
if (isReplicateRequest()) {
|
||||
return replicate(HttpMethod.POST, requestFunnelEntity);
|
||||
} else if (isDisconnectedFromCluster()) {
|
||||
verifyDisconnectedNodeModification(requestFunnelEntity.isDisconnectedNodeAcknowledged());
|
||||
}
|
||||
|
||||
return withWriteLock(
|
||||
@ -2505,6 +2546,8 @@ public class ProcessGroupResource extends ApplicationResource {
|
||||
|
||||
if (isReplicateRequest()) {
|
||||
return replicate(HttpMethod.POST, requestLabelEntity);
|
||||
} else if (isDisconnectedFromCluster()) {
|
||||
verifyDisconnectedNodeModification(requestLabelEntity.isDisconnectedNodeAcknowledged());
|
||||
}
|
||||
|
||||
return withWriteLock(
|
||||
@ -2661,6 +2704,8 @@ public class ProcessGroupResource extends ApplicationResource {
|
||||
|
||||
if (isReplicateRequest()) {
|
||||
return replicate(HttpMethod.POST, requestRemoteProcessGroupEntity);
|
||||
} else if (isDisconnectedFromCluster()) {
|
||||
verifyDisconnectedNodeModification(requestRemoteProcessGroupEntity.isDisconnectedNodeAcknowledged());
|
||||
}
|
||||
|
||||
return withWriteLock(
|
||||
@ -2864,6 +2909,8 @@ public class ProcessGroupResource extends ApplicationResource {
|
||||
|
||||
if (isReplicateRequest()) {
|
||||
return replicate(HttpMethod.POST, requestConnectionEntity);
|
||||
} else if (isDisconnectedFromCluster()) {
|
||||
verifyDisconnectedNodeModification(requestConnectionEntity.isDisconnectedNodeAcknowledged());
|
||||
}
|
||||
|
||||
return withWriteLock(
|
||||
@ -3035,6 +3082,8 @@ public class ProcessGroupResource extends ApplicationResource {
|
||||
|
||||
if (isReplicateRequest()) {
|
||||
return replicate(HttpMethod.POST, requestCopySnippetEntity);
|
||||
} else if (isDisconnectedFromCluster()) {
|
||||
verifyDisconnectedNodeModification(requestCopySnippetEntity.isDisconnectedNodeAcknowledged());
|
||||
}
|
||||
|
||||
return withWriteLock(
|
||||
@ -3200,6 +3249,8 @@ public class ProcessGroupResource extends ApplicationResource {
|
||||
|
||||
if (isReplicateRequest()) {
|
||||
return replicate(HttpMethod.POST, requestInstantiateTemplateRequestEntity);
|
||||
} else if (isDisconnectedFromCluster()) {
|
||||
verifyDisconnectedNodeModification(requestInstantiateTemplateRequestEntity.isDisconnectedNodeAcknowledged());
|
||||
}
|
||||
|
||||
return withWriteLock(
|
||||
@ -3312,6 +3363,8 @@ public class ProcessGroupResource extends ApplicationResource {
|
||||
|
||||
if (isReplicateRequest()) {
|
||||
return replicate(HttpMethod.POST, requestCreateTemplateRequestEntity);
|
||||
} else if (isDisconnectedFromCluster()) {
|
||||
verifyDisconnectedNodeModification(requestCreateTemplateRequestEntity.isDisconnectedNodeAcknowledged());
|
||||
}
|
||||
|
||||
return withWriteLock(
|
||||
@ -3382,6 +3435,11 @@ public class ProcessGroupResource extends ApplicationResource {
|
||||
required = true
|
||||
)
|
||||
@PathParam("id") final String groupId,
|
||||
@ApiParam(
|
||||
value = "Acknowledges that this node is disconnected to allow for mutable requests to proceed.",
|
||||
required = false
|
||||
)
|
||||
@FormDataParam(DISCONNECTED_NODE_ACKNOWLEDGED) @DefaultValue("false") final Boolean disconnectedNodeAcknowledged,
|
||||
@FormDataParam("template") final InputStream in) throws InterruptedException {
|
||||
|
||||
// unmarshal the template
|
||||
@ -3407,9 +3465,14 @@ public class ProcessGroupResource extends ApplicationResource {
|
||||
return Response.status(Response.Status.OK).entity(responseXml).type("application/xml").build();
|
||||
}
|
||||
|
||||
if (isDisconnectedFromCluster()) {
|
||||
verifyDisconnectedNodeModification(disconnectedNodeAcknowledged);
|
||||
}
|
||||
|
||||
// build the response entity
|
||||
TemplateEntity entity = new TemplateEntity();
|
||||
entity.setTemplate(template);
|
||||
entity.setDisconnectedNodeAcknowledged(disconnectedNodeAcknowledged);
|
||||
|
||||
if (isReplicateRequest()) {
|
||||
// convert request accordingly
|
||||
@ -3476,6 +3539,8 @@ public class ProcessGroupResource extends ApplicationResource {
|
||||
|
||||
if (isReplicateRequest()) {
|
||||
return replicate(HttpMethod.POST, requestTemplateEntity);
|
||||
} else if (isDisconnectedFromCluster()) {
|
||||
verifyDisconnectedNodeModification(requestTemplateEntity.isDisconnectedNodeAcknowledged());
|
||||
}
|
||||
|
||||
return withWriteLock(
|
||||
@ -3582,6 +3647,8 @@ public class ProcessGroupResource extends ApplicationResource {
|
||||
|
||||
if (isReplicateRequest()) {
|
||||
return replicate(HttpMethod.POST, requestControllerServiceEntity);
|
||||
} else if (isDisconnectedFromCluster()) {
|
||||
verifyDisconnectedNodeModification(requestControllerServiceEntity.isDisconnectedNodeAcknowledged());
|
||||
}
|
||||
|
||||
return withWriteLock(
|
||||
|
@ -542,6 +542,8 @@ public class ProcessorResource extends ApplicationResource {
|
||||
|
||||
if (isReplicateRequest()) {
|
||||
return replicate(HttpMethod.PUT, requestProcessorEntity);
|
||||
} else if (isDisconnectedFromCluster()) {
|
||||
verifyDisconnectedNodeModification(requestProcessorEntity.isDisconnectedNodeAcknowledged());
|
||||
}
|
||||
|
||||
// handle expects request (usually from the cluster manager)
|
||||
@ -618,6 +620,11 @@ public class ProcessorResource extends ApplicationResource {
|
||||
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(
|
||||
value = "The processor id.",
|
||||
required = true
|
||||
@ -626,6 +633,8 @@ public class ProcessorResource extends ApplicationResource {
|
||||
|
||||
if (isReplicateRequest()) {
|
||||
return replicate(HttpMethod.DELETE);
|
||||
} else if (isDisconnectedFromCluster()) {
|
||||
verifyDisconnectedNodeModification(disconnectedNodeAcknowledged);
|
||||
}
|
||||
|
||||
final ProcessorEntity requestProcessorEntity = new ProcessorEntity();
|
||||
|
@ -184,6 +184,11 @@ public class RemoteProcessGroupResource extends ApplicationResource {
|
||||
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(
|
||||
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)
|
||||
|
@ -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)
|
||||
@ -493,6 +495,11 @@ public class ReportingTaskResource extends ApplicationResource {
|
||||
required = false
|
||||
)
|
||||
@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();
|
||||
|
@ -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
|
||||
@ -317,6 +321,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();
|
||||
|
@ -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;
|
||||
@ -180,6 +182,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();
|
||||
|
@ -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
|
||||
@ -441,6 +445,11 @@ public class TenantsResource extends ApplicationResource {
|
||||
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(
|
||||
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
|
||||
@ -829,6 +844,11 @@ public class TenantsResource extends ApplicationResource {
|
||||
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(
|
||||
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();
|
||||
|
@ -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.
|
||||
|
@ -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()"
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
},
|
||||
|
||||
/**
|
||||
@ -466,6 +450,19 @@
|
||||
return '';
|
||||
},
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
|
@ -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': {
|
||||
|
@ -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,
|
||||
|
@ -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': {
|
||||
|
@ -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': {
|
||||
|
@ -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,
|
||||
|
@ -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': {
|
||||
|
@ -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,
|
||||
|
@ -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': {
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -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, labelComponent, 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, templateComponent, 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, graphControlsCtrl, 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, labelComponent, 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, labelComponent, 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, graphControlsCtrl, 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);
|
||||
|
||||
|
@ -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);
|
||||
});
|
||||
|
@ -172,6 +172,7 @@
|
||||
// build the request entity
|
||||
var requestEntity = {
|
||||
'revision': nfClient.getRevision(componentEntity),
|
||||
'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(),
|
||||
'component': {
|
||||
'id': componentEntity.id,
|
||||
'bundle': {
|
||||
|
@ -24,11 +24,12 @@
|
||||
'nf.ErrorHandler',
|
||||
'nf.Common',
|
||||
'nf.Dialog',
|
||||
'nf.Storage',
|
||||
'nf.Client',
|
||||
'nf.CanvasUtils',
|
||||
'nf.Connection'],
|
||||
function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfCanvasUtils, nfConnection) {
|
||||
return (nf.ConnectionConfiguration = factory($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfCanvasUtils, nfConnection));
|
||||
function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfCanvasUtils, nfConnection) {
|
||||
return (nf.ConnectionConfiguration = factory($, d3, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfCanvasUtils, nfConnection));
|
||||
});
|
||||
} else if (typeof exports === 'object' && typeof module === 'object') {
|
||||
module.exports = (nf.ConnectionConfiguration =
|
||||
@ -37,6 +38,7 @@
|
||||
require('nf.ErrorHandler'),
|
||||
require('nf.Common'),
|
||||
require('nf.Dialog'),
|
||||
require('nf.Storage'),
|
||||
require('nf.Client'),
|
||||
require('nf.CanvasUtils'),
|
||||
require('nf.Connection')));
|
||||
@ -46,11 +48,12 @@
|
||||
root.nf.ErrorHandler,
|
||||
root.nf.Common,
|
||||
root.nf.Dialog,
|
||||
root.nf.Storage,
|
||||
root.nf.Client,
|
||||
root.nf.CanvasUtils,
|
||||
root.nf.Connection);
|
||||
}
|
||||
}(this, function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfCanvasUtils, nfConnection) {
|
||||
}(this, function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfCanvasUtils, nfConnection) {
|
||||
'use strict';
|
||||
|
||||
var nfBirdseye;
|
||||
@ -924,6 +927,7 @@
|
||||
'version': 0
|
||||
}
|
||||
}),
|
||||
'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(),
|
||||
'component': {
|
||||
'name': connectionName,
|
||||
'source': {
|
||||
@ -1008,6 +1012,7 @@
|
||||
var d = nfConnection.get(connectionId);
|
||||
var connectionEntity = {
|
||||
'revision': nfClient.getRevision(d),
|
||||
'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(),
|
||||
'component': {
|
||||
'id': connectionId,
|
||||
'name': connectionName,
|
||||
|
@ -1524,6 +1524,7 @@
|
||||
var save = function (d, connection) {
|
||||
var entity = {
|
||||
'revision': nfClient.getRevision(d),
|
||||
'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(),
|
||||
'component': connection
|
||||
};
|
||||
|
||||
@ -1720,6 +1721,7 @@
|
||||
|
||||
var connectionEntity = {
|
||||
'revision': nfClient.getRevision(connectionData),
|
||||
'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(),
|
||||
'component': {
|
||||
'id': connectionData.id,
|
||||
'destination': {
|
||||
|
@ -24,14 +24,15 @@
|
||||
'nf.ErrorHandler',
|
||||
'nf.Common',
|
||||
'nf.Dialog',
|
||||
'nf.Storage',
|
||||
'nf.Client',
|
||||
'nf.Settings',
|
||||
'nf.UniversalCapture',
|
||||
'nf.CustomUi',
|
||||
'nf.CanvasUtils',
|
||||
'nf.Processor'],
|
||||
function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfSettings, nfUniversalCapture, nfCustomUi, nfCanvasUtils, nfProcessor) {
|
||||
return (nf.ControllerService = factory($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfSettings, nfUniversalCapture, nfCustomUi, nfCanvasUtils, nfProcessor));
|
||||
function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfSettings, nfUniversalCapture, nfCustomUi, nfCanvasUtils, nfProcessor) {
|
||||
return (nf.ControllerService = factory($, d3, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfSettings, nfUniversalCapture, nfCustomUi, nfCanvasUtils, nfProcessor));
|
||||
});
|
||||
} else if (typeof exports === 'object' && typeof module === 'object') {
|
||||
module.exports = (nf.ControllerService =
|
||||
@ -40,6 +41,7 @@
|
||||
require('nf.ErrorHandler'),
|
||||
require('nf.Common'),
|
||||
require('nf.Dialog'),
|
||||
require('nf.Storage'),
|
||||
require('nf.Client'),
|
||||
require('nf.Settings'),
|
||||
require('nf.UniversalCapture'),
|
||||
@ -52,6 +54,7 @@
|
||||
root.nf.ErrorHandler,
|
||||
root.nf.Common,
|
||||
root.nf.Dialog,
|
||||
root.nf.Storage,
|
||||
root.nf.Client,
|
||||
root.nf.Settings,
|
||||
root.nf.UniversalCapture,
|
||||
@ -59,7 +62,7 @@
|
||||
root.nf.CanvasUtils,
|
||||
root.nf.Processor);
|
||||
}
|
||||
}(this, function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfSettings, nfUniversalCapture, nfCustomUi, nfCanvasUtils, nfProcessor) {
|
||||
}(this, function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfSettings, nfUniversalCapture, nfCustomUi, nfCanvasUtils, nfProcessor) {
|
||||
'use strict';
|
||||
|
||||
var nfControllerServices, nfReportingTask;
|
||||
@ -141,6 +144,7 @@
|
||||
|
||||
// create the controller service entity
|
||||
var controllerServiceEntity = {};
|
||||
controllerServiceEntity['disconnectedNodeAcknowledged'] = nfStorage.isDisconnectionAcknowledged();
|
||||
controllerServiceEntity['component'] = controllerServiceDto;
|
||||
|
||||
// return the marshaled details
|
||||
@ -631,6 +635,7 @@
|
||||
// build the request entity
|
||||
var updateControllerServiceEntity = {
|
||||
'revision': nfClient.getRevision(controllerServiceEntity),
|
||||
'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(),
|
||||
'component': {
|
||||
'id': controllerServiceEntity.id,
|
||||
'state': enabled ? 'ENABLED' : 'DISABLED'
|
||||
@ -753,7 +758,8 @@
|
||||
var referenceEntity = {
|
||||
'id': controllerServiceEntity.id,
|
||||
'state': running ? 'RUNNING' : 'STOPPED',
|
||||
'referencingComponentRevisions': referencingRevisions
|
||||
'referencingComponentRevisions': referencingRevisions,
|
||||
'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged()
|
||||
};
|
||||
|
||||
// issue the request to update the referencing components
|
||||
@ -1048,7 +1054,8 @@
|
||||
var referenceEntity = {
|
||||
'id': controllerServiceEntity.id,
|
||||
'state': enabled ? 'ENABLED' : 'DISABLED',
|
||||
'referencingComponentRevisions': referencingRevisions
|
||||
'referencingComponentRevisions': referencingRevisions,
|
||||
'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged()
|
||||
};
|
||||
|
||||
// issue the request to update the referencing components
|
||||
@ -2181,8 +2188,9 @@
|
||||
$.ajax({
|
||||
type: 'DELETE',
|
||||
url: controllerServiceEntity.uri + '?' + $.param({
|
||||
version: revision.version,
|
||||
clientId: revision.clientId
|
||||
'version': revision.version,
|
||||
'clientId': revision.clientId,
|
||||
'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged()
|
||||
}),
|
||||
dataType: 'json'
|
||||
}).done(function (response) {
|
||||
|
@ -29,6 +29,7 @@
|
||||
'nf.ErrorHandler',
|
||||
'nf.FilteredDialogCommon',
|
||||
'nf.Dialog',
|
||||
'nf.Storage',
|
||||
'nf.Common',
|
||||
'nf.ControllerService',
|
||||
'nf.ProcessGroup',
|
||||
@ -36,8 +37,8 @@
|
||||
'nf.ComponentState',
|
||||
'nf.ComponentVersion',
|
||||
'nf.ng.Bridge'],
|
||||
function ($, d3, Slick, nfClient, nfShell, nfProcessGroupConfiguration, nfCanvasUtils, nfErrorHandler, nfFilteredDialogCommon, nfDialog, nfCommon, nfControllerService, nfProcessGroup, nfPolicyManagement, nfComponentState, nfComponentVersion, nfNgBridge) {
|
||||
return (nf.ControllerServices = factory($, d3, Slick, nfClient, nfShell, nfProcessGroupConfiguration, nfCanvasUtils, nfErrorHandler, nfFilteredDialogCommon, nfDialog, nfCommon, nfControllerService, nfProcessGroup, nfPolicyManagement, nfComponentState, nfComponentVersion, nfNgBridge));
|
||||
function ($, d3, Slick, nfClient, nfShell, nfProcessGroupConfiguration, nfCanvasUtils, nfErrorHandler, nfFilteredDialogCommon, nfDialog, nfStorage, nfCommon, nfControllerService, nfProcessGroup, nfPolicyManagement, nfComponentState, nfComponentVersion, nfNgBridge) {
|
||||
return (nf.ControllerServices = factory($, d3, Slick, nfClient, nfShell, nfProcessGroupConfiguration, nfCanvasUtils, nfErrorHandler, nfFilteredDialogCommon, nfDialog, nfStorage, nfCommon, nfControllerService, nfProcessGroup, nfPolicyManagement, nfComponentState, nfComponentVersion, nfNgBridge));
|
||||
});
|
||||
} else if (typeof exports === 'object' && typeof module === 'object') {
|
||||
module.exports = (nf.ControllerServices =
|
||||
@ -51,6 +52,7 @@
|
||||
require('nf.ErrorHandler'),
|
||||
require('nf.FilteredDialogCommon'),
|
||||
require('nf.Dialog'),
|
||||
require('nf.Storage'),
|
||||
require('nf.Common'),
|
||||
require('nf.ControllerService'),
|
||||
require('nf.ProcessGroup'),
|
||||
@ -69,6 +71,7 @@
|
||||
root.nf.ErrorHandler,
|
||||
root.nf.FilteredDialogCommon,
|
||||
root.nf.Dialog,
|
||||
root.nf.Storage,
|
||||
root.nf.Common,
|
||||
root.nf.ControllerService,
|
||||
root.nf.ProcessGroup,
|
||||
@ -77,7 +80,7 @@
|
||||
root.nf.ComponentVersion,
|
||||
root.nf.ng.Bridge);
|
||||
}
|
||||
}(this, function ($, d3, Slick, nfClient, nfShell, nfProcessGroupConfiguration, nfCanvasUtils, nfErrorHandler, nfFilteredDialogCommon, nfDialog, nfCommon, nfControllerService, nfProcessGroup, nfPolicyManagement, nfComponentState, nfComponentVersion, nfNgBridge) {
|
||||
}(this, function ($, d3, Slick, nfClient, nfShell, nfProcessGroupConfiguration, nfCanvasUtils, nfErrorHandler, nfFilteredDialogCommon, nfDialog, nfStorage, nfCommon, nfControllerService, nfProcessGroup, nfPolicyManagement, nfComponentState, nfComponentVersion, nfNgBridge) {
|
||||
'use strict';
|
||||
|
||||
var dblClick = null;
|
||||
@ -301,6 +304,7 @@
|
||||
'version': 0
|
||||
}
|
||||
}),
|
||||
'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(),
|
||||
'component': {
|
||||
'type': controllerServiceType,
|
||||
'bundle': controllerServiceBundle
|
||||
|
@ -23,23 +23,26 @@
|
||||
'nf.Common',
|
||||
'nf.Shell',
|
||||
'nf.Dialog',
|
||||
'nf.Client'], function ($, nfCommon, nfShell, nfDialog, nfClient) {
|
||||
return (nf.CustomUi = factory($, nfCommon, nfShell, nfDialog, nfClient));
|
||||
'nf.Storage',
|
||||
'nf.Client'], function ($, nfCommon, nfShell, nfDialog, nfStorage, nfClient) {
|
||||
return (nf.CustomUi = factory($, nfCommon, nfShell, nfDialog, nfStorage, nfClient));
|
||||
});
|
||||
} else if (typeof exports === 'object' && typeof module === 'object') {
|
||||
module.exports = (nf.CustomUi = factory(require('jquery'),
|
||||
require('nf.Common'),
|
||||
require('nf.Shell'),
|
||||
require('nf.Dialog'),
|
||||
require('nf.Storage'),
|
||||
require('nf.Client')));
|
||||
} else {
|
||||
nf.CustomUi = factory(root.$,
|
||||
root.nf.Common,
|
||||
root.nf.Shell,
|
||||
root.nf.Dialog,
|
||||
root.nf.Storage,
|
||||
root.nf.Client);
|
||||
}
|
||||
}(this, function ($, nfCommon, nfShell, nfDialog, nfClient) {
|
||||
}(this, function ($, nfCommon, nfShell, nfDialog, nfStorage, nfClient) {
|
||||
'use strict';
|
||||
|
||||
return {
|
||||
@ -63,7 +66,8 @@
|
||||
'id': entity.id,
|
||||
'revision': revision.version,
|
||||
'clientId': revision.clientId,
|
||||
'editable': editable
|
||||
'editable': editable,
|
||||
'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged()
|
||||
};
|
||||
|
||||
// conditionally include the ui extension token
|
||||
|
@ -21,6 +21,7 @@
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define(['jquery',
|
||||
'd3',
|
||||
'nf.Storage',
|
||||
'nf.Connection',
|
||||
'nf.Birdseye',
|
||||
'nf.CanvasUtils',
|
||||
@ -28,13 +29,14 @@
|
||||
'nf.Dialog',
|
||||
'nf.Client',
|
||||
'nf.ErrorHandler'],
|
||||
function ($, d3, nfConnection, nfBirdseye, nfCanvasUtils, nfCommon, nfDialog, nfClient, nfErrorHandler) {
|
||||
return (nf.Draggable = factory($, d3, nfConnection, nfBirdseye, nfCanvasUtils, nfCommon, nfDialog, nfClient, nfErrorHandler));
|
||||
function ($, d3, nfStorage, nfConnection, nfBirdseye, nfCanvasUtils, nfCommon, nfDialog, nfClient, nfErrorHandler) {
|
||||
return (nf.Draggable = factory($, d3, nfStorage, nfConnection, nfBirdseye, nfCanvasUtils, nfCommon, nfDialog, nfClient, nfErrorHandler));
|
||||
});
|
||||
} else if (typeof exports === 'object' && typeof module === 'object') {
|
||||
module.exports = (nf.Draggable =
|
||||
factory(require('jquery'),
|
||||
require('d3'),
|
||||
require('nf.Storage'),
|
||||
require('nf.Connection'),
|
||||
require('nf.Birdseye'),
|
||||
require('nf.CanvasUtils'),
|
||||
@ -45,6 +47,7 @@
|
||||
} else {
|
||||
nf.Draggable = factory(root.$,
|
||||
root.d3,
|
||||
root.nf.Storage,
|
||||
root.nf.Connection,
|
||||
root.nf.Birdseye,
|
||||
root.nf.CanvasUtils,
|
||||
@ -53,7 +56,7 @@
|
||||
root.nf.Client,
|
||||
root.nf.ErrorHandler);
|
||||
}
|
||||
}(this, function ($, d3, nfConnection, nfBirdseye, nfCanvasUtils, nfCommon, nfDialog, nfClient, nfErrorHandler) {
|
||||
}(this, function ($, d3, nfStorage, nfConnection, nfBirdseye, nfCanvasUtils, nfCommon, nfDialog, nfClient, nfErrorHandler) {
|
||||
'use strict';
|
||||
|
||||
var nfCanvas;
|
||||
@ -264,6 +267,7 @@
|
||||
// build the entity
|
||||
var entity = {
|
||||
'revision': nfClient.getRevision(d),
|
||||
'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(),
|
||||
'component': {
|
||||
'id': d.id,
|
||||
'position': newPosition
|
||||
@ -325,6 +329,7 @@
|
||||
|
||||
var entity = {
|
||||
'revision': nfClient.getRevision(d),
|
||||
'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(),
|
||||
'component': {
|
||||
id: d.id,
|
||||
bends: newBends
|
||||
|
@ -26,6 +26,7 @@
|
||||
'nf.ng.Bridge',
|
||||
'nf.ErrorHandler',
|
||||
'nf.Dialog',
|
||||
'nf.Storage',
|
||||
'nf.Common',
|
||||
'nf.Client',
|
||||
'nf.CanvasUtils',
|
||||
@ -33,8 +34,8 @@
|
||||
'nf.ProcessGroupConfiguration',
|
||||
'nf.Graph',
|
||||
'nf.Birdseye'],
|
||||
function ($, nfNgBridge, nfErrorHandler, nfDialog, nfCommon, nfClient, nfCanvasUtils, nfProcessGroup, nfProcessGroupConfiguration, nfGraph, nfBirdseye) {
|
||||
return (nf.FlowVersion = factory($, nfNgBridge, nfErrorHandler, nfDialog, nfCommon, nfClient, nfCanvasUtils, nfProcessGroup, nfProcessGroupConfiguration, nfGraph, nfBirdseye));
|
||||
function ($, nfNgBridge, nfErrorHandler, nfDialog, nfStorage, nfCommon, nfClient, nfCanvasUtils, nfProcessGroup, nfProcessGroupConfiguration, nfGraph, nfBirdseye) {
|
||||
return (nf.FlowVersion = factory($, nfNgBridge, nfErrorHandler, nfDialog, nfStorage, nfCommon, nfClient, nfCanvasUtils, nfProcessGroup, nfProcessGroupConfiguration, nfGraph, nfBirdseye));
|
||||
});
|
||||
} else if (typeof exports === 'object' && typeof module === 'object') {
|
||||
module.exports = (nf.FlowVerison =
|
||||
@ -42,6 +43,7 @@
|
||||
require('nf.ng.Bridge'),
|
||||
require('nf.ErrorHandler'),
|
||||
require('nf.Dialog'),
|
||||
require('nf.Storage'),
|
||||
require('nf.Common'),
|
||||
require('nf.Client'),
|
||||
require('nf.CanvasUtils'),
|
||||
@ -54,6 +56,7 @@
|
||||
root.nf.ng.Bridge,
|
||||
root.nf.ErrorHandler,
|
||||
root.nf.Dialog,
|
||||
root.nf.Storage,
|
||||
root.nf.Common,
|
||||
root.nf.Client,
|
||||
root.nf.CanvasUtils,
|
||||
@ -62,7 +65,7 @@
|
||||
root.nf.Graph,
|
||||
root.nf.Birdseye);
|
||||
}
|
||||
}(this, function ($, nfNgBridge, nfErrorHandler, nfDialog, nfCommon, nfClient, nfCanvasUtils, nfProcessGroup, nfProcessGroupConfiguration, nfGraph, nfBirdseye) {
|
||||
}(this, function ($, nfNgBridge, nfErrorHandler, nfDialog, nfStorage, nfCommon, nfClient, nfCanvasUtils, nfProcessGroup, nfProcessGroupConfiguration, nfGraph, nfBirdseye) {
|
||||
'use strict';
|
||||
|
||||
var serverTimeOffset = null;
|
||||
@ -387,7 +390,8 @@
|
||||
revision: {
|
||||
version: processGroupRevision.version
|
||||
}
|
||||
})
|
||||
}),
|
||||
'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged()
|
||||
};
|
||||
|
||||
var versionControlInformation = $('#save-flow-version-process-group-id').data('versionControlInformation');
|
||||
@ -980,6 +984,7 @@
|
||||
'version': 0
|
||||
}
|
||||
}),
|
||||
'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(),
|
||||
'component': {
|
||||
'position': {
|
||||
'x': pt.x,
|
||||
@ -1100,6 +1105,7 @@
|
||||
'version': processGroupRevision.version
|
||||
}
|
||||
}),
|
||||
'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(),
|
||||
'versionControlInformation': {
|
||||
'groupId': processGroupId,
|
||||
'registryId': versionControlInformation.registryId,
|
||||
@ -1160,7 +1166,9 @@
|
||||
if (nfCommon.isDefinedAndNotNull(changeRequest)) {
|
||||
$.ajax({
|
||||
type: 'DELETE',
|
||||
url: changeRequest.uri,
|
||||
url: changeRequest.uri + '?' + $.param({
|
||||
'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged()
|
||||
}),
|
||||
dataType: 'json'
|
||||
}).done(function (response) {
|
||||
changeRequest = response.request;
|
||||
@ -1447,6 +1455,7 @@
|
||||
'version': response.processGroupRevision.version
|
||||
}
|
||||
}),
|
||||
'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(),
|
||||
'versionControlInformation': response.versionControlInformation
|
||||
};
|
||||
|
||||
@ -1501,7 +1510,9 @@
|
||||
if (nfCommon.isDefinedAndNotNull(revertRequest)) {
|
||||
$.ajax({
|
||||
type: 'DELETE',
|
||||
url: revertRequest.uri,
|
||||
url: revertRequest.uri + '?' + $.param({
|
||||
'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged()
|
||||
}),
|
||||
dataType: 'json'
|
||||
}).done(function (response) {
|
||||
revertRequest = response.request;
|
||||
@ -1937,7 +1948,9 @@
|
||||
|
||||
$.ajax({
|
||||
type: 'DELETE',
|
||||
url: '../nifi-api/versions/process-groups/' + encodeURIComponent(processGroupId) + '?' + $.param(revision),
|
||||
url: '../nifi-api/versions/process-groups/' + encodeURIComponent(processGroupId) + '?' + $.param($.extend({
|
||||
'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged()
|
||||
}, revision)),
|
||||
dataType: 'json',
|
||||
contentType: 'application/json'
|
||||
}).done(function (response) {
|
||||
|
@ -21,19 +21,21 @@
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define(['jquery',
|
||||
'd3',
|
||||
'nf.Storage',
|
||||
'nf.ErrorHandler',
|
||||
'nf.Common',
|
||||
'nf.Client',
|
||||
'nf.CanvasUtils',
|
||||
'nf.ng.Bridge',
|
||||
'nf.Label'],
|
||||
function ($, d3, nfErrorHandler, nfCommon, nfClient, nfCanvasUtils, nfNgBridge, nfLabel) {
|
||||
return (nf.LabelConfiguration = factory($, d3, nfErrorHandler, nfCommon, nfClient, nfCanvasUtils, nfNgBridge, nfLabel));
|
||||
function ($, d3, nfStorage, nfErrorHandler, nfCommon, nfClient, nfCanvasUtils, nfNgBridge, nfLabel) {
|
||||
return (nf.LabelConfiguration = factory($, d3, nfStorage, nfErrorHandler, nfCommon, nfClient, nfCanvasUtils, nfNgBridge, nfLabel));
|
||||
});
|
||||
} else if (typeof exports === 'object' && typeof module === 'object') {
|
||||
module.exports = (nf.LabelConfiguration =
|
||||
factory(require('jquery'),
|
||||
require('d3'),
|
||||
require('nf.Storage'),
|
||||
require('nf.ErrorHandler'),
|
||||
require('nf.Common'),
|
||||
require('nf.Client'),
|
||||
@ -43,6 +45,7 @@
|
||||
} else {
|
||||
nf.LabelConfiguration = factory(root.$,
|
||||
root.d3,
|
||||
root.nf.Storage,
|
||||
root.nf.ErrorHandler,
|
||||
root.nf.Common,
|
||||
root.nf.Client,
|
||||
@ -50,7 +53,7 @@
|
||||
root.nf.ng.Bridge,
|
||||
root.nf.Label);
|
||||
}
|
||||
}(this, function ($, d3, nfErrorHandler, nfCommon, nfClient, nfCanvasUtils, nfNgBridge, nfLabel) {
|
||||
}(this, function ($, d3, nfStorage, nfErrorHandler, nfCommon, nfClient, nfCanvasUtils, nfNgBridge, nfLabel) {
|
||||
'use strict';
|
||||
|
||||
var labelId = '';
|
||||
@ -83,6 +86,7 @@
|
||||
// build the label entity
|
||||
var labelEntity = {
|
||||
'revision': nfClient.getRevision(labelData),
|
||||
'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(),
|
||||
'component': {
|
||||
'id': labelId,
|
||||
'label': labelValue,
|
||||
|
@ -21,27 +21,30 @@
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define(['jquery',
|
||||
'd3',
|
||||
'nf.Storage',
|
||||
'nf.Common',
|
||||
'nf.Client',
|
||||
'nf.CanvasUtils'],
|
||||
function ($, d3, nfCommon, nfClient, nfCanvasUtils) {
|
||||
return (nf.Label = factory($, d3, nfCommon, nfClient, nfCanvasUtils));
|
||||
function ($, d3, nfStorage, nfCommon, nfClient, nfCanvasUtils) {
|
||||
return (nf.Label = factory($, d3, nfStorage, nfCommon, nfClient, nfCanvasUtils));
|
||||
});
|
||||
} else if (typeof exports === 'object' && typeof module === 'object') {
|
||||
module.exports = (nf.Label =
|
||||
factory(require('jquery'),
|
||||
require('d3'),
|
||||
require('nf.Storage'),
|
||||
require('nf.Common'),
|
||||
require('nf.Client'),
|
||||
require('nf.CanvasUtils')));
|
||||
} else {
|
||||
nf.Label = factory(root.$,
|
||||
root.d3,
|
||||
root.nf.Storage,
|
||||
root.nf.Common,
|
||||
root.nf.Client,
|
||||
root.nf.CanvasUtils);
|
||||
}
|
||||
}(this, function ($, d3, nfCommon, nfClient, nfCanvasUtils) {
|
||||
}(this, function ($, d3, nfStorage, nfCommon, nfClient, nfCanvasUtils) {
|
||||
'use strict';
|
||||
|
||||
var nfConnectable;
|
||||
@ -373,6 +376,7 @@
|
||||
if (different) {
|
||||
var labelEntity = {
|
||||
'revision': nfClient.getRevision(labelData),
|
||||
'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(),
|
||||
'component': {
|
||||
'id': labelData.id,
|
||||
'width': labelData.dimensions.width,
|
||||
|
@ -24,12 +24,13 @@
|
||||
'nf.ErrorHandler',
|
||||
'nf.Common',
|
||||
'nf.Client',
|
||||
'nf.Storage',
|
||||
'nf.CanvasUtils',
|
||||
'nf.ng.Bridge',
|
||||
'nf.Dialog',
|
||||
'nf.Shell'],
|
||||
function ($, Slick, nfErrorHandler, nfCommon, nfClient, nfCanvasUtils, nfNgBridge, nfDialog, nfShell) {
|
||||
return (nf.PolicyManagement = factory($, Slick, nfErrorHandler, nfCommon, nfClient, nfCanvasUtils, nfNgBridge, nfDialog, nfShell));
|
||||
function ($, Slick, nfErrorHandler, nfCommon, nfClient, nfStorage, nfCanvasUtils, nfNgBridge, nfDialog, nfShell) {
|
||||
return (nf.PolicyManagement = factory($, Slick, nfErrorHandler, nfCommon, nfClient, nfStorage, nfCanvasUtils, nfNgBridge, nfDialog, nfShell));
|
||||
});
|
||||
} else if (typeof exports === 'object' && typeof module === 'object') {
|
||||
module.exports = (nf.PolicyManagement =
|
||||
@ -38,6 +39,7 @@
|
||||
require('nf.ErrorHandler'),
|
||||
require('nf.Common'),
|
||||
require('nf.Client'),
|
||||
require('nf.Storage'),
|
||||
require('nf.CanvasUtils'),
|
||||
require('nf.ng.Bridge'),
|
||||
require('nf.Dialog'),
|
||||
@ -48,12 +50,13 @@
|
||||
root.nf.ErrorHandler,
|
||||
root.nf.Common,
|
||||
root.nf.Client,
|
||||
root.nf.Storage,
|
||||
root.nf.CanvasUtils,
|
||||
root.nf.ng.Bridge,
|
||||
root.nf.Dialog,
|
||||
root.nf.Shell);
|
||||
}
|
||||
}(this, function ($, Slick, nfErrorHandler, nfCommon, nfClient, nfCanvasUtils, nfNgBridge, nfDialog, nfShell) {
|
||||
}(this, function ($, Slick, nfErrorHandler, nfCommon, nfClient, nfStorage, nfCanvasUtils, nfNgBridge, nfDialog, nfShell) {
|
||||
'use strict';
|
||||
|
||||
var config = {
|
||||
@ -792,11 +795,14 @@
|
||||
*/
|
||||
var deletePolicy = function () {
|
||||
var currentEntity = $('#policy-table').data('policy');
|
||||
var revision = nfClient.getRevision(currentEntity);
|
||||
|
||||
if (nfCommon.isDefinedAndNotNull(currentEntity)) {
|
||||
$.ajax({
|
||||
type: 'DELETE',
|
||||
url: currentEntity.uri + '?' + $.param(nfClient.getRevision(currentEntity)),
|
||||
url: currentEntity.uri + '?' + $.param($.extend({
|
||||
'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged()
|
||||
}, revision)),
|
||||
dataType: 'json'
|
||||
}).done(function () {
|
||||
loadPolicy();
|
||||
@ -1236,6 +1242,7 @@
|
||||
'version': 0
|
||||
}
|
||||
}),
|
||||
'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(),
|
||||
'component': {
|
||||
'action': resourceAndAction.action,
|
||||
'resource': resourceAndAction.resource,
|
||||
@ -1291,6 +1298,7 @@
|
||||
if (nfCommon.isDefinedAndNotNull(currentEntity)) {
|
||||
var entity = {
|
||||
'revision': nfClient.getRevision(currentEntity),
|
||||
'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(),
|
||||
'component': {
|
||||
'id': currentEntity.id,
|
||||
'users': users,
|
||||
|
@ -24,12 +24,13 @@
|
||||
'nf.ErrorHandler',
|
||||
'nf.Common',
|
||||
'nf.Dialog',
|
||||
'nf.Storage',
|
||||
'nf.Client',
|
||||
'nf.CanvasUtils',
|
||||
'nf.ng.Bridge',
|
||||
'nf.Port'],
|
||||
function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfCanvasUtils, nfNgBridge, nfPort) {
|
||||
return (nf.PortConfiguration = factory($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfCanvasUtils, nfNgBridge, nfPort));
|
||||
function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfCanvasUtils, nfNgBridge, nfPort) {
|
||||
return (nf.PortConfiguration = factory($, d3, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfCanvasUtils, nfNgBridge, nfPort));
|
||||
});
|
||||
} else if (typeof exports === 'object' && typeof module === 'object') {
|
||||
module.exports = (nf.PortConfiguration =
|
||||
@ -38,6 +39,7 @@
|
||||
require('nf.ErrorHandler'),
|
||||
require('nf.Common'),
|
||||
require('nf.Dialog'),
|
||||
require('nf.Storage'),
|
||||
require('nf.Client'),
|
||||
require('nf.CanvasUtils'),
|
||||
require('nf.ng.Bridge'),
|
||||
@ -48,12 +50,13 @@
|
||||
root.nf.ErrorHandler,
|
||||
root.nf.Common,
|
||||
root.nf.Dialog,
|
||||
root.nf.Storage,
|
||||
root.nf.Client,
|
||||
root.nf.CanvasUtils,
|
||||
root.nf.ng.Bridge,
|
||||
root.nf.Port);
|
||||
}
|
||||
}(this, function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfCanvasUtils, nfNgBridge, nfPort) {
|
||||
}(this, function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfCanvasUtils, nfNgBridge, nfPort) {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
@ -98,6 +101,7 @@
|
||||
// build the port entity
|
||||
var portEntity = {
|
||||
'revision': nfClient.getRevision(portData),
|
||||
'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(),
|
||||
'component': port
|
||||
};
|
||||
|
||||
|
@ -24,12 +24,13 @@
|
||||
'nf.ErrorHandler',
|
||||
'nf.Common',
|
||||
'nf.Dialog',
|
||||
'nf.Storage',
|
||||
'nf.Client',
|
||||
'nf.ProcessGroup',
|
||||
'nf.Shell',
|
||||
'nf.CanvasUtils'],
|
||||
function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfProcessGroup, nfShell, nfCanvasUtils) {
|
||||
return (nf.ProcessGroupConfiguration = factory($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfProcessGroup, nfShell, nfCanvasUtils));
|
||||
function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfProcessGroup, nfShell, nfCanvasUtils) {
|
||||
return (nf.ProcessGroupConfiguration = factory($, d3, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfProcessGroup, nfShell, nfCanvasUtils));
|
||||
});
|
||||
} else if (typeof exports === 'object' && typeof module === 'object') {
|
||||
module.exports = (nf.ProcessGroupConfiguration =
|
||||
@ -38,6 +39,7 @@
|
||||
require('nf.ErrorHandler'),
|
||||
require('nf.Common'),
|
||||
require('nf.Dialog'),
|
||||
require('nf.Storage'),
|
||||
require('nf.Client'),
|
||||
require('nf.ProcessGroup'),
|
||||
require('nf.Shell'),
|
||||
@ -48,12 +50,13 @@
|
||||
root.nf.ErrorHandler,
|
||||
root.nf.Common,
|
||||
root.nf.Dialog,
|
||||
root.nf.Storage,
|
||||
root.nf.Client,
|
||||
root.nf.ProcessGroup,
|
||||
root.nf.Shell,
|
||||
root.nf.CanvasUtils);
|
||||
}
|
||||
}(this, function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfProcessGroup, nfShell, nfCanvasUtils) {
|
||||
}(this, function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfProcessGroup, nfShell, nfCanvasUtils) {
|
||||
'use strict';
|
||||
|
||||
var nfControllerServices;
|
||||
@ -93,6 +96,7 @@
|
||||
'version': version
|
||||
}
|
||||
}),
|
||||
'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(),
|
||||
'component': {
|
||||
'id': groupId,
|
||||
'name': $('#process-group-name').val(),
|
||||
|
@ -23,6 +23,7 @@
|
||||
'nf.ErrorHandler',
|
||||
'nf.Common',
|
||||
'nf.Dialog',
|
||||
'nf.Storage',
|
||||
'nf.Client',
|
||||
'nf.CanvasUtils',
|
||||
'nf.ng.Bridge',
|
||||
@ -31,8 +32,8 @@
|
||||
'nf.CustomUi',
|
||||
'nf.UniversalCapture',
|
||||
'nf.Connection'],
|
||||
function ($, nfErrorHandler, nfCommon, nfDialog, nfClient, nfCanvasUtils, nfNgBridge, nfProcessor, nfClusterSummary, nfCustomUi, nfUniversalCapture, nfConnection) {
|
||||
return (nf.ProcessorConfiguration = factory($, nfErrorHandler, nfCommon, nfDialog, nfClient, nfCanvasUtils, nfNgBridge, nfProcessor, nfClusterSummary, nfCustomUi, nfUniversalCapture, nfConnection));
|
||||
function ($, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfCanvasUtils, nfNgBridge, nfProcessor, nfClusterSummary, nfCustomUi, nfUniversalCapture, nfConnection) {
|
||||
return (nf.ProcessorConfiguration = factory($, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfCanvasUtils, nfNgBridge, nfProcessor, nfClusterSummary, nfCustomUi, nfUniversalCapture, nfConnection));
|
||||
});
|
||||
} else if (typeof exports === 'object' && typeof module === 'object') {
|
||||
module.exports = (nf.ProcessorConfiguration =
|
||||
@ -40,6 +41,7 @@
|
||||
require('nf.ErrorHandler'),
|
||||
require('nf.Common'),
|
||||
require('nf.Dialog'),
|
||||
require('nf.Storage'),
|
||||
require('nf.Client'),
|
||||
require('nf.CanvasUtils'),
|
||||
require('nf.ng.Bridge'),
|
||||
@ -53,6 +55,7 @@
|
||||
root.nf.ErrorHandler,
|
||||
root.nf.Common,
|
||||
root.nf.Dialog,
|
||||
root.nf.Storage,
|
||||
root.nf.Client,
|
||||
root.nf.CanvasUtils,
|
||||
root.nf.ng.Bridge,
|
||||
@ -62,7 +65,7 @@
|
||||
root.nf.UniversalCapture,
|
||||
root.nf.Connection);
|
||||
}
|
||||
}(this, function ($, nfErrorHandler, nfCommon, nfDialog, nfClient, nfCanvasUtils, nfNgBridge, nfProcessor, nfClusterSummary, nfCustomUi, nfUniversalCapture, nfConnection) {
|
||||
}(this, function ($, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfCanvasUtils, nfNgBridge, nfProcessor, nfClusterSummary, nfCustomUi, nfUniversalCapture, nfConnection) {
|
||||
'use strict';
|
||||
|
||||
// possible values for a processor's run duration (in millis)
|
||||
@ -493,6 +496,7 @@
|
||||
// set the revision
|
||||
var d = nfProcessor.get(processor.id);
|
||||
updatedProcessor['revision'] = nfClient.getRevision(d);
|
||||
updatedProcessor['disconnectedNodeAcknowledged'] = nfStorage.isDisconnectionAcknowledged();
|
||||
|
||||
// update the selected component
|
||||
return $.ajax({
|
||||
|
@ -24,12 +24,13 @@
|
||||
'nf.ErrorHandler',
|
||||
'nf.Common',
|
||||
'nf.Dialog',
|
||||
'nf.Storage',
|
||||
'nf.Client',
|
||||
'nf.CanvasUtils',
|
||||
'nf.ng.Bridge',
|
||||
'nf.RemoteProcessGroup'],
|
||||
function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfCanvasUtils, nfNgBridge, nfRemoteProcessGroup) {
|
||||
return (nf.RemoteProcessGroupConfiguration = factory($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfCanvasUtils, nfNgBridge, nfRemoteProcessGroup));
|
||||
function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfCanvasUtils, nfNgBridge, nfRemoteProcessGroup) {
|
||||
return (nf.RemoteProcessGroupConfiguration = factory($, d3, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfCanvasUtils, nfNgBridge, nfRemoteProcessGroup));
|
||||
});
|
||||
} else if (typeof exports === 'object' && typeof module === 'object') {
|
||||
module.exports = (nf.RemoteProcessGroupConfiguration =
|
||||
@ -38,6 +39,7 @@
|
||||
require('nf.ErrorHandler'),
|
||||
require('nf.Common'),
|
||||
require('nf.Dialog'),
|
||||
require('nf.Storage'),
|
||||
require('nf.Client'),
|
||||
require('nf.CanvasUtils'),
|
||||
require('nf.ng.Bridge'),
|
||||
@ -48,12 +50,13 @@
|
||||
root.nf.ErrorHandler,
|
||||
root.nf.Common,
|
||||
root.nf.Dialog,
|
||||
root.nf.Storage,
|
||||
root.nf.Client,
|
||||
root.nf.CanvasUtils,
|
||||
root.nf.ng.Bridge,
|
||||
root.nf.RemoteProcessGroup);
|
||||
}
|
||||
}(this, function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfCanvasUtils, nfNgBridge, nfRemoteProcessGroup) {
|
||||
}(this, function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfCanvasUtils, nfNgBridge, nfRemoteProcessGroup) {
|
||||
'use strict';
|
||||
|
||||
return {
|
||||
@ -76,6 +79,7 @@
|
||||
// create the remote process group details
|
||||
var remoteProcessGroupEntity = {
|
||||
'revision': nfClient.getRevision(remoteProcessGroupData),
|
||||
'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(),
|
||||
'component': {
|
||||
id: remoteProcessGroupId,
|
||||
targetUris: $('#remote-process-group-urls').val(),
|
||||
|
@ -24,12 +24,13 @@
|
||||
'nf.ErrorHandler',
|
||||
'nf.Common',
|
||||
'nf.Dialog',
|
||||
'nf.Storage',
|
||||
'nf.Client',
|
||||
'nf.CanvasUtils',
|
||||
'nf.ng.Bridge',
|
||||
'nf.RemoteProcessGroup'],
|
||||
function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfCanvasUtils, nfNgBridge, nfRemoteProcessGroup) {
|
||||
return (nf.RemoteProcessGroupPorts = factory($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfCanvasUtils, nfNgBridge, nfRemoteProcessGroup));
|
||||
function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfCanvasUtils, nfNgBridge, nfRemoteProcessGroup) {
|
||||
return (nf.RemoteProcessGroupPorts = factory($, d3, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfCanvasUtils, nfNgBridge, nfRemoteProcessGroup));
|
||||
});
|
||||
} else if (typeof exports === 'object' && typeof module === 'object') {
|
||||
module.exports = (nf.RemoteProcessGroupPorts =
|
||||
@ -38,6 +39,7 @@
|
||||
require('nf.ErrorHandler'),
|
||||
require('nf.Common'),
|
||||
require('nf.Dialog'),
|
||||
require('nf.Storage'),
|
||||
require('nf.Client'),
|
||||
require('nf.CanvasUtils'),
|
||||
require('nf.ng.Bridge'),
|
||||
@ -48,12 +50,13 @@
|
||||
root.nf.ErrorHandler,
|
||||
root.nf.Common,
|
||||
root.nf.Dialog,
|
||||
root.nf.Storage,
|
||||
root.nf.Client,
|
||||
root.nf.CanvasUtils,
|
||||
root.nf.ng.Bridge,
|
||||
root.nf.RemoteProcessGroup);
|
||||
}
|
||||
}(this, function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfCanvasUtils, nfNgBridge, nfRemoteProcessGroup) {
|
||||
}(this, function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfCanvasUtils, nfNgBridge, nfRemoteProcessGroup) {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
@ -93,6 +96,7 @@
|
||||
// create the remote process group details
|
||||
var remoteProcessGroupPortEntity = {
|
||||
'revision': nfClient.getRevision(remoteProcessGroupData),
|
||||
'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(),
|
||||
'remoteProcessGroupPort': {
|
||||
id: remotePortId,
|
||||
groupId: remoteProcessGroupId,
|
||||
@ -371,6 +375,7 @@
|
||||
// create the remote process group details
|
||||
var remoteProcessGroupPortEntity = {
|
||||
'revision': nfClient.getRevision(remoteProcessGroupData),
|
||||
'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(),
|
||||
'remoteProcessGroupPort': {
|
||||
id: port.id,
|
||||
groupId: remoteProcessGroupId,
|
||||
|
@ -23,13 +23,14 @@
|
||||
'nf.ErrorHandler',
|
||||
'nf.Common',
|
||||
'nf.Dialog',
|
||||
'nf.Storage',
|
||||
'nf.Client',
|
||||
'nf.ControllerService',
|
||||
'nf.ControllerServices',
|
||||
'nf.UniversalCapture',
|
||||
'nf.CustomUi'],
|
||||
function ($, nfErrorHandler, nfCommon, nfDialog, nfClient, nfControllerService, nfControllerServices, nfUniversalCapture, nfCustomUi) {
|
||||
return (nf.ReportingTask = factory($, nfErrorHandler, nfCommon, nfDialog, nfClient, nfControllerService, nfControllerServices, nfUniversalCapture, nfCustomUi));
|
||||
function ($, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfControllerService, nfControllerServices, nfUniversalCapture, nfCustomUi) {
|
||||
return (nf.ReportingTask = factory($, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfControllerService, nfControllerServices, nfUniversalCapture, nfCustomUi));
|
||||
});
|
||||
} else if (typeof exports === 'object' && typeof module === 'object') {
|
||||
module.exports = (nf.ReportingTask =
|
||||
@ -37,6 +38,7 @@
|
||||
require('nf.ErrorHandler'),
|
||||
require('nf.Common'),
|
||||
require('nf.Dialog'),
|
||||
require('nf.Storage'),
|
||||
require('nf.Client'),
|
||||
require('nf.ControllerService'),
|
||||
require('nf.ControllerServices'),
|
||||
@ -47,13 +49,14 @@
|
||||
root.nf.ErrorHandler,
|
||||
root.nf.Common,
|
||||
root.nf.Dialog,
|
||||
root.nf.Storage,
|
||||
root.nf.Client,
|
||||
root.nf.ControllerService,
|
||||
root.nf.ControllerServices,
|
||||
root.nf.UniversalCapture,
|
||||
root.nf.CustomUi);
|
||||
}
|
||||
}(this, function ($, nfErrorHandler, nfCommon, nfDialog, nfClient, nfControllerService, nfControllerServices, nfUniversalCapture, nfCustomUi) {
|
||||
}(this, function ($, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfControllerService, nfControllerServices, nfUniversalCapture, nfCustomUi) {
|
||||
'use strict';
|
||||
|
||||
var nfSettings;
|
||||
@ -243,6 +246,7 @@
|
||||
var setRunning = function (reportingTaskEntity, running) {
|
||||
var entity = {
|
||||
'revision': nfClient.getRevision(reportingTaskEntity),
|
||||
'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(),
|
||||
'component': {
|
||||
'id': reportingTaskEntity.id,
|
||||
'state': running === true ? 'RUNNING' : 'STOPPED'
|
||||
@ -306,6 +310,7 @@
|
||||
// ensure details are valid as far as we can tell
|
||||
if (validateDetails(updatedReportingTask)) {
|
||||
updatedReportingTask['revision'] = nfClient.getRevision(reportingTaskEntity);
|
||||
updatedReportingTask['disconnectedNodeAcknowledged'] = nfStorage.isDisconnectionAcknowledged();
|
||||
|
||||
// update the selected component
|
||||
return $.ajax({
|
||||
@ -813,8 +818,9 @@
|
||||
$.ajax({
|
||||
type: 'DELETE',
|
||||
url: reportingTaskEntity.uri + '?' + $.param({
|
||||
version: revision.version,
|
||||
clientId: revision.clientId
|
||||
'version': revision.version,
|
||||
'clientId': revision.clientId,
|
||||
'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged()
|
||||
}),
|
||||
dataType: 'json'
|
||||
}).done(function (response) {
|
||||
|
@ -24,6 +24,7 @@
|
||||
'd3',
|
||||
'nf.Client',
|
||||
'nf.Dialog',
|
||||
'nf.Storage',
|
||||
'nf.Common',
|
||||
'nf.CanvasUtils',
|
||||
'nf.ControllerServices',
|
||||
@ -34,8 +35,8 @@
|
||||
'nf.ComponentState',
|
||||
'nf.ComponentVersion',
|
||||
'nf.PolicyManagement'],
|
||||
function ($, Slick, d3, nfClient, nfDialog, nfCommon, nfCanvasUtils, nfControllerServices, nfErrorHandler, nfFilteredDialogCommon, nfReportingTask, nfShell, nfComponentState, nfComponentVersion, nfPolicyManagement) {
|
||||
return (nf.Settings = factory($, Slick, d3, nfClient, nfDialog, nfCommon, nfCanvasUtils, nfControllerServices, nfErrorHandler, nfFilteredDialogCommon, nfReportingTask, nfShell, nfComponentState, nfComponentVersion, nfPolicyManagement));
|
||||
function ($, Slick, d3, nfClient, nfDialog, nfStorage, nfCommon, nfCanvasUtils, nfControllerServices, nfErrorHandler, nfFilteredDialogCommon, nfReportingTask, nfShell, nfComponentState, nfComponentVersion, nfPolicyManagement) {
|
||||
return (nf.Settings = factory($, Slick, d3, nfClient, nfDialog, nfStorage, nfCommon, nfCanvasUtils, nfControllerServices, nfErrorHandler, nfFilteredDialogCommon, nfReportingTask, nfShell, nfComponentState, nfComponentVersion, nfPolicyManagement));
|
||||
});
|
||||
} else if (typeof exports === 'object' && typeof module === 'object') {
|
||||
module.exports = (nf.Settings =
|
||||
@ -44,6 +45,7 @@
|
||||
require('d3'),
|
||||
require('nf.Client'),
|
||||
require('nf.Dialog'),
|
||||
require('nf.Storage'),
|
||||
require('nf.Common'),
|
||||
require('nf.CanvasUtils'),
|
||||
require('nf.ControllerServices'),
|
||||
@ -60,6 +62,7 @@
|
||||
root.d3,
|
||||
root.nf.Client,
|
||||
root.nf.Dialog,
|
||||
root.nf.Storage,
|
||||
root.nf.Common,
|
||||
root.nf.CanvasUtils,
|
||||
root.nf.ControllerServices,
|
||||
@ -71,7 +74,7 @@
|
||||
root.nf.ComponentVersion,
|
||||
root.nf.PolicyManagement);
|
||||
}
|
||||
}(this, function ($, Slick, d3, nfClient, nfDialog, nfCommon, nfCanvasUtils, nfControllerServices, nfErrorHandler, nfFilteredDialogCommon, nfReportingTask, nfShell, nfComponentState, nfComponentVersion, nfPolicyManagement) {
|
||||
}(this, function ($, Slick, d3, nfClient, nfDialog, nfStorage, nfCommon, nfCanvasUtils, nfControllerServices, nfErrorHandler, nfFilteredDialogCommon, nfReportingTask, nfShell, nfComponentState, nfComponentVersion, nfPolicyManagement) {
|
||||
'use strict';
|
||||
|
||||
|
||||
@ -119,6 +122,7 @@
|
||||
'version': version
|
||||
}
|
||||
}),
|
||||
'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(),
|
||||
'component': configuration
|
||||
};
|
||||
|
||||
@ -435,6 +439,7 @@
|
||||
'version': 0
|
||||
}
|
||||
}),
|
||||
'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(),
|
||||
'component': {
|
||||
'type': reportingTaskType,
|
||||
'bundle': reportingTaskBundle
|
||||
@ -483,6 +488,7 @@
|
||||
'version': 0
|
||||
}
|
||||
}),
|
||||
'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(),
|
||||
'component': {
|
||||
'name': $('#registry-name').val(),
|
||||
'uri': $('#registry-location').val(),
|
||||
@ -533,6 +539,7 @@
|
||||
var registryEntity = registriesData.getItemById(registryId);
|
||||
var requestRegistryEntity = {
|
||||
'revision': nfClient.getRevision(registryEntity),
|
||||
'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(),
|
||||
'component': {
|
||||
'id': registryId,
|
||||
'name': $('#registry-name').val(),
|
||||
@ -1481,8 +1488,9 @@
|
||||
$.ajax({
|
||||
type: 'DELETE',
|
||||
url: registryEntity.uri + '?' + $.param({
|
||||
version: revision.version,
|
||||
clientId: revision.clientId
|
||||
'version': revision.version,
|
||||
'clientId': revision.clientId,
|
||||
'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged()
|
||||
}),
|
||||
dataType: 'json'
|
||||
}).done(function (response) {
|
||||
|
@ -21,24 +21,27 @@
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define(['jquery',
|
||||
'd3',
|
||||
'nf.Storage',
|
||||
'nf.CanvasUtils',
|
||||
'nf.Client'],
|
||||
function ($, d3, nfCanvasUtils, nfClient) {
|
||||
return (nf.Snippet = factory($, d3, nfCanvasUtils, nfClient));
|
||||
function ($, d3, nfStorage, nfCanvasUtils, nfClient) {
|
||||
return (nf.Snippet = factory($, d3, nfStorage, nfCanvasUtils, nfClient));
|
||||
});
|
||||
} else if (typeof exports === 'object' && typeof module === 'object') {
|
||||
module.exports = (nf.Snippet =
|
||||
factory(require('jquery'),
|
||||
require('d3'),
|
||||
require('nf.Storage'),
|
||||
require('nf.CanvasUtils'),
|
||||
require('nf.Client')));
|
||||
} else {
|
||||
nf.Snippet = factory(root.$,
|
||||
root.d3,
|
||||
root.nf.Storage,
|
||||
root.nf.CanvasUtils,
|
||||
root.nf.Client);
|
||||
}
|
||||
}(this, function ($, d3, nfCanvasUtils, nfClient) {
|
||||
}(this, function ($, d3, nfStorage, nfCanvasUtils, nfClient) {
|
||||
'use strict';
|
||||
|
||||
var config = {
|
||||
@ -102,6 +105,7 @@
|
||||
*/
|
||||
create: function (snippet) {
|
||||
var snippetEntity = {
|
||||
'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(),
|
||||
'snippet': snippet
|
||||
};
|
||||
|
||||
@ -125,7 +129,8 @@
|
||||
var copySnippetRequestEntity = {
|
||||
'snippetId': snippetId,
|
||||
'originX': origin.x,
|
||||
'originY': origin.y
|
||||
'originY': origin.y,
|
||||
'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged()
|
||||
};
|
||||
|
||||
return $.ajax({
|
||||
@ -145,7 +150,9 @@
|
||||
remove: function (snippetId) {
|
||||
return $.ajax({
|
||||
type: 'DELETE',
|
||||
url: config.urls.snippets + '/' + encodeURIComponent(snippetId)
|
||||
url: config.urls.snippets + '/' + encodeURIComponent(snippetId) + '?' + $.param({
|
||||
'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged()
|
||||
})
|
||||
});
|
||||
},
|
||||
|
||||
@ -157,6 +164,7 @@
|
||||
*/
|
||||
move: function (snippetId, newGroupId) {
|
||||
var moveSnippetEntity = {
|
||||
'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(),
|
||||
'snippet': {
|
||||
'id': snippetId,
|
||||
'parentGroupId': newGroupId
|
||||
|
@ -29,14 +29,15 @@
|
||||
'nf.CanvasUtils',
|
||||
'nf.ErrorHandler',
|
||||
'nf.Dialog',
|
||||
'nf.Storage',
|
||||
'nf.Client',
|
||||
'nf.Common',
|
||||
'nf.ng.Bridge',
|
||||
'nf.Processor',
|
||||
'nf.ProcessGroup',
|
||||
'nf.ProcessGroupConfiguration'],
|
||||
function ($, d3, Slick, nfCanvas, nfCanvasUtils, nfErrorHandler, nfDialog, nfClient, nfCommon, nfNgBridge, nfProcessor, nfProcessGroup, nfProcessGroupConfiguration) {
|
||||
return (nf.ComponentState = factory($, d3, Slick, nfCanvas, nfCanvasUtils, nfErrorHandler, nfDialog, nfClient, nfCommon, nfNgBridge, nfProcessor, nfProcessGroup, nfProcessGroupConfiguration));
|
||||
function ($, d3, Slick, nfCanvas, nfCanvasUtils, nfErrorHandler, nfDialog, nfStorage, nfClient, nfCommon, nfNgBridge, nfProcessor, nfProcessGroup, nfProcessGroupConfiguration) {
|
||||
return (nf.ComponentState = factory($, d3, Slick, nfCanvas, nfCanvasUtils, nfErrorHandler, nfDialog, nfStorage, nfClient, nfCommon, nfNgBridge, nfProcessor, nfProcessGroup, nfProcessGroupConfiguration));
|
||||
});
|
||||
} else if (typeof exports === 'object' && typeof module === 'object') {
|
||||
module.exports = (nf.ComponentState =
|
||||
@ -47,6 +48,7 @@
|
||||
require('nf.CanvasUtils'),
|
||||
require('nf.ErrorHandler'),
|
||||
require('nf.Dialog'),
|
||||
require('nf.Storage'),
|
||||
require('nf.Client'),
|
||||
require('nf.Common'),
|
||||
require('nf.ng.Bridge'),
|
||||
@ -61,6 +63,7 @@
|
||||
root.nf.CanvasUtils,
|
||||
root.nf.ErrorHandler,
|
||||
root.nf.Dialog,
|
||||
root.nf.Storage,
|
||||
root.nf.Client,
|
||||
root.nf.Common,
|
||||
root.nf.ng.Bridge,
|
||||
@ -68,7 +71,7 @@
|
||||
root.nf.ProcessGroup,
|
||||
root.nf.ProcessGroupConfiguration);
|
||||
}
|
||||
}(this, function ($, d3, Slick, nfCanvas, nfCanvasUtils, nfErrorHandler, nfDialog, nfClient, nfCommon, nfNgBridge, nfProcessor, nfProcessGroup, nfProcessGroupConfiguration) {
|
||||
}(this, function ($, d3, Slick, nfCanvas, nfCanvasUtils, nfErrorHandler, nfDialog, nfStorage, nfClient, nfCommon, nfNgBridge, nfProcessor, nfProcessGroup, nfProcessGroupConfiguration) {
|
||||
'use strict';
|
||||
|
||||
var lastSelectedId = null;
|
||||
@ -1333,6 +1336,7 @@
|
||||
version: processGroupRevision.version
|
||||
}
|
||||
}),
|
||||
'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(),
|
||||
variableRegistry: {
|
||||
processGroupId: processGroupId,
|
||||
variables: variables
|
||||
@ -1373,7 +1377,9 @@
|
||||
var deleteUpdateRequest = function (processGroupId, updateRequestId) {
|
||||
return $.ajax({
|
||||
type: 'DELETE',
|
||||
url: '../nifi-api/process-groups/' + encodeURIComponent(processGroupId) + '/variable-registry/update-requests/' + encodeURIComponent(updateRequestId),
|
||||
url: '../nifi-api/process-groups/' + encodeURIComponent(processGroupId) + '/variable-registry/update-requests/' + encodeURIComponent(updateRequestId) + '?' + $.param({
|
||||
'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged()
|
||||
}),
|
||||
dataType: 'json'
|
||||
}).fail(nfErrorHandler.handleAjaxError);
|
||||
};
|
||||
|
@ -29,6 +29,7 @@
|
||||
nf.ClusterSummary = factory(root.$);
|
||||
}
|
||||
}(this, function ($) {
|
||||
var knownConnectionState = false;
|
||||
var clustered = false;
|
||||
var connectedToCluster = false;
|
||||
var connectedStateChanged = false;
|
||||
@ -56,13 +57,25 @@
|
||||
var clusterSummary = clusterSummaryResponse.clusterSummary;
|
||||
|
||||
// see if the connected state changes
|
||||
if (connectedToCluster !== clusterSummary.connectedToCluster) {
|
||||
connectedStateChanged = true;
|
||||
if (knownConnectionState === true) {
|
||||
if (connectedToCluster !== clusterSummary.connectedToCluster) {
|
||||
connectedStateChanged = true;
|
||||
}
|
||||
} else {
|
||||
// if the state hasn't changed, but the node is disconnected treat it
|
||||
// as the state changing
|
||||
if (clusterSummary.clustered && !clusterSummary.connectedToCluster) {
|
||||
connectedStateChanged = true;
|
||||
}
|
||||
}
|
||||
|
||||
// establish the initial cluster state
|
||||
|
||||
// establish the current cluster state
|
||||
clustered = clusterSummary.clustered;
|
||||
connectedToCluster = clusterSummary.connectedToCluster;
|
||||
|
||||
// record that we have a known connection state
|
||||
knownConnectionState = true;
|
||||
});
|
||||
},
|
||||
|
||||
|
@ -156,20 +156,30 @@
|
||||
/**
|
||||
* Shows a message when disconnected from the cluster.
|
||||
*/
|
||||
showDisconnectedFromClusterMessage: function () {
|
||||
showDisconnectedFromClusterMessage: function (okHandler) {
|
||||
nfDialog.showOkDialog({
|
||||
headerText: 'Cluster Connection',
|
||||
dialogContent: 'This node is currently not connected to the cluster. Any modifications to the data flow made here will not replicate across the cluster.'
|
||||
dialogContent: 'This node is currently not connected to the cluster. Any modifications to the data flow made here will not replicate across the cluster.',
|
||||
okHandler: function () {
|
||||
if (typeof okHandler === 'function') {
|
||||
okHandler.call(this);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows a message when connected to the cluster.
|
||||
*/
|
||||
showConnectedToClusterMessage: function () {
|
||||
showConnectedToClusterMessage: function (okHandler) {
|
||||
nfDialog.showOkDialog({
|
||||
headerText: 'Cluster Connection',
|
||||
dialogContent: 'This node just joined the cluster. Any modifications to the data flow made here will replicate across the cluster.'
|
||||
dialogContent: 'This node just joined the cluster. Any modifications to the data flow made here will replicate across the cluster.',
|
||||
okHandler: function () {
|
||||
if (typeof okHandler === 'function') {
|
||||
okHandler.call(this);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
@ -29,6 +29,8 @@
|
||||
}
|
||||
}(this, function () {
|
||||
|
||||
var disconnectionAcknowledged = false;
|
||||
|
||||
// Store items for two days before being eligible for removal.
|
||||
var MILLIS_PER_DAY = 86400000;
|
||||
var TWO_DAYS = MILLIS_PER_DAY * 2;
|
||||
@ -103,6 +105,18 @@
|
||||
}
|
||||
},
|
||||
|
||||
acknowledgeDisconnection: function () {
|
||||
disconnectionAcknowledged = true;
|
||||
},
|
||||
|
||||
resetDisconnectionAcknowledgement: function () {
|
||||
disconnectionAcknowledged = false;
|
||||
},
|
||||
|
||||
isDisconnectionAcknowledged: function () {
|
||||
return disconnectionAcknowledged;
|
||||
},
|
||||
|
||||
/**
|
||||
* Stores the specified item.
|
||||
*
|
||||
|
@ -44,6 +44,8 @@
|
||||
}(this, function ($, Slick, nfCommon, nfDialog, nfErrorHandler) {
|
||||
'use strict';
|
||||
|
||||
var isDisconnectionAcknowledged = false;
|
||||
|
||||
/**
|
||||
* Configuration object used to hold a number of configuration items.
|
||||
*/
|
||||
@ -129,7 +131,9 @@
|
||||
var deleteTemplate = function (templateEntity) {
|
||||
$.ajax({
|
||||
type: 'DELETE',
|
||||
url: templateEntity.template.uri,
|
||||
url: templateEntity.template.uri + '?' + $.param({
|
||||
'disconnectedNodeAcknowledged': isDisconnectionAcknowledged
|
||||
}),
|
||||
dataType: 'json'
|
||||
}).done(function () {
|
||||
var templatesGrid = $('#templates-table').data('gridInstance');
|
||||
@ -226,7 +230,9 @@
|
||||
/**
|
||||
* Initializes the templates list.
|
||||
*/
|
||||
init: function () {
|
||||
init: function (disconnectionAcknowledged) {
|
||||
isDisconnectionAcknowledged = disconnectionAcknowledged;
|
||||
|
||||
// define the function for filtering the list
|
||||
$('#templates-filter').keyup(function () {
|
||||
applyFilter();
|
||||
@ -286,12 +292,11 @@
|
||||
markup += '<div title="Download" class="pointer export-template icon icon-template-save"></div>';
|
||||
}
|
||||
|
||||
// all DFMs to remove templates
|
||||
if (dataContext.permissions.canWrite === true) {
|
||||
markup += '<div title="Remove Template" class="pointer prompt-to-delete-template fa fa-trash"></div>';
|
||||
}
|
||||
|
||||
// allow policy configuration conditionally if embedded in
|
||||
// allow policy configuration conditionally if framed
|
||||
if (top !== window && nfCommon.canAccessTenants()) {
|
||||
if (nfCommon.isDefinedAndNotNull(parent.nf) && nfCommon.isDefinedAndNotNull(parent.nf.CanvasUtils) && parent.nf.CanvasUtils.isManagedAuthorizer()) {
|
||||
markup += '<div title="Access Policies" class="pointer edit-access-policies fa fa-key"></div>';
|
||||
|
@ -21,27 +21,30 @@
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define(['jquery',
|
||||
'nf.Common',
|
||||
'nf.Dialog',
|
||||
'nf.TemplatesTable',
|
||||
'nf.ErrorHandler',
|
||||
'nf.Storage'],
|
||||
function ($, nfCommon, nfTemplatesTable, nfErrorHandler, nfStorage) {
|
||||
return (nf.Templates = factory($, nfCommon, nfTemplatesTable, nfErrorHandler, nfStorage));
|
||||
function ($, nfCommon, nfDialog, nfTemplatesTable, nfErrorHandler, nfStorage) {
|
||||
return (nf.Templates = factory($, nfCommon, nfDialog, nfTemplatesTable, nfErrorHandler, nfStorage));
|
||||
});
|
||||
} else if (typeof exports === 'object' && typeof module === 'object') {
|
||||
module.exports = (nf.Templates =
|
||||
factory(require('jquery'),
|
||||
require('nf.Common'),
|
||||
require('nf.Dialog'),
|
||||
require('nf.TemplatesTable'),
|
||||
require('nf.ErrorHandler'),
|
||||
require('nf.Storage')));
|
||||
} else {
|
||||
nf.Templates = factory(root.$,
|
||||
root.nf.Common,
|
||||
root.nf.Dialog,
|
||||
root.nf.TemplatesTable,
|
||||
root.nf.ErrorHandler,
|
||||
root.nf.Storage);
|
||||
}
|
||||
}(this, function ($, nfCommon, nfTemplatesTable, nfErrorHandler, nfStorage) {
|
||||
}(this, function ($, nfCommon, nfDialog, nfTemplatesTable, nfErrorHandler, nfStorage) {
|
||||
'use strict';
|
||||
|
||||
$(document).ready(function () {
|
||||
@ -73,6 +76,36 @@
|
||||
}).fail(nfErrorHandler.handleAjaxError);
|
||||
};
|
||||
|
||||
/**
|
||||
* Verifies if the current node is disconnected from the cluster.
|
||||
*/
|
||||
var verifyDisconnectedCluster = function () {
|
||||
return $.Deferred(function (deferred) {
|
||||
if (top !== window && nfCommon.isDefinedAndNotNull(parent.nf) && nfCommon.isDefinedAndNotNull(parent.nf.Storage)) {
|
||||
deferred.resolve(parent.nf.Storage.isDisconnectionAcknowledged());
|
||||
} else {
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: '../nifi-api/flow/cluster/summary',
|
||||
dataType: 'json'
|
||||
}).done(function (clusterSummaryResult) {
|
||||
var clusterSummaryResponse = clusterSummaryResult;
|
||||
var clusterSummary = clusterSummaryResponse.clusterSummary;
|
||||
|
||||
if (clusterSummary.connectedToCluster) {
|
||||
deferred.resolve(false);
|
||||
} else {
|
||||
nfDialog.showDisconnectedFromClusterMessage(function () {
|
||||
deferred.resolve(true);
|
||||
});
|
||||
}
|
||||
}).fail(nfErrorHandler.handleAjaxError).fail(function () {
|
||||
deferred.reject();
|
||||
});
|
||||
}
|
||||
}).promise();
|
||||
};
|
||||
|
||||
/**
|
||||
* Initializes the templates table.
|
||||
*/
|
||||
@ -139,10 +172,10 @@
|
||||
nfStorage.init();
|
||||
|
||||
// load the current user
|
||||
loadCurrentUser().done(function () {
|
||||
$.when(verifyDisconnectedCluster(), loadCurrentUser()).done(function (verifyDisconnectedClusterResult) {
|
||||
|
||||
// create the templates table
|
||||
nfTemplatesTable.init();
|
||||
nfTemplatesTable.init(verifyDisconnectedClusterResult);
|
||||
|
||||
// load the table
|
||||
nfTemplatesTable.loadTemplatesTable().done(function () {
|
||||
|
@ -44,6 +44,8 @@
|
||||
}(this, function ($, Slick, nfCommon, nfClient, nfErrorHandler) {
|
||||
'use strict';
|
||||
|
||||
var isDisconnectionAcknowledged = false;
|
||||
|
||||
/**
|
||||
* Configuration object used to hold a number of configuration items.
|
||||
*/
|
||||
@ -72,11 +74,14 @@
|
||||
var usersGrid = $('#users-table').data('gridInstance');
|
||||
var usersData = usersGrid.getData();
|
||||
var user = usersData.getItemById(userId);
|
||||
var revision = nfClient.getRevision(user);
|
||||
|
||||
// update the user
|
||||
$.ajax({
|
||||
type: 'DELETE',
|
||||
url: user.uri + '?' + $.param(nfClient.getRevision(user)),
|
||||
url: user.uri + '?' + $.param($.extend({
|
||||
'disconnectedNodeAcknowledged': isDisconnectionAcknowledged
|
||||
}, revision)),
|
||||
dataType: 'json'
|
||||
}).done(function () {
|
||||
nfUsersTable.loadUsersTable();
|
||||
@ -170,6 +175,7 @@
|
||||
// build the request entity
|
||||
var updatedGroupEntity = {
|
||||
'revision': nfClient.getRevision(groupEntity),
|
||||
'disconnectedNodeAcknowledged': isDisconnectionAcknowledged,
|
||||
'component': $.extend({}, groupEntity.component, {
|
||||
'users': groupMembers
|
||||
})
|
||||
@ -208,6 +214,7 @@
|
||||
// build the request entity
|
||||
var updatedGroupEntity = {
|
||||
'revision': nfClient.getRevision(groupEntity),
|
||||
'disconnectedNodeAcknowledged': isDisconnectionAcknowledged,
|
||||
'component': $.extend({}, groupEntity.component, {
|
||||
'users': groupMembers
|
||||
})
|
||||
@ -277,6 +284,7 @@
|
||||
|
||||
var updatedUserEntity = {
|
||||
'revision': nfClient.getRevision(userEntity),
|
||||
'disconnectedNodeAcknowledged': isDisconnectionAcknowledged,
|
||||
'component': {
|
||||
'id': userId,
|
||||
'identity': userIdentity
|
||||
@ -370,6 +378,7 @@
|
||||
|
||||
var updatedGroupoEntity = {
|
||||
'revision': nfClient.getRevision(groupEntity),
|
||||
'disconnectedNodeAcknowledged': isDisconnectionAcknowledged,
|
||||
'component': {
|
||||
'id': groupId,
|
||||
'identity': groupIdentity,
|
||||
@ -414,7 +423,8 @@
|
||||
'revision': {
|
||||
'version': 0
|
||||
}
|
||||
})
|
||||
}),
|
||||
'disconnectedNodeAcknowledged': isDisconnectionAcknowledged
|
||||
};
|
||||
|
||||
// handle whether it's a user or a group
|
||||
@ -1234,7 +1244,9 @@
|
||||
};
|
||||
|
||||
var nfUsersTable = {
|
||||
init: function (configurableUsersAndGroups) {
|
||||
init: function (configurableUsersAndGroups, disconnectionAcknowledged) {
|
||||
isDisconnectionAcknowledged = disconnectionAcknowledged;
|
||||
|
||||
initUserDialog();
|
||||
initUserPoliciesDialog();
|
||||
initUserPoliciesTable();
|
||||
|
@ -21,17 +21,19 @@
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define(['jquery',
|
||||
'nf.Common',
|
||||
'nf.Dialog',
|
||||
'nf.UsersTable',
|
||||
'nf.ErrorHandler',
|
||||
'nf.Storage',
|
||||
'nf.Client'],
|
||||
function ($, nfCommon, nfUsersTable, nfErrorHandler, nfStorage, nfClient) {
|
||||
return (nf.Users = factory($, nfCommon, nfUsersTable, nfErrorHandler, nfStorage, nfClient));
|
||||
function ($, nfCommon, nfDialog, nfUsersTable, nfErrorHandler, nfStorage, nfClient) {
|
||||
return (nf.Users = factory($, nfCommon, nfDialog, nfUsersTable, nfErrorHandler, nfStorage, nfClient));
|
||||
});
|
||||
} else if (typeof exports === 'object' && typeof module === 'object') {
|
||||
module.exports = (nf.Users =
|
||||
factory(require('jquery'),
|
||||
require('nf.Common'),
|
||||
require('nf.Dialog'),
|
||||
require('nf.UsersTable'),
|
||||
require('nf.ErrorHandler'),
|
||||
require('nf.Storage'),
|
||||
@ -40,12 +42,13 @@
|
||||
nf.Users =
|
||||
factory(root.$,
|
||||
root.nf.Common,
|
||||
root.nf.Dialog,
|
||||
root.nf.UsersTable,
|
||||
root.nf.ErrorHandler,
|
||||
root.nf.Storage,
|
||||
root.nf.Client);
|
||||
}
|
||||
}(this, function ($, nfCommon, nfUsersTable, nfErrorHandler, nfStorage, nfClient) {
|
||||
}(this, function ($, nfCommon, nfDialog, nfUsersTable, nfErrorHandler, nfStorage, nfClient) {
|
||||
'use strict';
|
||||
|
||||
$(document).ready(function () {
|
||||
@ -92,6 +95,36 @@
|
||||
}).fail(nfErrorHandler.handleAjaxError);
|
||||
}
|
||||
|
||||
/**
|
||||
* Verifies if the current node is disconnected from the cluster.
|
||||
*/
|
||||
var verifyDisconnectedCluster = function () {
|
||||
return $.Deferred(function (deferred) {
|
||||
if (top !== window && nfCommon.isDefinedAndNotNull(parent.nf) && nfCommon.isDefinedAndNotNull(parent.nf.Storage)) {
|
||||
deferred.resolve(parent.nf.Storage.isDisconnectionAcknowledged());
|
||||
} else {
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: '../nifi-api/flow/cluster/summary',
|
||||
dataType: 'json'
|
||||
}).done(function (clusterSummaryResult) {
|
||||
var clusterSummaryResponse = clusterSummaryResult;
|
||||
var clusterSummary = clusterSummaryResponse.clusterSummary;
|
||||
|
||||
if (clusterSummary.connectedToCluster) {
|
||||
deferred.resolve(false);
|
||||
} else {
|
||||
nfDialog.showDisconnectedFromClusterMessage(function () {
|
||||
deferred.resolve(true);
|
||||
});
|
||||
}
|
||||
}).fail(nfErrorHandler.handleAjaxError).fail(function () {
|
||||
deferred.reject();
|
||||
});
|
||||
}
|
||||
}).promise();
|
||||
};
|
||||
|
||||
var initializeUsersPage = function () {
|
||||
// define mouse over event for the refresh button
|
||||
nfCommon.addHoverEffect('#user-refresh-button', 'button-refresh', 'button-refresh-hover').click(function () {
|
||||
@ -158,12 +191,12 @@
|
||||
nfClient.init();
|
||||
|
||||
// load the users authorities
|
||||
$.when(getFlowConfig(), ensureAccess()).done(function (configResult) {
|
||||
$.when(getFlowConfig(), verifyDisconnectedCluster(), ensureAccess()).done(function (configResult, verifyDisconnectedClusterResult) {
|
||||
var configResponse = configResult[0];
|
||||
var configDetails = configResponse.flowConfiguration;
|
||||
|
||||
// create the counters table
|
||||
nfUsersTable.init(configDetails.supportsConfigurableUsersAndGroups);
|
||||
nfUsersTable.init(configDetails.supportsConfigurableUsersAndGroups, verifyDisconnectedClusterResult);
|
||||
|
||||
// load the users table
|
||||
nfUsersTable.loadUsersTable().done(function () {
|
||||
|
@ -17,7 +17,12 @@
|
||||
|
||||
package org.apache.nifi.web.standard.api.processor;
|
||||
|
||||
import java.util.Map;
|
||||
import org.apache.nifi.web.ComponentDetails;
|
||||
import org.apache.nifi.web.NiFiWebConfigurationContext;
|
||||
import org.apache.nifi.web.NiFiWebConfigurationRequestContext;
|
||||
import org.apache.nifi.web.standard.api.AbstractStandardResource;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import javax.ws.rs.Consumes;
|
||||
import javax.ws.rs.GET;
|
||||
@ -27,14 +32,7 @@ import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.QueryParam;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import javax.ws.rs.core.Response;
|
||||
|
||||
import org.apache.nifi.web.ComponentDetails;
|
||||
import org.apache.nifi.web.NiFiWebConfigurationContext;
|
||||
|
||||
import org.apache.nifi.web.NiFiWebConfigurationRequestContext;
|
||||
import org.apache.nifi.web.standard.api.AbstractStandardResource;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import java.util.Map;
|
||||
|
||||
@Path("/standard/processor")
|
||||
public class ProcessorResource extends AbstractStandardResource {
|
||||
@ -56,9 +54,11 @@ public class ProcessorResource extends AbstractStandardResource {
|
||||
@Consumes({MediaType.APPLICATION_JSON})
|
||||
@Path("/properties")
|
||||
public Response setProperties(@QueryParam("processorId") final String processorId, @QueryParam("revisionId") final Long revisionId,
|
||||
@QueryParam("clientId") final String clientId, Map<String,String> properties){
|
||||
@QueryParam("clientId") final String clientId, @QueryParam("disconnectedNodeAcknowledged") final Boolean isDisconnectionAcknowledged,
|
||||
Map<String,String> properties){
|
||||
|
||||
final NiFiWebConfigurationContext nifiWebContext = getWebConfigurationContext();
|
||||
final NiFiWebConfigurationRequestContext niFiRequestContext = ProcessorWebUtils.getRequestContext(processorId,revisionId,clientId,request);
|
||||
final NiFiWebConfigurationRequestContext niFiRequestContext = ProcessorWebUtils.getRequestContext(processorId,revisionId,clientId,isDisconnectionAcknowledged,request);
|
||||
final ComponentDetails componentDetails = nifiWebContext.updateComponent(niFiRequestContext,null,properties);
|
||||
final Response.ResponseBuilder response = ProcessorWebUtils.applyCacheControl(Response.ok(componentDetails));
|
||||
return response.build();
|
||||
|
@ -17,10 +17,6 @@
|
||||
|
||||
package org.apache.nifi.web.standard.api.processor;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.ws.rs.core.CacheControl;
|
||||
import javax.ws.rs.core.Response;
|
||||
|
||||
import org.apache.nifi.web.ComponentDetails;
|
||||
import org.apache.nifi.web.HttpServletConfigurationRequestContext;
|
||||
import org.apache.nifi.web.HttpServletRequestContext;
|
||||
@ -30,26 +26,16 @@ import org.apache.nifi.web.NiFiWebRequestContext;
|
||||
import org.apache.nifi.web.Revision;
|
||||
import org.apache.nifi.web.UiExtensionType;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.ws.rs.core.CacheControl;
|
||||
import javax.ws.rs.core.Response;
|
||||
|
||||
|
||||
class ProcessorWebUtils {
|
||||
|
||||
static ComponentDetails getComponentDetails(final NiFiWebConfigurationContext configurationContext,final String processorId,
|
||||
final Long revision, final String clientId, HttpServletRequest request){
|
||||
|
||||
final NiFiWebRequestContext requestContext;
|
||||
|
||||
if(processorId != null && revision != null && clientId != null){
|
||||
requestContext = getRequestContext(processorId, revision, clientId, request) ;
|
||||
} else{
|
||||
requestContext = getRequestContext(processorId,request);
|
||||
}
|
||||
|
||||
return configurationContext.getComponentDetails(requestContext);
|
||||
|
||||
}
|
||||
|
||||
static ComponentDetails getComponentDetails(final NiFiWebConfigurationContext configurationContext,final String processorId, HttpServletRequest request){
|
||||
return getComponentDetails(configurationContext,processorId,null,null,request);
|
||||
final NiFiWebRequestContext requestContext = getRequestContext(processorId,request);
|
||||
return configurationContext.getComponentDetails(requestContext);
|
||||
}
|
||||
|
||||
static Response.ResponseBuilder applyCacheControl(Response.ResponseBuilder response) {
|
||||
@ -60,7 +46,9 @@ class ProcessorWebUtils {
|
||||
return response.cacheControl(cacheControl);
|
||||
}
|
||||
|
||||
static NiFiWebConfigurationRequestContext getRequestContext(final String processorId, final Long revision, final String clientId, HttpServletRequest request) {
|
||||
static NiFiWebConfigurationRequestContext getRequestContext(final String processorId, final Long revision, final String clientId,
|
||||
final Boolean isDisconnectionAcknowledged, HttpServletRequest request) {
|
||||
|
||||
return new HttpServletConfigurationRequestContext(UiExtensionType.ProcessorConfiguration, request) {
|
||||
@Override
|
||||
public String getId() {
|
||||
@ -71,6 +59,11 @@ class ProcessorWebUtils {
|
||||
public Revision getRevision() {
|
||||
return new Revision(revision, clientId, processorId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isDisconnectionAcknowledged() {
|
||||
return Boolean.TRUE.equals(isDisconnectionAcknowledged);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -25,8 +25,8 @@ var ProcessorService = function ProcessorService($http) {
|
||||
'getDetails' : getDetails
|
||||
};
|
||||
|
||||
function setProperties(processorId,revisionId,clientId,properties){
|
||||
var urlParams = 'processorId='+processorId+'&revisionId='+revisionId+'&clientId='+clientId;
|
||||
function setProperties(processorId,revisionId,clientId,disconnectedNodeAcknowledged,properties){
|
||||
var urlParams = 'processorId='+processorId+'&revisionId='+revisionId+'&clientId='+clientId+'&disconnectedNodeAcknowledged='+disconnectedNodeAcknowledged;
|
||||
return $http({url: 'api/standard/processor/properties?'+urlParams,method:'PUT',data:properties});
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,7 @@ var MainState = function($stateProvider) {
|
||||
|
||||
$stateProvider
|
||||
.state('main', {
|
||||
url: "/main?id&revision&clientId&editable",
|
||||
url: "/main?id&revision&clientId&editable&disconnectedNodeAcknowledged",
|
||||
controller: 'MainController'
|
||||
})
|
||||
};
|
||||
|
@ -22,6 +22,7 @@ var TransformJsonController = function ($scope, $state, $q, $mdDialog, $timeout,
|
||||
$scope.clientId = '';
|
||||
$scope.revisionId = '';
|
||||
$scope.editable = false;
|
||||
$scope.disconnectedNodeAcknowledged = false;
|
||||
$scope.specEditor = {};
|
||||
$scope.inputEditor = {};
|
||||
$scope.jsonInput = '';
|
||||
@ -345,13 +346,13 @@ var TransformJsonController = function ($scope, $state, $q, $mdDialog, $timeout,
|
||||
}
|
||||
};
|
||||
|
||||
$scope.saveSpec = function(jsonInput,jsonSpec,transform,processorId,clientId,revisionId){
|
||||
$scope.saveSpec = function(jsonInput,jsonSpec,transform,processorId,clientId,disconnectedNodeAcknowledged,revisionId){
|
||||
|
||||
$scope.clearError();
|
||||
|
||||
var properties = $scope.getProperties(transform,jsonSpec);
|
||||
|
||||
ProcessorService.setProperties(processorId,revisionId,clientId,properties)
|
||||
ProcessorService.setProperties(processorId,revisionId,clientId,disconnectedNodeAcknowledged,properties)
|
||||
.then(function(response) {
|
||||
var details = response.data;
|
||||
$scope.populateScopeWithDetails(details);
|
||||
@ -406,6 +407,7 @@ var TransformJsonController = function ($scope, $state, $q, $mdDialog, $timeout,
|
||||
$scope.processorId = params.id;
|
||||
$scope.clientId = params.clientId;
|
||||
$scope.revisionId = params.revision;
|
||||
$scope.disconnectedNodeAcknowledged = eval(params.disconnectedNodeAcknowledged);
|
||||
$scope.editable = eval(params.editable);
|
||||
|
||||
var jsonSpec = $scope.getSpec($scope.transform,$scope.jsonSpec);
|
||||
|
@ -20,7 +20,7 @@ var TransformJsonState = function($stateProvider) {
|
||||
|
||||
$stateProvider
|
||||
.state('jolttransformjson', {
|
||||
url: "/transformjson?id&revision&clientId&editable",
|
||||
url: "/transformjson?id&revision&clientId&editable&disconnectedNodeAcknowledged",
|
||||
templateUrl: "app/transformjson/transformjson.view.html",
|
||||
controller: 'TransformJsonController',
|
||||
resolve: {
|
||||
|
@ -68,7 +68,8 @@
|
||||
</button>
|
||||
</span>
|
||||
<span>
|
||||
<button class="primary-button" ng-click="saveSpec(jsonInput,getSpec(transform,jsonSpec),transform,processorId,clientId,revisionId)" ng-disabled="(!jsonSpec && transform != 'jolt-transform-sort') || !editable || !specUpdated">
|
||||
<button class="primary-button" ng-click="saveSpec(jsonInput,getSpec(transform,jsonSpec),transform,processorId,clientId,disconnectedNodeAcknowledged,revisionId)"
|
||||
ng-disabled="(!jsonSpec && transform != 'jolt-transform-sort') || !editable || !specUpdated">
|
||||
Save
|
||||
</button>
|
||||
</span>
|
||||
|
@ -17,21 +17,20 @@
|
||||
package org.apache.nifi.web.standard.api.processor;
|
||||
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.ws.rs.core.CacheControl;
|
||||
import javax.ws.rs.core.Response;
|
||||
|
||||
import org.apache.nifi.web.ComponentDetails;
|
||||
import org.apache.nifi.web.HttpServletConfigurationRequestContext;
|
||||
import org.apache.nifi.web.HttpServletRequestContext;
|
||||
import org.apache.nifi.web.NiFiWebConfigurationContext;
|
||||
import org.apache.nifi.web.NiFiWebRequestContext;
|
||||
import org.apache.nifi.web.standard.api.processor.ProcessorWebUtils;
|
||||
import org.junit.Test;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.ws.rs.core.CacheControl;
|
||||
import javax.ws.rs.core.Response;
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.mockito.Matchers.any;
|
||||
@ -56,7 +55,7 @@ public class TestProcessorWebUtils {
|
||||
public void testGetComponentDetailsForProcessorWithSpecificClientRevision(){
|
||||
NiFiWebConfigurationContext configurationContext = mock(NiFiWebConfigurationContext.class);
|
||||
when(configurationContext.getComponentDetails(any(HttpServletConfigurationRequestContext.class))).thenReturn(new ComponentDetails.Builder().build());
|
||||
ComponentDetails componentDetails = ProcessorWebUtils.getComponentDetails(configurationContext,"1",1L, "client1",mock(HttpServletRequest.class));
|
||||
ComponentDetails componentDetails = ProcessorWebUtils.getComponentDetails(configurationContext,"1",mock(HttpServletRequest.class));
|
||||
assertNotNull(componentDetails);
|
||||
}
|
||||
|
||||
|
@ -135,7 +135,7 @@ public class RuleResource {
|
||||
|
||||
// build the web context config
|
||||
final NiFiWebConfigurationRequestContext requestContext = getConfigurationRequestContext(
|
||||
requestEntity.getProcessorId(), requestEntity.getRevision(), requestEntity.getClientId());
|
||||
requestEntity.getProcessorId(), requestEntity.getRevision(), requestEntity.getClientId(), requestEntity.isDisconnectedNodeAcknowledged());
|
||||
|
||||
// load the criteria
|
||||
final Criteria criteria = getCriteria(configurationContext, requestContext);
|
||||
@ -212,7 +212,7 @@ public class RuleResource {
|
||||
|
||||
// build the request context
|
||||
final NiFiWebConfigurationRequestContext requestContext = getConfigurationRequestContext(
|
||||
requestEntity.getProcessorId(), requestEntity.getRevision(), requestEntity.getClientId());
|
||||
requestEntity.getProcessorId(), requestEntity.getRevision(), requestEntity.getClientId(), requestEntity.isDisconnectedNodeAcknowledged());
|
||||
|
||||
// load the criteria
|
||||
final Criteria criteria = getCriteria(configurationContext, requestContext);
|
||||
@ -489,7 +489,7 @@ public class RuleResource {
|
||||
|
||||
// build the web context config
|
||||
final NiFiWebConfigurationRequestContext requestContext = getConfigurationRequestContext(
|
||||
requestEntity.getProcessorId(), requestEntity.getRevision(), requestEntity.getClientId());
|
||||
requestEntity.getProcessorId(), requestEntity.getRevision(), requestEntity.getClientId(), requestEntity.isDisconnectedNodeAcknowledged());
|
||||
|
||||
// load the criteria
|
||||
final UpdateAttributeModelFactory factory = new UpdateAttributeModelFactory();
|
||||
@ -553,13 +553,14 @@ public class RuleResource {
|
||||
@PathParam("id") final String ruleId,
|
||||
@QueryParam("processorId") final String processorId,
|
||||
@QueryParam("clientId") final String clientId,
|
||||
@QueryParam("revision") final Long revision) {
|
||||
@QueryParam("revision") final Long revision,
|
||||
@QueryParam("disconnectedNodeAcknowledged") final Boolean isDisconnectionAcknowledged) {
|
||||
|
||||
// get the web context
|
||||
final NiFiWebConfigurationContext configurationContext = (NiFiWebConfigurationContext) servletContext.getAttribute("nifi-web-configuration-context");
|
||||
|
||||
// build the web context config
|
||||
final NiFiWebConfigurationRequestContext requestContext = getConfigurationRequestContext(processorId, revision, clientId);
|
||||
final NiFiWebConfigurationRequestContext requestContext = getConfigurationRequestContext(processorId, revision, clientId, isDisconnectionAcknowledged);
|
||||
|
||||
// load the criteria and get the rule
|
||||
final Criteria criteria = getCriteria(configurationContext, requestContext);
|
||||
@ -630,6 +631,8 @@ public class RuleResource {
|
||||
configurationContext.updateComponent(requestContext, annotationData, null);
|
||||
} catch (final InvalidRevisionException ire) {
|
||||
throw new WebApplicationException(ire, invalidRevision(ire.getMessage()));
|
||||
} catch (final IllegalArgumentException iae) {
|
||||
throw new WebApplicationException(iae, badRequest(iae.getMessage()));
|
||||
} catch (final Exception e) {
|
||||
final String message = String.format("Unable to save UpdateAttribute[id=%s] criteria: %s", requestContext.getId(), e);
|
||||
logger.error(message, e);
|
||||
@ -646,7 +649,7 @@ public class RuleResource {
|
||||
};
|
||||
}
|
||||
|
||||
private NiFiWebConfigurationRequestContext getConfigurationRequestContext(final String processorId, final Long revision, final String clientId) {
|
||||
private NiFiWebConfigurationRequestContext getConfigurationRequestContext(final String processorId, final Long revision, final String clientId, final Boolean isDisconnectionAcknowledged) {
|
||||
return new HttpServletConfigurationRequestContext(UiExtensionType.ProcessorConfiguration, request) {
|
||||
@Override
|
||||
public String getId() {
|
||||
@ -657,6 +660,11 @@ public class RuleResource {
|
||||
public Revision getRevision() {
|
||||
return new Revision(revision, clientId, processorId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isDisconnectionAcknowledged() {
|
||||
return Boolean.TRUE.equals(isDisconnectionAcknowledged);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -16,8 +16,8 @@
|
||||
*/
|
||||
package org.apache.nifi.update.attributes.entity;
|
||||
|
||||
import java.util.List;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -27,6 +27,7 @@ public class EvaluationContextEntity {
|
||||
|
||||
private String clientId;
|
||||
private Long revision;
|
||||
private Boolean disconnectedNodeAcknowledged;
|
||||
private String processorId;
|
||||
private List<String> ruleOrder;
|
||||
private String flowFilePolicy;
|
||||
@ -47,6 +48,14 @@ public class EvaluationContextEntity {
|
||||
this.revision = revision;
|
||||
}
|
||||
|
||||
public Boolean isDisconnectedNodeAcknowledged() {
|
||||
return disconnectedNodeAcknowledged;
|
||||
}
|
||||
|
||||
public void setDisconnectedNodeAcknowledged(Boolean disconnectedNodeAcknowledged) {
|
||||
this.disconnectedNodeAcknowledged = disconnectedNodeAcknowledged;
|
||||
}
|
||||
|
||||
public String getProcessorId() {
|
||||
return processorId;
|
||||
}
|
||||
|
@ -16,9 +16,10 @@
|
||||
*/
|
||||
package org.apache.nifi.update.attributes.entity;
|
||||
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import org.apache.nifi.update.attributes.dto.RuleDTO;
|
||||
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ -28,6 +29,7 @@ public class RuleEntity {
|
||||
private String clientId;
|
||||
private Long revision;
|
||||
private String processorId;
|
||||
private Boolean disconnectedNodeAcknowledged;
|
||||
private RuleDTO rule;
|
||||
|
||||
public String getClientId() {
|
||||
@ -54,6 +56,14 @@ public class RuleEntity {
|
||||
this.processorId = processorId;
|
||||
}
|
||||
|
||||
public Boolean isDisconnectedNodeAcknowledged() {
|
||||
return disconnectedNodeAcknowledged;
|
||||
}
|
||||
|
||||
public void setDisconnectedNodeAcknowledged(Boolean disconnectedNodeAcknowledged) {
|
||||
this.disconnectedNodeAcknowledged = disconnectedNodeAcknowledged;
|
||||
}
|
||||
|
||||
public RuleDTO getRule() {
|
||||
return rule;
|
||||
}
|
||||
|
@ -69,6 +69,7 @@
|
||||
<div id="attribute-updater-client-id" class="hidden"><%= request.getParameter("clientId") == null ? "" : org.apache.nifi.util.EscapeUtils.escapeHtml(request.getParameter("clientId")) %></div>
|
||||
<div id="attribute-updater-revision" class="hidden"><%= request.getParameter("revision") == null ? "" : org.apache.nifi.util.EscapeUtils.escapeHtml(request.getParameter("revision")) %></div>
|
||||
<div id="attribute-updater-editable" class="hidden"><%= request.getParameter("editable") == null ? "" : org.apache.nifi.util.EscapeUtils.escapeHtml(request.getParameter("editable")) %></div>
|
||||
<div id="attribute-updater-disconnected-node-acknowledged" class="hidden"><%= request.getParameter("disconnectedNodeAcknowledged") == null ? "false" : org.apache.nifi.util.EscapeUtils.escapeHtml(request.getParameter("disconnectedNodeAcknowledged")) %></div>
|
||||
<div id="update-attributes-content">
|
||||
<div id="rule-list-panel">
|
||||
<div id="flowfile-policy-container">
|
||||
|
@ -224,6 +224,7 @@ var ua = {
|
||||
processorId: ua.getProcessorId(),
|
||||
revision: ua.getRevision(),
|
||||
clientId: ua.getClientId(),
|
||||
disconnectedNodeAcknowledged: ua.getDisconnectionAcknowledged(),
|
||||
flowFilePolicy: selectedOption.value
|
||||
};
|
||||
|
||||
@ -1028,6 +1029,7 @@ var ua = {
|
||||
processorId: ua.getProcessorId(),
|
||||
revision: ua.getRevision(),
|
||||
clientId: ua.getClientId(),
|
||||
disconnectedNodeAcknowledged: ua.getDisconnectionAcknowledged(),
|
||||
ruleOrder: existingRuleOrder
|
||||
};
|
||||
|
||||
@ -1234,6 +1236,7 @@ var ua = {
|
||||
processorId: ua.getProcessorId(),
|
||||
revision: ua.getRevision(),
|
||||
clientId: ua.getClientId(),
|
||||
disconnectedNodeAcknowledged: ua.getDisconnectionAcknowledged(),
|
||||
verbose: true
|
||||
})
|
||||
}).then(function () {
|
||||
@ -1311,6 +1314,7 @@ var ua = {
|
||||
processorId: ua.getProcessorId(),
|
||||
clientId: ua.getClientId(),
|
||||
revision: ua.getRevision(),
|
||||
disconnectedNodeAcknowledged: ua.getDisconnectionAcknowledged(),
|
||||
rule: rule
|
||||
};
|
||||
|
||||
@ -1987,6 +1991,15 @@ var ua = {
|
||||
getRevision: function () {
|
||||
return $('#attribute-updater-revision').text();
|
||||
},
|
||||
|
||||
/**
|
||||
* Gets whether the disconnected node is acknowledged.
|
||||
*
|
||||
* @returns
|
||||
*/
|
||||
getDisconnectionAcknowledged: function () {
|
||||
return $('#attribute-updater-disconnected-node-acknowledged').text();
|
||||
},
|
||||
|
||||
/**
|
||||
* Gets the processor id.
|
||||
|
Loading…
x
Reference in New Issue
Block a user