You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by mc...@apache.org on 2022/02/03 20:53:39 UTC
[nifi] branch main updated: NIFI-9628: Added a uiOnly flag when requesting Controller Service det… (#5712)
This is an automated email from the ASF dual-hosted git repository.
mcgilman pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git
The following commit(s) were added to refs/heads/main by this push:
new 230ed9c NIFI-9628: Added a uiOnly flag when requesting Controller Service det… (#5712)
230ed9c is described below
commit 230ed9c98d5b704ab0803d14441531948b0915da
Author: markap14 <ma...@hotmail.com>
AuthorDate: Thu Feb 3 15:53:23 2022 -0500
NIFI-9628: Added a uiOnly flag when requesting Controller Service det… (#5712)
* NIFI-9628: Added a uiOnly flag when requesting Controller Service details and the list of Controller Services. This allows us to return much less data when retrieving these resources.
* NIFI-9628: Addressed review feedback; added uiOnly flag for controller service run-status and references also
* NIFI-9628: Fixed checkstyle issues by removing unused imports
This closes #5712
---
.../entity/ControllerServiceRunStatusEntity.java | 15 ++++++++-
...ateControllerServiceReferenceRequestEntity.java | 13 ++++++++
.../manager/ControllerServiceEntityMerger.java | 17 +++++++---
.../apache/nifi/web/api/ApplicationResource.java | 33 ++++++++++++++++++++
.../nifi/web/api/ControllerServiceResource.java | 19 ++++++++++--
.../java/org/apache/nifi/web/api/FlowResource.java | 23 ++++++++++----
.../org/apache/nifi/web/util/SnippetUtils.java | 3 --
.../jquery/propertytable/jquery.propertytable.js | 5 ++-
.../webapp/js/nf/canvas/nf-controller-service.js | 36 ++++++++++++++++------
.../webapp/js/nf/canvas/nf-controller-services.js | 5 ++-
.../js/nf/canvas/nf-process-group-configuration.js | 10 ++++--
11 files changed, 149 insertions(+), 30 deletions(-)
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/ControllerServiceRunStatusEntity.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/ControllerServiceRunStatusEntity.java
index 7970147..28e204a 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/ControllerServiceRunStatusEntity.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/ControllerServiceRunStatusEntity.java
@@ -26,7 +26,8 @@ import javax.xml.bind.annotation.XmlType;
@XmlType(name = "controllerServiceRunStatus")
public class ControllerServiceRunStatusEntity extends ComponentRunStatusEntity {
- private static String[] SUPPORTED_STATE = {"ENABLED", "DISABLED"};
+ private static final String[] SUPPORTED_STATE = {"ENABLED", "DISABLED"};
+ private boolean uiOnly;
@Override
protected String[] getSupportedState() {
@@ -45,4 +46,16 @@ public class ControllerServiceRunStatusEntity extends ComponentRunStatusEntity {
return super.getState();
}
+ @ApiModelProperty(
+ value = "Indicates whether or not responses should only include fields necessary for rendering the NiFi User Interface. As such, when this value is set to true, some fields may be " +
+ "returned as null values, and the selected fields may change at any time without notice. As a result, this value should not be set to true by any client other than the UI."
+ )
+ public Boolean getUiOnly() {
+ return uiOnly;
+ }
+
+ public void setUiOnly(final Boolean uiOnly) {
+ this.uiOnly = uiOnly;
+ }
+
}
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/UpdateControllerServiceReferenceRequestEntity.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/UpdateControllerServiceReferenceRequestEntity.java
index c5f87a1..071dc7b 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/UpdateControllerServiceReferenceRequestEntity.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/UpdateControllerServiceReferenceRequestEntity.java
@@ -32,6 +32,7 @@ public class UpdateControllerServiceReferenceRequestEntity extends Entity {
private String state;
private Map<String, RevisionDTO> referencingComponentRevisions;
private Boolean disconnectedNodeAcknowledged;
+ private Boolean uiOnly;
@ApiModelProperty(
value = "The identifier of the Controller Service."
@@ -77,4 +78,16 @@ public class UpdateControllerServiceReferenceRequestEntity extends Entity {
public void setDisconnectedNodeAcknowledged(Boolean disconnectedNodeAcknowledged) {
this.disconnectedNodeAcknowledged = disconnectedNodeAcknowledged;
}
+
+ @ApiModelProperty(
+ value = "Indicates whether or not the response should only include fields necessary for rendering the NiFi User Interface. As such, when this value is set to true, some fields may be " +
+ "returned as null values, and the selected fields may change at any time without notice. As a result, this value should not be set to true by any client other than the UI."
+ )
+ public Boolean getUiOnly() {
+ return uiOnly;
+ }
+
+ public void setUiOnly(final Boolean uiOnly) {
+ this.uiOnly = uiOnly;
+ }
}
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/main/java/org/apache/nifi/cluster/manager/ControllerServiceEntityMerger.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/main/java/org/apache/nifi/cluster/manager/ControllerServiceEntityMerger.java
index 41ee4d4..86d39ab 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/main/java/org/apache/nifi/cluster/manager/ControllerServiceEntityMerger.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/main/java/org/apache/nifi/cluster/manager/ControllerServiceEntityMerger.java
@@ -231,9 +231,13 @@ public class ControllerServiceEntityMerger implements ComponentEntityMerger<Cont
for (Map.Entry<NodeIdentifier, ControllerServiceReferencingComponentEntity> entry : nodeEntities.entrySet()) {
final NodeIdentifier nodeIdentifier = entry.getKey();
final ControllerServiceReferencingComponentEntity nodeEntity = entry.getValue();
- nodeEntity.getComponent().getDescriptors().values().forEach(propertyDescriptor -> {
- propertyDescriptorMap.computeIfAbsent(propertyDescriptor.getName(), nodeIdToPropertyDescriptor -> new HashMap<>()).put(nodeIdentifier, propertyDescriptor);
- });
+ final Map<String, PropertyDescriptorDTO> descriptors = nodeEntity.getComponent().getDescriptors();
+ if (descriptors != null) {
+ descriptors.values().forEach(propertyDescriptor -> {
+ propertyDescriptorMap.computeIfAbsent(propertyDescriptor.getName(), nodeIdToPropertyDescriptor -> new HashMap<>()).put(nodeIdentifier, propertyDescriptor);
+ });
+ }
+
nodeReferencingComponentsMap.put(nodeIdentifier, nodeEntity.getComponent().getReferencingComponents());
}
@@ -243,8 +247,11 @@ public class ControllerServiceEntityMerger implements ComponentEntityMerger<Cont
if (!nodePropertyDescriptors.isEmpty()) {
// get the name of the property descriptor and find that descriptor being returned to the client
final PropertyDescriptorDTO propertyDescriptor = nodePropertyDescriptors.iterator().next();
- final PropertyDescriptorDTO clientPropertyDescriptor = clientEntity.getComponent().getDescriptors().get(propertyDescriptor.getName());
- PropertyDescriptorDtoMerger.merge(clientPropertyDescriptor, propertyDescriptorByNodeId);
+ final Map<String, PropertyDescriptorDTO> descriptors = clientEntity.getComponent().getDescriptors();
+ if (descriptors != null) {
+ final PropertyDescriptorDTO clientPropertyDescriptor = clientEntity.getComponent().getDescriptors().get(propertyDescriptor.getName());
+ PropertyDescriptorDtoMerger.merge(clientPropertyDescriptor, propertyDescriptorByNodeId);
+ }
}
}
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ApplicationResource.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ApplicationResource.java
index 4760aa6..d793595 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ApplicationResource.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ApplicationResource.java
@@ -53,8 +53,12 @@ import org.apache.nifi.web.Revision;
import org.apache.nifi.web.api.cookie.ApplicationCookieName;
import org.apache.nifi.web.api.cookie.ApplicationCookieService;
import org.apache.nifi.web.api.cookie.StandardApplicationCookieService;
+import org.apache.nifi.web.api.dto.ControllerServiceDTO;
+import org.apache.nifi.web.api.dto.ControllerServiceReferencingComponentDTO;
import org.apache.nifi.web.api.dto.RevisionDTO;
import org.apache.nifi.web.api.entity.ComponentEntity;
+import org.apache.nifi.web.api.entity.ControllerServiceEntity;
+import org.apache.nifi.web.api.entity.ControllerServiceReferencingComponentEntity;
import org.apache.nifi.web.api.entity.Entity;
import org.apache.nifi.web.api.entity.TransactionResultEntity;
import org.apache.nifi.web.security.ProxiedEntitiesUtils;
@@ -1272,4 +1276,33 @@ public abstract class ApplicationResource {
// a problem when being behind a proxy b/c Jetty's redirect doesn't consider proxy headers
return baseUrl + "/nifi/";
}
+
+ protected void stripNonUiRelevantFields(final ControllerServiceEntity serviceEntity) {
+ final ControllerServiceDTO dto = serviceEntity.getComponent();
+ if (dto == null) {
+ return;
+ }
+
+ final Set<ControllerServiceReferencingComponentEntity> referencingEntities = dto.getReferencingComponents();
+ if (referencingEntities == null) {
+ return;
+ }
+
+ referencingEntities.forEach(this::stripNonUiRelevantFields);
+ }
+
+ protected void stripNonUiRelevantFields(final ControllerServiceReferencingComponentEntity entity) {
+ final ControllerServiceReferencingComponentDTO dto = entity.getComponent();
+ if (dto == null) {
+ return;
+ }
+
+ dto.setDescriptors(null);
+ dto.setProperties(null);
+
+ final Set<ControllerServiceReferencingComponentEntity> referencingEntities = dto.getReferencingComponents();
+ if (referencingEntities != null) {
+ referencingEntities.forEach(this::stripNonUiRelevantFields);
+ }
+ }
}
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ControllerServiceResource.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ControllerServiceResource.java
index 273c417..a229f00 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ControllerServiceResource.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ControllerServiceResource.java
@@ -178,7 +178,9 @@ public class ControllerServiceResource extends ApplicationResource {
response = ControllerServiceEntity.class,
authorizations = {
@Authorization(value = "Read - /controller-services/{uuid}")
- }
+ },
+ notes = "If the uiOnly query parameter is provided with a value of true, the returned entity may only contain fields that are necessary for rendering the NiFi User Interface. As such, " +
+ "the selected fields may change at any time, even during incremental releases, without warning. As a result, this parameter should not be provided by any client other than the UI."
)
@ApiResponses(
value = {
@@ -194,7 +196,8 @@ public class ControllerServiceResource extends ApplicationResource {
value = "The controller service id.",
required = true
)
- @PathParam("id") final String id) {
+ @PathParam("id") final String id,
+ @QueryParam("uiOnly") @DefaultValue("false") final boolean uiOnly) {
if (isReplicateRequest()) {
return replicate(HttpMethod.GET);
@@ -208,11 +211,15 @@ public class ControllerServiceResource extends ApplicationResource {
// get the controller service
final ControllerServiceEntity entity = serviceFacade.getControllerService(id);
+ if (uiOnly) {
+ stripNonUiRelevantFields(entity);
+ }
populateRemainingControllerServiceEntityContent(entity);
return generateOkResponse(entity).build();
}
+
/**
* Returns the descriptor for the specified property.
*
@@ -575,6 +582,10 @@ public class ControllerServiceResource extends ApplicationResource {
final ControllerServiceReferencingComponentsEntity entity = serviceFacade.updateControllerServiceReferencingComponents(
referencingRevisions, updateReferenceRequest.getId(), scheduledState, controllerServiceState);
+ if (updateReferenceRequest.getUiOnly() == Boolean.TRUE) {
+ entity.getControllerServiceReferencingComponents().forEach(this::stripNonUiRelevantFields);
+ }
+
return generateOkResponse(entity).build();
}
);
@@ -838,6 +849,10 @@ public class ControllerServiceResource extends ApplicationResource {
final ControllerServiceEntity entity = serviceFacade.updateControllerService(revision, createDTOWithDesiredRunStatus(id, runStatusEntity.getState()));
populateRemainingControllerServiceEntityContent(entity);
+ if (runStatusEntity.getUiOnly() == Boolean.TRUE) {
+ stripNonUiRelevantFields(entity);
+ }
+
return generateOkResponse(entity).build();
}
);
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/FlowResource.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/FlowResource.java
index 3b5790d..9ed7622 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/FlowResource.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/FlowResource.java
@@ -113,7 +113,6 @@ import org.apache.nifi.web.api.entity.VersionedFlowSnapshotMetadataEntity;
import org.apache.nifi.web.api.entity.VersionedFlowSnapshotMetadataSetEntity;
import org.apache.nifi.web.api.entity.VersionedFlowsEntity;
import org.apache.nifi.web.api.metrics.JsonFormatPrometheusMetricsWriter;
-import org.apache.nifi.web.api.metrics.TextFormatPrometheusMetricsWriter;
import org.apache.nifi.web.api.metrics.PrometheusMetricsWriter;
import org.apache.nifi.web.api.metrics.TextFormatPrometheusMetricsWriter;
import org.apache.nifi.web.api.request.BulletinBoardPatternParameter;
@@ -482,7 +481,9 @@ public class FlowResource extends ApplicationResource {
response = ControllerServicesEntity.class,
authorizations = {
@Authorization(value = "Read - /flow")
- }
+ },
+ notes = "If the uiOnly query parameter is provided with a value of true, the returned entity may only contain fields that are necessary for rendering the NiFi User Interface. As such, " +
+ "the selected fields may change at any time, even during incremental releases, without warning. As a result, this parameter should not be provided by any client other than the UI."
)
@ApiResponses(
value = {
@@ -492,7 +493,7 @@ public class FlowResource 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 getControllerServicesFromController() {
+ public Response getControllerServicesFromController(@QueryParam("uiOnly") @DefaultValue("false") final boolean uiOnly) {
authorizeFlow();
@@ -502,6 +503,10 @@ public class FlowResource extends ApplicationResource {
// get all the controller services
final Set<ControllerServiceEntity> controllerServices = serviceFacade.getControllerServices(null, false, false);
+ if (uiOnly) {
+ controllerServices.forEach(this::stripNonUiRelevantFields);
+ }
+
controllerServiceResource.populateRemainingControllerServiceEntitiesContent(controllerServices);
// create the response entity
@@ -527,7 +532,9 @@ public class FlowResource extends ApplicationResource {
response = ControllerServicesEntity.class,
authorizations = {
@Authorization(value = "Read - /flow")
- }
+ },
+ notes = "If the uiOnly query parameter is provided with a value of true, the returned entity may only contain fields that are necessary for rendering the NiFi User Interface. As such, " +
+ "the selected fields may change at any time, even during incremental releases, without warning. As a result, this parameter should not be provided by any client other than the UI."
)
@ApiResponses(
value = {
@@ -540,8 +547,8 @@ public class FlowResource extends ApplicationResource {
public Response getControllerServicesFromGroup(
@ApiParam(value = "The process group id.", required = true) @PathParam("id") String groupId,
@ApiParam("Whether or not to include parent/ancestory process groups") @QueryParam("includeAncestorGroups") @DefaultValue("true") boolean includeAncestorGroups,
- @ApiParam("Whether or not to include descendant process groups") @QueryParam("includeDescendantGroups") @DefaultValue("false") boolean includeDescendantGroups
- ) {
+ @ApiParam("Whether or not to include descendant process groups") @QueryParam("includeDescendantGroups") @DefaultValue("false") boolean includeDescendantGroups,
+ @QueryParam("uiOnly") @DefaultValue("false") final boolean uiOnly) {
authorizeFlow();
@@ -551,6 +558,9 @@ public class FlowResource extends ApplicationResource {
// get all the controller services
final Set<ControllerServiceEntity> controllerServices = serviceFacade.getControllerServices(groupId, includeAncestorGroups, includeDescendantGroups);
+ if (uiOnly) {
+ controllerServices.forEach(this::stripNonUiRelevantFields);
+ }
controllerServiceResource.populateRemainingControllerServiceEntitiesContent(controllerServices);
// create the response entity
@@ -562,6 +572,7 @@ public class FlowResource extends ApplicationResource {
return generateOkResponse(entity).build();
}
+
// ---------------
// reporting-tasks
// ---------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/util/SnippetUtils.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/util/SnippetUtils.java
index 5d3cfc6..5652aaf 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/util/SnippetUtils.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/util/SnippetUtils.java
@@ -16,8 +16,6 @@
*/
package org.apache.nifi.web.util;
-
-
import org.apache.commons.lang3.StringUtils;
import org.apache.nifi.authorization.AccessPolicy;
import org.apache.nifi.authorization.RequestAction;
@@ -1014,5 +1012,4 @@ public final class SnippetUtils {
}
}
}
-
}
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 026e29e..7ffa885 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
@@ -1534,7 +1534,10 @@
$.ajax({
type: 'GET',
url: '../nifi-api/controller-services/' + encodeURIComponent(property.value),
- dataType: 'json'
+ dataType: 'json',
+ data: {
+ uiOnly: true
+ }
}).done(function (controllerServiceEntity) {
// close the dialog
closeDialog();
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-service.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-service.js
index 5c4337d..d232b1a 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-service.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-service.js
@@ -165,7 +165,10 @@
return $.ajax({
type: 'GET',
url: controllerServiceEntity.uri,
- dataType: 'json'
+ dataType: 'json',
+ data: {
+ uiOnly: true
+ }
}).done(function (response) {
renderControllerService(serviceTable, response);
}).fail(nfErrorHandler.handleAjaxError);
@@ -625,7 +628,8 @@
var updateControllerServiceEntity = {
'revision': nfClient.getRevision(controllerServiceEntity),
'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(),
- 'state': enabled ? 'ENABLED' : 'DISABLED'
+ 'state': enabled ? 'ENABLED' : 'DISABLED',
+ 'uiOnly': true
};
var updated = $.ajax({
@@ -752,7 +756,8 @@
'id': controllerServiceEntity.id,
'state': running ? 'RUNNING' : 'STOPPED',
'referencingComponentRevisions': referencingRevisions,
- 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged()
+ 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(),
+ 'uiOnly': true
};
// issue the request to update the referencing components
@@ -822,7 +827,10 @@
return $.ajax({
type: 'GET',
url: '../nifi-api/controller-services/' + encodeURIComponent(controllerServiceId),
- dataType: 'json'
+ dataType: 'json',
+ data: {
+ uiOnly: true
+ }
}).fail(nfErrorHandler.handleAjaxError);
}
};
@@ -857,7 +865,10 @@
var service = $.ajax({
type: 'GET',
url: controllerServiceEntity.uri,
- dataType: 'json'
+ dataType: 'json',
+ data: {
+ uiOnly: true
+ }
});
$.when(bulletins, service).done(function (bulletinResponse, serviceResult) {
@@ -1048,7 +1059,8 @@
'id': controllerServiceEntity.id,
'state': enabled ? 'ENABLED' : 'DISABLED',
'referencingComponentRevisions': referencingRevisions,
- 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged()
+ 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(),
+ 'uiOnly': true
};
// issue the request to update the referencing components
@@ -1955,7 +1967,10 @@
var reloadService = $.ajax({
type: 'GET',
url: controllerServiceEntity.uri,
- dataType: 'json'
+ dataType: 'json',
+ data: {
+ uiOnly: true
+ }
});
// get the controller service history
@@ -2145,7 +2160,10 @@
var reloadService = $.ajax({
type: 'GET',
url: controllerServiceEntity.uri,
- dataType: 'json'
+ dataType: 'json',
+ data: {
+ uiOnly: true
+ }
});
// get the controller service history
@@ -2173,7 +2191,7 @@
nfCommon.populateField('controller-service-bundle', nfCommon.formatBundle(controllerService['bundle']));
nfCommon.populateField('read-only-controller-service-name', controllerService['name']);
nfCommon.populateField('read-only-controller-service-comments', controllerService['comments']);
-
+
$('#controller-service-configuration').modal('setSubtitle', nfCommon.formatType(controllerService));
// set the implemented apis
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-services.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-services.js
index f4d3962..8e241a9 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-services.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-services.js
@@ -1228,7 +1228,10 @@
return $.ajax({
type: 'GET',
url: controllerServicesUri,
- dataType: 'json'
+ dataType: 'json',
+ data: {
+ uiOnly: true
+ }
}).done(function (response) {
var services = [];
$.each(response.controllerServices, function (_, service) {
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-configuration.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group-configuration.js
index 13ce96f..2060e00 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group-configuration.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group-configuration.js
@@ -144,7 +144,10 @@
$.ajax({
type: 'GET',
url: controllerServicesUri,
- dataType: 'json'
+ dataType: 'json',
+ data: {
+ uiOnly: true
+ }
}).done(function (response) {
var serviceTable = getControllerServicesTable();
@@ -209,7 +212,10 @@
$.ajax({
type: 'GET',
url: config.urls.api + '/process-groups/' + encodeURIComponent(groupId),
- dataType: 'json'
+ dataType: 'json',
+ data: {
+ uiOnly: true
+ }
}).done(function (response) {
// store the process group
$('#process-group-configuration').data('process-group', response);