You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by jp...@apache.org on 2016/08/12 21:41:29 UTC
[6/8] nifi git commit: NIFI-1876: - Introducing entities for
allowable values and process group status.
NIFI-1876: - Introducing entities for allowable values and process group status.
Signed-off-by: Jeff Storck <jt...@gmail.com>
Signed-off-by: jpercivall <jo...@yahoo.com>
Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/e81147c9
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/e81147c9
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/e81147c9
Branch: refs/heads/master
Commit: e81147c92ab9757698e59bdfb0e6f6403df7f3a5
Parents: 572dfed
Author: Matt Gilman <ma...@gmail.com>
Authored: Tue Aug 9 15:35:10 2016 -0400
Committer: jpercivall <jo...@yahoo.com>
Committed: Fri Aug 12 17:22:26 2016 -0400
----------------------------------------------------------------------
.../status/ProcessGroupStatusSnapshotDTO.java | 40 ++++++++++----------
.../nifi/web/StandardNiFiServiceFacade.java | 6 ++-
.../StandardNiFiWebConfigurationContext.java | 12 +++---
.../org/apache/nifi/web/api/dto/DtoFactory.java | 13 ++++---
.../apache/nifi/web/api/dto/EntityFactory.java | 8 ++++
.../propertytable/jquery.propertytable.js | 12 ++++--
.../main/webapp/js/nf/canvas/nf-connection.js | 22 -----------
.../src/main/webapp/js/nf/canvas/nf-graph.js | 19 ----------
.../src/main/webapp/js/nf/canvas/nf-port.js | 22 -----------
.../webapp/js/nf/canvas/nf-process-group.js | 22 -----------
.../main/webapp/js/nf/canvas/nf-processor.js | 22 -----------
.../js/nf/canvas/nf-remote-process-group.js | 22 -----------
.../webapp/js/nf/summary/nf-summary-table.js | 24 ++++++------
13 files changed, 67 insertions(+), 177 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/nifi/blob/e81147c9/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/ProcessGroupStatusSnapshotDTO.java
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/ProcessGroupStatusSnapshotDTO.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/ProcessGroupStatusSnapshotDTO.java
index 0477480..0050bd4 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/ProcessGroupStatusSnapshotDTO.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/status/ProcessGroupStatusSnapshotDTO.java
@@ -36,12 +36,12 @@ public class ProcessGroupStatusSnapshotDTO implements Cloneable {
private String id;
private String name;
- private Collection<ConnectionStatusSnapshotEntity> connectionStatus;
- private Collection<ProcessorStatusSnapshotEntity> processorStatus;
- private Collection<ProcessGroupStatusSnapshotEntity> processGroupStatus;
- private Collection<RemoteProcessGroupStatusSnapshotEntity> remoteProcessGroupStatus;
- private Collection<PortStatusSnapshotEntity> inputPortStatus;
- private Collection<PortStatusSnapshotEntity> outputPortStatus;
+ private Collection<ConnectionStatusSnapshotEntity> connectionStatusSnapshots;
+ private Collection<ProcessorStatusSnapshotEntity> processorStatusSnapshots;
+ private Collection<ProcessGroupStatusSnapshotEntity> processGroupStatusSnapshots;
+ private Collection<RemoteProcessGroupStatusSnapshotEntity> remoteProcessGroupStatusSnapshots;
+ private Collection<PortStatusSnapshotEntity> inputPortStatusSnapshots;
+ private Collection<PortStatusSnapshotEntity> outputPortStatusSnapshots;
private Integer flowFilesIn = 0;
private Long bytesIn = 0L;
@@ -121,11 +121,11 @@ public class ProcessGroupStatusSnapshotDTO implements Cloneable {
*/
@ApiModelProperty("The status of all conenctions in the process group.")
public Collection<ConnectionStatusSnapshotEntity> getConnectionStatusSnapshots() {
- return connectionStatus;
+ return connectionStatusSnapshots;
}
public void setConnectionStatusSnapshots(Collection<ConnectionStatusSnapshotEntity> connectionStatus) {
- this.connectionStatus = connectionStatus;
+ this.connectionStatusSnapshots = connectionStatus;
}
/**
@@ -135,11 +135,11 @@ public class ProcessGroupStatusSnapshotDTO implements Cloneable {
*/
@ApiModelProperty("The status of all process groups in the process group.")
public Collection<ProcessGroupStatusSnapshotEntity> getProcessGroupStatusSnapshots() {
- return processGroupStatus;
+ return processGroupStatusSnapshots;
}
public void setProcessGroupStatusSnapshots(Collection<ProcessGroupStatusSnapshotEntity> processGroupStatus) {
- this.processGroupStatus = processGroupStatus;
+ this.processGroupStatusSnapshots = processGroupStatus;
}
/**
@@ -149,11 +149,11 @@ public class ProcessGroupStatusSnapshotDTO implements Cloneable {
*/
@ApiModelProperty("The status of all remote process groups in the process group.")
public Collection<RemoteProcessGroupStatusSnapshotEntity> getRemoteProcessGroupStatusSnapshots() {
- return remoteProcessGroupStatus;
+ return remoteProcessGroupStatusSnapshots;
}
public void setRemoteProcessGroupStatusSnapshots(final Collection<RemoteProcessGroupStatusSnapshotEntity> remoteProcessGroupStatus) {
- this.remoteProcessGroupStatus = remoteProcessGroupStatus;
+ this.remoteProcessGroupStatusSnapshots = remoteProcessGroupStatus;
}
/**
@@ -163,11 +163,11 @@ public class ProcessGroupStatusSnapshotDTO implements Cloneable {
*/
@ApiModelProperty("The status of all processors in the process group.")
public Collection<ProcessorStatusSnapshotEntity> getProcessorStatusSnapshots() {
- return processorStatus;
+ return processorStatusSnapshots;
}
public void setProcessorStatusSnapshots(Collection<ProcessorStatusSnapshotEntity> processorStatus) {
- this.processorStatus = processorStatus;
+ this.processorStatusSnapshots = processorStatus;
}
/**
@@ -177,11 +177,11 @@ public class ProcessGroupStatusSnapshotDTO implements Cloneable {
*/
@ApiModelProperty("The status of all input ports in the process group.")
public Collection<PortStatusSnapshotEntity> getInputPortStatusSnapshots() {
- return inputPortStatus;
+ return inputPortStatusSnapshots;
}
public void setInputPortStatusSnapshots(Collection<PortStatusSnapshotEntity> inputPortStatus) {
- this.inputPortStatus = inputPortStatus;
+ this.inputPortStatusSnapshots = inputPortStatus;
}
/**
@@ -191,11 +191,11 @@ public class ProcessGroupStatusSnapshotDTO implements Cloneable {
*/
@ApiModelProperty("The status of all output ports in the process group.")
public Collection<PortStatusSnapshotEntity> getOutputPortStatusSnapshots() {
- return outputPortStatus;
+ return outputPortStatusSnapshots;
}
public void setOutputPortStatusSnapshots(Collection<PortStatusSnapshotEntity> outputPortStatus) {
- this.outputPortStatus = outputPortStatus;
+ this.outputPortStatusSnapshots = outputPortStatus;
}
/**
@@ -516,9 +516,9 @@ public class ProcessGroupStatusSnapshotDTO implements Cloneable {
other.setInputPortStatusSnapshots(copy(getInputPortStatusSnapshots()));
other.setOutputPortStatusSnapshots(copy(getOutputPortStatusSnapshots()));
- if (processGroupStatus != null) {
+ if (processGroupStatusSnapshots != null) {
final List<ProcessGroupStatusSnapshotEntity> childGroups = new ArrayList<>();
- for (final ProcessGroupStatusSnapshotEntity procGroupStatus : processGroupStatus) {
+ for (final ProcessGroupStatusSnapshotEntity procGroupStatus : processGroupStatusSnapshots) {
childGroups.add(procGroupStatus.clone());
}
other.setProcessGroupStatusSnapshots(childGroups);
http://git-wip-us.apache.org/repos/asf/nifi/blob/e81147c9/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiServiceFacade.java
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiServiceFacade.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiServiceFacade.java
index f5cb078..a1b662c 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiServiceFacade.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiServiceFacade.java
@@ -166,6 +166,7 @@ import org.apache.nifi.web.api.entity.PortStatusEntity;
import org.apache.nifi.web.api.entity.ProcessGroupEntity;
import org.apache.nifi.web.api.entity.ProcessGroupFlowEntity;
import org.apache.nifi.web.api.entity.ProcessGroupStatusEntity;
+import org.apache.nifi.web.api.entity.ProcessGroupStatusSnapshotEntity;
import org.apache.nifi.web.api.entity.ProcessorEntity;
import org.apache.nifi.web.api.entity.ProcessorStatusEntity;
import org.apache.nifi.web.api.entity.RemoteProcessGroupEntity;
@@ -2026,7 +2027,7 @@ public class StandardNiFiServiceFacade implements NiFiServiceFacade {
public ProcessGroupStatusEntity getProcessGroupStatus(final String groupId, final boolean recursive) {
final ProcessGroup processGroup = processGroupDAO.getProcessGroup(groupId);
final PermissionsDTO permissions = dtoFactory.createPermissionsDto(processGroup);
- final ProcessGroupStatusDTO dto = dtoFactory.createProcessGroupStatusDto(controllerFacade.getProcessGroupStatus(groupId));
+ final ProcessGroupStatusDTO dto = dtoFactory.createProcessGroupStatusDto(processGroup, controllerFacade.getProcessGroupStatus(groupId));
// prune the response as necessary
if (!recursive) {
@@ -2042,7 +2043,8 @@ public class StandardNiFiServiceFacade implements NiFiServiceFacade {
}
private void pruneChildGroups(final ProcessGroupStatusSnapshotDTO snapshot) {
- for (final ProcessGroupStatusSnapshotDTO childProcessGroupStatus : snapshot.getProcessGroupStatusSnapshots()) {
+ for (final ProcessGroupStatusSnapshotEntity childProcessGroupStatusEntity : snapshot.getProcessGroupStatusSnapshots()) {
+ final ProcessGroupStatusSnapshotDTO childProcessGroupStatus = childProcessGroupStatusEntity.getProcessGroupStatusSnapshot();
childProcessGroupStatus.setConnectionStatusSnapshots(null);
childProcessGroupStatus.setProcessGroupStatusSnapshots(null);
childProcessGroupStatus.setInputPortStatusSnapshots(null);
http://git-wip-us.apache.org/repos/asf/nifi/blob/e81147c9/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiWebConfigurationContext.java
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiWebConfigurationContext.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiWebConfigurationContext.java
index 73d4a0f..6a931f9 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiWebConfigurationContext.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiWebConfigurationContext.java
@@ -44,8 +44,8 @@ import org.apache.nifi.cluster.manager.exception.NoClusterCoordinatorException;
import org.apache.nifi.cluster.protocol.NodeIdentifier;
import org.apache.nifi.controller.ControllerService;
import org.apache.nifi.controller.reporting.ReportingTaskProvider;
-import org.apache.nifi.registry.VariableRegistry;
import org.apache.nifi.controller.service.ControllerServiceProvider;
+import org.apache.nifi.registry.VariableRegistry;
import org.apache.nifi.util.NiFiProperties;
import org.apache.nifi.web.api.dto.AllowableValueDTO;
import org.apache.nifi.web.api.dto.ControllerServiceDTO;
@@ -54,6 +54,7 @@ import org.apache.nifi.web.api.dto.ProcessorDTO;
import org.apache.nifi.web.api.dto.PropertyDescriptorDTO;
import org.apache.nifi.web.api.dto.ReportingTaskDTO;
import org.apache.nifi.web.api.dto.RevisionDTO;
+import org.apache.nifi.web.api.entity.AllowableValueEntity;
import org.apache.nifi.web.api.entity.ControllerServiceEntity;
import org.apache.nifi.web.api.entity.ProcessorEntity;
import org.apache.nifi.web.api.entity.ReportingTaskEntity;
@@ -477,12 +478,13 @@ public class StandardNiFiWebConfigurationContext implements NiFiWebConfiguration
for(String key : processorConfig.getDescriptors().keySet()){
PropertyDescriptorDTO descriptor = processorConfig.getDescriptors().get(key);
- List<AllowableValueDTO> allowableValuesDTO = descriptor.getAllowableValues();
+ List<AllowableValueEntity> allowableValuesEntity = descriptor.getAllowableValues();
Map<String,String> allowableValues = new HashMap<>();
- if(allowableValuesDTO != null) {
- for (AllowableValueDTO value : allowableValuesDTO) {
- allowableValues.put(value.getValue(), value.getDisplayName());
+ if(allowableValuesEntity != null) {
+ for (AllowableValueEntity allowableValueEntity : allowableValuesEntity) {
+ final AllowableValueDTO allowableValueDTO = allowableValueEntity.getAllowableValue();
+ allowableValues.put(allowableValueDTO.getValue(), allowableValueDTO.getDisplayName());
}
}
http://git-wip-us.apache.org/repos/asf/nifi/blob/e81147c9/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/dto/DtoFactory.java
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/dto/DtoFactory.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/dto/DtoFactory.java
index 119e477..46cf87c 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/dto/DtoFactory.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/dto/DtoFactory.java
@@ -140,6 +140,7 @@ import org.apache.nifi.web.api.dto.status.ProcessorStatusSnapshotDTO;
import org.apache.nifi.web.api.dto.status.RemoteProcessGroupStatusDTO;
import org.apache.nifi.web.api.dto.status.RemoteProcessGroupStatusSnapshotDTO;
import org.apache.nifi.web.api.entity.AccessPolicySummaryEntity;
+import org.apache.nifi.web.api.entity.AllowableValueEntity;
import org.apache.nifi.web.api.entity.ConnectionStatusSnapshotEntity;
import org.apache.nifi.web.api.entity.FlowBreadcrumbEntity;
import org.apache.nifi.web.api.entity.PortStatusSnapshotEntity;
@@ -2500,27 +2501,29 @@ public final class DtoFactory {
if (serviceDefinition == null) {
dto.setAllowableValues(null);
} else {
- final List<AllowableValueDTO> allowableValues = new ArrayList<>();
+ final List<AllowableValueEntity> allowableValues = new ArrayList<>();
for (final String serviceIdentifier : controllerServiceProvider.getControllerServiceIdentifiers(serviceDefinition, groupId)) {
final ControllerServiceNode service = controllerServiceProvider.getControllerServiceNode(serviceIdentifier);
- final String displayName = service.isAuthorized(authorizer, RequestAction.READ, NiFiUserUtils.getNiFiUser()) ? service.getName() : serviceIdentifier;
+ final boolean isServiceAuthorized = service.isAuthorized(authorizer, RequestAction.READ, NiFiUserUtils.getNiFiUser());
+ final String displayName = isServiceAuthorized ? service.getName() : serviceIdentifier;
final AllowableValueDTO allowableValue = new AllowableValueDTO();
allowableValue.setDisplayName(displayName);
allowableValue.setValue(serviceIdentifier);
- allowableValues.add(allowableValue);
+ allowableValues.add(entityFactory.createAllowableValueEntity(allowableValue, isServiceAuthorized));
}
dto.setAllowableValues(allowableValues);
}
} else {
- final List<AllowableValueDTO> allowableValues = new ArrayList<>();
+ final List<AllowableValueEntity> allowableValues = new ArrayList<>();
for (final AllowableValue allowableValue : propertyDescriptor.getAllowableValues()) {
final AllowableValueDTO allowableValueDto = new AllowableValueDTO();
allowableValueDto.setDisplayName(allowableValue.getDisplayName());
allowableValueDto.setValue(allowableValue.getValue());
allowableValueDto.setDescription(allowableValue.getDescription());
- allowableValues.add(allowableValueDto);
+ allowableValues.add(entityFactory.createAllowableValueEntity(allowableValueDto, true));
}
+
dto.setAllowableValues(allowableValues);
}
http://git-wip-us.apache.org/repos/asf/nifi/blob/e81147c9/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/dto/EntityFactory.java
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/dto/EntityFactory.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/dto/EntityFactory.java
index 00e239c..3e4e79a 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/dto/EntityFactory.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/dto/EntityFactory.java
@@ -31,6 +31,7 @@ import org.apache.nifi.web.api.dto.status.RemoteProcessGroupStatusSnapshotDTO;
import org.apache.nifi.web.api.dto.status.StatusHistoryDTO;
import org.apache.nifi.web.api.entity.AccessPolicyEntity;
import org.apache.nifi.web.api.entity.AccessPolicySummaryEntity;
+import org.apache.nifi.web.api.entity.AllowableValueEntity;
import org.apache.nifi.web.api.entity.ConnectionEntity;
import org.apache.nifi.web.api.entity.ConnectionStatusEntity;
import org.apache.nifi.web.api.entity.ConnectionStatusSnapshotEntity;
@@ -511,4 +512,11 @@ public final class EntityFactory {
}
return entity;
}
+
+ public AllowableValueEntity createAllowableValueEntity(final AllowableValueDTO dto, final boolean canRead) {
+ final AllowableValueEntity entity = new AllowableValueEntity();
+ entity.setCanRead(canRead);
+ entity.setAllowableValue(dto);
+ return entity;
+ }
}
http://git-wip-us.apache.org/repos/asf/nifi/blob/e81147c9/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js
index 90d62c4..67d7efc 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js
@@ -525,7 +525,8 @@
});
}
if ($.isArray(allowableValues)) {
- $.each(allowableValues, function (i, allowableValue) {
+ $.each(allowableValues, function (i, allowableValueEntity) {
+ var allowableValue = allowableValueEntity.allowableValue;
options.push({
text: allowableValue.displayName,
value: allowableValue.value,
@@ -735,7 +736,8 @@
// create the read only options
var options = [];
- $.each(allowableValues, function (i, allowableValue) {
+ $.each(allowableValues, function (i, allowableValueEntity) {
+ var allowableValue = allowableValueEntity.allowableValue;
options.push({
text: allowableValue.displayName,
value: allowableValue.value,
@@ -1081,7 +1083,8 @@
// if there are allowable values, attempt to swap out for the display name
var allowableValues = nf.Common.getAllowableValues(propertyDescriptor);
if ($.isArray(allowableValues)) {
- $.each(allowableValues, function (_, allowableValue) {
+ $.each(allowableValues, function (_, allowableValueEntity) {
+ var allowableValue = allowableValueEntity.allowableValue;
if (value === allowableValue.value) {
value = allowableValue.displayName;
return false;
@@ -1147,7 +1150,8 @@
// check to see if we should provide a button for going to a controller service
if (identifiesControllerService && isConfigured && isOnCanvas) {
// ensure the configured value is referencing a valid service
- $.each(propertyDescriptor.allowableValues, function (_, allowableValue) {
+ $.each(propertyDescriptor.allowableValues, function (_, allowableValueEntity) {
+ var allowableValue = allowableValueEntity.allowableValue;
if (allowableValue.value === dataContext.value) {
markup += '<div class="pointer go-to-service fa fa-long-arrow-right" title="Go To" style="margin-top: 2px" ></div>';
return false;
http://git-wip-us.apache.org/repos/asf/nifi/blob/e81147c9/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection.js
index 85f3696..4eb4e87 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection.js
@@ -1620,28 +1620,6 @@ nf.Connection = (function () {
},
/**
- * Sets the connection status using the specified status.
- *
- * @param {array} connectionStatus
- */
- setStatus: function (connectionStatus) {
- if (nf.Common.isEmpty(connectionStatus)) {
- return;
- }
-
- // update the connection status
- $.each(connectionStatus, function (_, status) {
- if (connectionMap.has(status.id)) {
- var connection = connectionMap.get(status.id);
- connection.status = status;
- }
- });
-
- // update the visible connections
- d3.selectAll('g.connection.visible').call(updateConnectionStatus);
- },
-
- /**
* Refreshes the connection in the UI.
*
* @param {string} connectionId
http://git-wip-us.apache.org/repos/asf/nifi/blob/e81147c9/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-graph.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-graph.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-graph.js
index 80e7e84..006def4 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-graph.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-graph.js
@@ -145,25 +145,6 @@ nf.Graph = (function () {
},
/**
- * Populates the status for the components specified. This will update the content
- * of the existing components on the graph and will not cause them to be repainted.
- * This operation must be very inexpensive due to the frequency it is called.
- *
- * @argument {object} aggregateSnapshot The status of the process group aggregated accross the cluster
- */
- setStatus: function (aggregateSnapshot) {
- // merge the port status together
- var portStatus = combinePortStatus(aggregateSnapshot);
-
- // set the component status
- nf.Port.setStatus(portStatus);
- nf.RemoteProcessGroup.setStatus(aggregateSnapshot.remoteProcessGroupStatusSnapshots);
- nf.ProcessGroup.setStatus(aggregateSnapshot.processGroupStatusSnapshots);
- nf.Processor.setStatus(aggregateSnapshot.processorStatusSnapshots);
- nf.Connection.setStatus(aggregateSnapshot.connectionStatusSnapshots);
- },
-
- /**
* Clears all the components currently on the canvas. This function does not automatically refresh.
*/
removeAll: function () {
http://git-wip-us.apache.org/repos/asf/nifi/blob/e81147c9/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port.js
index b09efce..5cfb0b3 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port.js
@@ -631,28 +631,6 @@ nf.Port = (function () {
},
/**
- * Sets the port status using the specified status.
- *
- * @param {array} portStatus Port status
- */
- setStatus: function (portStatus) {
- if (nf.Common.isEmpty(portStatus)) {
- return;
- }
-
- // update the specified port status
- $.each(portStatus, function (_, status) {
- if (portMap.has(status.id)) {
- var port = portMap.get(status.id);
- port.status = status;
- }
- });
-
- // update the visible ports
- d3.selectAll('g.input-port.visible, g.output-port.visible').call(updatePortStatus);
- },
-
- /**
* Removes the specified port.
*
* @param {string} ports The port id(s)
http://git-wip-us.apache.org/repos/asf/nifi/blob/e81147c9/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group.js
index ac0f89e..69dc1a6 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group.js
@@ -1109,28 +1109,6 @@ nf.ProcessGroup = (function () {
},
/**
- * Sets the process group status using the specified status.
- *
- * @param {array} processGroupStatus Process group status
- */
- setStatus: function (processGroupStatus) {
- if (nf.Common.isEmpty(processGroupStatus)) {
- return;
- }
-
- // update the specified process group status
- $.each(processGroupStatus, function (_, status) {
- if (processGroupMap.has(status.id)) {
- var processGroup = processGroupMap.get(status.id);
- processGroup.status = status;
- }
- });
-
- // update the visible process groups
- d3.selectAll('g.process-group.visible').call(updateProcessGroupStatus);
- },
-
- /**
* Removes the specified process group.
*
* @param {string} processGroups The process group id(s)
http://git-wip-us.apache.org/repos/asf/nifi/blob/e81147c9/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor.js
index 169318c..7e3e0d4 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor.js
@@ -900,28 +900,6 @@ nf.Processor = (function () {
},
/**
- * Sets the processor status using the specified status.
- *
- * @param {array} processorStatus Processor status
- */
- setStatus: function (processorStatus) {
- if (nf.Common.isEmpty(processorStatus)) {
- return;
- }
-
- // update the specified processor status
- $.each(processorStatus, function (_, status) {
- if (processorMap.has(status.id)) {
- var processor = processorMap.get(status.id);
- processor.status = status;
- }
- });
-
- // update the visible processor status
- d3.selectAll('g.processor.visible').call(updateProcessorStatus);
- },
-
- /**
* Returns the default color that should be used when drawing a processor.
*/
defaultColor: function () {
http://git-wip-us.apache.org/repos/asf/nifi/blob/e81147c9/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group.js
index 7983bbb..8e5c6ce 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group.js
@@ -963,28 +963,6 @@ nf.RemoteProcessGroup = (function () {
},
/**
- * Sets the remote process group status using the specified status.
- *
- * @param {array | object} remoteProcessGroupStatus Remote process group status
- */
- setStatus: function (remoteProcessGroupStatus) {
- if (nf.Common.isEmpty(remoteProcessGroupStatus)) {
- return;
- }
-
- // update the specified process group status
- $.each(remoteProcessGroupStatus, function (_, status) {
- if (remoteProcessGroupMap.has(status.id)) {
- var entry = remoteProcessGroupMap.get(status.id);
- entry.status = status;
- }
- });
-
- // only update the visible components
- d3.selectAll('g.remote-process-group.visible').call(updateProcessGroupStatus);
- },
-
- /**
* Removes the specified process group.
*
* @param {array|string} remoteProcessGroups The remote process group id(s)
http://git-wip-us.apache.org/repos/asf/nifi/blob/e81147c9/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/summary/nf-summary-table.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/summary/nf-summary-table.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/summary/nf-summary-table.js
index 2dc31c2..a43390a 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/summary/nf-summary-table.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/summary/nf-summary-table.js
@@ -2304,36 +2304,36 @@ nf.SummaryTable = (function () {
*/
var populateProcessGroupStatus = function (processorItems, connectionItems, processGroupItems, inputPortItems, outputPortItems, remoteProcessGroupItems, aggregateSnapshot) {
// add the processors to the summary grid
- $.each(aggregateSnapshot.processorStatusSnapshots, function (i, procStatus) {
- processorItems.push(procStatus);
+ $.each(aggregateSnapshot.processorStatusSnapshots, function (i, procStatusEntity) {
+ processorItems.push(procStatusEntity.processorStatusSnapshot);
});
// add the processors to the summary grid
- $.each(aggregateSnapshot.connectionStatusSnapshots, function (i, connStatus) {
- connectionItems.push(connStatus);
+ $.each(aggregateSnapshot.connectionStatusSnapshots, function (i, connStatusEntity) {
+ connectionItems.push(connStatusEntity.connectionStatusSnapshot);
});
// add the input ports to the summary grid
- $.each(aggregateSnapshot.inputPortStatusSnapshots, function (i, portStatus) {
- inputPortItems.push(portStatus);
+ $.each(aggregateSnapshot.inputPortStatusSnapshots, function (i, portStatusEntity) {
+ inputPortItems.push(portStatusEntity.portStatusSnapshot);
});
// add the input ports to the summary grid
- $.each(aggregateSnapshot.outputPortStatusSnapshots, function (i, portStatus) {
- outputPortItems.push(portStatus);
+ $.each(aggregateSnapshot.outputPortStatusSnapshots, function (i, portStatusEntity) {
+ outputPortItems.push(portStatusEntity.portStatusSnapshot);
});
// add the input ports to the summary grid
- $.each(aggregateSnapshot.remoteProcessGroupStatusSnapshots, function (i, rpgStatus) {
- remoteProcessGroupItems.push(rpgStatus);
+ $.each(aggregateSnapshot.remoteProcessGroupStatusSnapshots, function (i, rpgStatusEntity) {
+ remoteProcessGroupItems.push(rpgStatusEntity.remoteProcessGroupStatusSnapshot);
});
// add the process group status as well
processGroupItems.push(aggregateSnapshot);
// add any child group's status
- $.each(aggregateSnapshot.processGroupStatusSnapshots, function (i, childProcessGroup) {
- populateProcessGroupStatus(processorItems, connectionItems, processGroupItems, inputPortItems, outputPortItems, remoteProcessGroupItems, childProcessGroup);
+ $.each(aggregateSnapshot.processGroupStatusSnapshots, function (i, childProcessGroupEntity) {
+ populateProcessGroupStatus(processorItems, connectionItems, processGroupItems, inputPortItems, outputPortItems, remoteProcessGroupItems, childProcessGroupEntity.processGroupStatusSnapshot);
});
};