diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-actions.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-actions.js index ae878f2e0f..9f9c460c37 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-actions.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-actions.js @@ -143,7 +143,7 @@ nf.Actions = (function () { var connections = nf.Connection.getComponentConnections(remoteProcessGroup.id); $.each(connections, function (_, connection) { if (connection.permissions.canRead) { - nf.Connection.reload(connection.component); + nf.Connection.reload(connection.id); } }); } @@ -519,7 +519,7 @@ nf.Actions = (function () { startRequests.push(updateResource(uri, entity).done(function (response) { if (nf.CanvasUtils.isProcessGroup(selected)) { - nf.ProcessGroup.reload(d.component); + nf.ProcessGroup.reload(d.id); } else { nf[d.type].set(response); } @@ -589,7 +589,7 @@ nf.Actions = (function () { stopRequests.push(updateResource(uri, entity).done(function (response) { if (nf.CanvasUtils.isProcessGroup(selected)) { - nf.ProcessGroup.reload(d.component); + nf.ProcessGroup.reload(d.id); } else { nf[d.type].set(response); } diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-utils.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-utils.js index 5208ba289f..1b26f35227 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-utils.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-utils.js @@ -1194,11 +1194,11 @@ nf.CanvasUtils = (function () { if (sourceData.permissions.canRead) { // update the source status if necessary if (nf.CanvasUtils.isProcessor(source)) { - nf.Processor.reload(sourceData.component); + nf.Processor.reload(sourceData.id); } else if (nf.CanvasUtils.isInputPort(source)) { - nf.Port.reload(sourceData.component); + nf.Port.reload(sourceData.id); } else if (nf.CanvasUtils.isRemoteProcessGroup(source)) { - nf.RemoteProcessGroup.reload(sourceData.component); + nf.RemoteProcessGroup.reload(sourceData.id); } } } @@ -1212,9 +1212,9 @@ nf.CanvasUtils = (function () { if (destinationData.permissions.canRead) { // update the destination component accordingly if (nf.CanvasUtils.isProcessor(destination)) { - nf.Processor.reload(destinationData.component); + nf.Processor.reload(destinationData.id); } else if (nf.CanvasUtils.isRemoteProcessGroup(destination)) { - nf.RemoteProcessGroup.reload(destinationData.component); + nf.RemoteProcessGroup.reload(destinationData.id); } } } @@ -1371,7 +1371,7 @@ nf.CanvasUtils = (function () { // move the components into the destination and... moveComponents(components, groupData.id).done(function () { // reload the target group - nf.ProcessGroup.reload(groupData.component); + nf.ProcessGroup.reload(groupData.id); }); }, 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 4eb4e878f1..3428d1a484 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 @@ -1676,11 +1676,11 @@ nf.Connection = (function () { /** * Reloads the connection state from the server and refreshes the UI. * - * @param {object} connection The connection to reload + * @param {string} id The connection id */ - reload: function (connection) { - if (connectionMap.has(connection.id)) { - var connectionEntity = connectionMap.get(connection.id); + reload: function (id) { + if (connectionMap.has(id)) { + var connectionEntity = connectionMap.get(id); return $.ajax({ type: 'GET', url: connectionEntity.uri, 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 44ee3c04cd..bc9b157f27 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 @@ -188,8 +188,7 @@ nf.ControllerService = (function () { if (reference.referenceType === 'Processor') { // reload the processor on the canvas if appropriate if (nf.Canvas.getGroupId() === reference.groupId) { - var processor = nf.Processor.get(reference.id); - nf.Processor.reload(processor.component); + nf.Processor.reload(reference.id); } // update the current active thread count diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-funnel.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-funnel.js index 937806f968..30b259fcba 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-funnel.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-funnel.js @@ -277,11 +277,11 @@ nf.Funnel = (function () { * Reloads the funnel state from the server and refreshes the UI. * If the funnel is currently unknown, this function just returns. * - * @param {object} funnel The funnel to reload + * @param {string} id The funnel id */ - reload: function (funnel) { - if (funnelMap.has(funnel.id)) { - var funnelEntity = funnelMap.get(funnel.id); + reload: function (id) { + if (funnelMap.has(id)) { + var funnelEntity = funnelMap.get(id); return $.ajax({ type: 'GET', url: funnelEntity.uri, diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-label.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-label.js index 890985d093..0eacac5254 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-label.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-label.js @@ -457,11 +457,11 @@ nf.Label = (function () { * Reloads the label state from the server and refreshes the UI. * If the label is currently unknown, this function just returns. * - * @param {object} label The label to reload + * @param {string} id The label id */ - reload: function (label) { - if (labelMap.has(label.id)) { - var labelEntity = labelMap.get(label.id); + reload: function (id) { + if (labelMap.has(id)) { + var labelEntity = labelMap.get(id); return $.ajax({ type: 'GET', url: labelEntity.uri, diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-policy-management.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-policy-management.js index 1a373155d9..cfae290c85 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-policy-management.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-policy-management.js @@ -948,15 +948,11 @@ nf.PolicyManagement = (function () { resetPolicy(); loadPolicy(); } - - nf.Canvas.reload({ - 'transition': true - }); }).fail(function (xhr, status, error) { nf.Common.handleAjaxError(xhr, status, error); resetPolicy(); loadPolicy(); - + }).always(function () { nf.Canvas.reload({ 'transition': true }); 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 5cfb0b3e36..75aed00dff 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 @@ -602,21 +602,17 @@ nf.Port = (function () { * Reloads the port state from the server and refreshes the UI. * If the port is currently unknown, this function just returns. * - * @param {object} port The port to reload + * @param {string} id The port id */ - reload: function (port) { - if (portMap.has(port.id)) { - var portEntity = portMap.get(port.id); + reload: function (id) { + if (portMap.has(id)) { + var portEntity = portMap.get(id); return $.ajax({ type: 'GET', url: portEntity.uri, dataType: 'json' }).done(function (response) { - if (nf.Common.isDefinedAndNotNull(response.inputPort)) { - nf.Port.set(response); - } else { - nf.Port.set(response); - } + nf.Port.set(response); }); } }, 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 7908d7bd09..0ec686df87 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 @@ -1084,23 +1084,17 @@ nf.ProcessGroup = (function () { * Reloads the process group state from the server and refreshes the UI. * If the process group is currently unknown, this function reloads the canvas. * - * @param {object} processGroup The process group to reload + * @param {string} id The process group id */ - reload: function (processGroup) { - if(nf.Common.isDefinedAndNotNull(processGroup)) { - if (processGroupMap.has(processGroup.id)) { - var processGroupEntity = processGroupMap.get(processGroup.id); - return $.ajax({ - type: 'GET', - url: processGroupEntity.uri, - dataType: 'json' - }).done(function (response) { - nf.ProcessGroup.set(response); - }); - } - } else { - nf.Canvas.reload({ - 'transition': true + reload: function (id) { + if (processGroupMap.has(id)) { + var processGroupEntity = processGroupMap.get(id); + return $.ajax({ + type: 'GET', + url: processGroupEntity.uri, + dataType: 'json' + }).done(function (response) { + nf.ProcessGroup.set(response); }); } }, diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-configuration.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-configuration.js index fa1d9a5269..99676c6ab6 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-configuration.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-configuration.js @@ -376,7 +376,7 @@ nf.ProcessorConfiguration = (function () { $.each(connections, function (_, connection) { if (connection.permissions.canRead) { if (connection.sourceId === processor.id) { - nf.Connection.reload(connection.component); + nf.Connection.reload(connection.id); } } }); @@ -577,7 +577,7 @@ nf.ProcessorConfiguration = (function () { var requests = []; // reload the processor in case an property descriptors have updated - requests.push(nf.Processor.reload(processor)); + requests.push(nf.Processor.reload(processor.id)); // get the processor history requests.push($.ajax({ @@ -764,7 +764,7 @@ nf.ProcessorConfiguration = (function () { // show the custom ui nf.CustomUi.showCustomUi(processorResponse, processor.config.customUiUrl, true).done(function () { // once the custom ui is closed, reload the processor - nf.Processor.reload(processor); + nf.Processor.reload(processor.id); // and reload the processor's outgoing connections reloadProcessorConnections(processor); 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 7e3e0d48c9..536f222949 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 @@ -859,11 +859,11 @@ nf.Processor = (function () { * Reloads the processor state from the server and refreshes the UI. * If the processor is currently unknown, this function just returns. * - * @param {object} processor The processor to reload + * @param {string} id The processor id */ - reload: function (processor) { - if (processorMap.has(processor.id)) { - var processorEntity = processorMap.get(processor.id); + reload: function (id) { + if (processorMap.has(id)) { + var processorEntity = processorMap.get(id); return $.ajax({ type: 'GET', url: processorEntity.uri, 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-ports.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-ports.js index 4cad5e925a..87acf2476c 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-ports.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-ports.js @@ -166,7 +166,7 @@ nf.RemoteProcessGroupPorts = (function () { // if can modify, the over status of this node may have changed if (nf.CanvasUtils.canModify(remoteProcessGroup)) { // reload the remote process group - nf.RemoteProcessGroup.reload(remoteProcessGroupData.component); + nf.RemoteProcessGroup.reload(remoteProcessGroupData.id); } // hide the dialog 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 8e5c6cef88..fcb452e637 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 @@ -930,11 +930,11 @@ nf.RemoteProcessGroup = (function () { * Reloads the remote process group state from the server and refreshes the UI. * If the remote process group is currently unknown, this function just returns. * - * @param {object} remoteProcessGroup The remote process group to reload + * @param {string} id The remote process group id */ - reload: function (remoteProcessGroup) { - if (remoteProcessGroupMap.has(remoteProcessGroup.id)) { - var remoteProcessGroupEntity = remoteProcessGroupMap.get(remoteProcessGroup.id); + reload: function (id) { + if (remoteProcessGroupMap.has(id)) { + var remoteProcessGroupEntity = remoteProcessGroupMap.get(id); return $.ajax({ type: 'GET', url: remoteProcessGroupEntity.uri, @@ -943,10 +943,10 @@ nf.RemoteProcessGroup = (function () { nf.RemoteProcessGroup.set(response); // reload the group's connections - var connections = nf.Connection.getComponentConnections(remoteProcessGroup.id); + var connections = nf.Connection.getComponentConnections(id); $.each(connections, function (_, connection) { if (connection.permissions.canRead) { - nf.Connection.reload(connection.component); + nf.Connection.reload(connection.id); } }); });