thenatog commented on a change in pull request #5862:
URL: https://github.com/apache/nifi/pull/5862#discussion_r831579776
##########
File path:
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-actions.js
##########
@@ -1153,42 +1153,75 @@
if (selection.size() === 1) {
var selectionData = selection.datum();
var revision = nfClient.getRevision(selectionData);
-
- $.ajax({
- type: 'DELETE',
- url: selectionData.uri + '?' + $.param({
- 'version': revision.version,
- 'clientId': revision.clientId,
- 'disconnectedNodeAcknowledged':
nfStorage.isDisconnectionAcknowledged()
- }),
- dataType: 'json'
- }).done(function (response) {
- // remove the component/connection in question
-
nfCanvasUtils.getComponentByType(selectionData.type).remove(selectionData.id);
-
- // if the selection is a connection, reload the source
and destination accordingly
- if (nfCanvasUtils.isConnection(selection) === false) {
- var connections =
nfConnection.getComponentConnections(selectionData.id);
- if (connections.length > 0) {
- var ids = [];
- $.each(connections, function (_, connection) {
- ids.push(connection.id);
- });
-
- // remove the corresponding connections
- nfConnection.remove(ids);
- }
- }
-
- // update URL deep linking params
- nfCanvasUtils.setURLParameters();
-
- // refresh the birdseye
- nfBirdseye.refresh();
- // inform Angular app values have changed
- nfNgBridge.digest();
- }).fail(nfErrorHandler.handleAjaxError);
- } else {
+
+ if
(nfCanvasUtils.isProcessGroup(selection) === true) {
Review comment:
The whitespacing on this section of code has gone wrong. Can we update
the whitespace to align with the rest of the file?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]