From e81147c92ab9757698e59bdfb0e6f6403df7f3a5 Mon Sep 17 00:00:00 2001 From: Matt Gilman Date: Tue, 9 Aug 2016 15:35:10 -0400 Subject: [PATCH] NIFI-1876: - Introducing entities for allowable values and process group status. Signed-off-by: Jeff Storck Signed-off-by: jpercivall --- .../status/ProcessGroupStatusSnapshotDTO.java | 40 +++++++++---------- .../nifi/web/StandardNiFiServiceFacade.java | 6 ++- .../StandardNiFiWebConfigurationContext.java | 12 +++--- .../apache/nifi/web/api/dto/DtoFactory.java | 13 +++--- .../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(-) 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 047748038f..0050bd4583 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 connectionStatus; - private Collection processorStatus; - private Collection processGroupStatus; - private Collection remoteProcessGroupStatus; - private Collection inputPortStatus; - private Collection outputPortStatus; + private Collection connectionStatusSnapshots; + private Collection processorStatusSnapshots; + private Collection processGroupStatusSnapshots; + private Collection remoteProcessGroupStatusSnapshots; + private Collection inputPortStatusSnapshots; + private Collection 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 getConnectionStatusSnapshots() { - return connectionStatus; + return connectionStatusSnapshots; } public void setConnectionStatusSnapshots(Collection 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 getProcessGroupStatusSnapshots() { - return processGroupStatus; + return processGroupStatusSnapshots; } public void setProcessGroupStatusSnapshots(Collection 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 getRemoteProcessGroupStatusSnapshots() { - return remoteProcessGroupStatus; + return remoteProcessGroupStatusSnapshots; } public void setRemoteProcessGroupStatusSnapshots(final Collection 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 getProcessorStatusSnapshots() { - return processorStatus; + return processorStatusSnapshots; } public void setProcessorStatusSnapshots(Collection 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 getInputPortStatusSnapshots() { - return inputPortStatus; + return inputPortStatusSnapshots; } public void setInputPortStatusSnapshots(Collection 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 getOutputPortStatusSnapshots() { - return outputPortStatus; + return outputPortStatusSnapshots; } public void setOutputPortStatusSnapshots(Collection 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 childGroups = new ArrayList<>(); - for (final ProcessGroupStatusSnapshotEntity procGroupStatus : processGroupStatus) { + for (final ProcessGroupStatusSnapshotEntity procGroupStatus : processGroupStatusSnapshots) { childGroups.add(procGroupStatus.clone()); } other.setProcessGroupStatusSnapshots(childGroups); 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 f5cb078c8e..a1b662cfcd 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); 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 73d4a0f3ca..6a931f9cf6 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 allowableValuesDTO = descriptor.getAllowableValues(); + List allowableValuesEntity = descriptor.getAllowableValues(); Map 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()); } } 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 119e4777ea..46cf87cbb8 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 allowableValues = new ArrayList<>(); + final List 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 allowableValues = new ArrayList<>(); + final List 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); } 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 00e239c238..3e4e79aafa 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; + } } 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 90d62c4678..67d7efc4e9 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 += '
'; return false; 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 85f3696d0f..4eb4e878f1 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 @@ -1619,28 +1619,6 @@ nf.Connection = (function () { d3.selectAll('g.connection').call(sort); }, - /** - * 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. * 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 80e7e84d6e..006def484e 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 @@ -144,25 +144,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. */ 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 b09efce494..5cfb0b3e36 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 @@ -630,28 +630,6 @@ nf.Port = (function () { d3.select('#id-' + id).call(nf.CanvasUtils.position); }, - /** - * 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. * 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 ac0f89e1c5..69dc1a604c 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 @@ -1108,28 +1108,6 @@ nf.ProcessGroup = (function () { d3.select('#id-' + id).call(nf.CanvasUtils.position); }, - /** - * 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. * 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 169318c996..7e3e0d48c9 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 @@ -899,28 +899,6 @@ nf.Processor = (function () { nf.Processor.remove(processorMap.keys()); }, - /** - * 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. */ 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 7983bbb185..8e5c6cef88 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 @@ -962,28 +962,6 @@ nf.RemoteProcessGroup = (function () { d3.select('#id-' + id).call(nf.CanvasUtils.position); }, - /** - * 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. * 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 2dc31c2be2..a43390ac4e 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); }); };