http://git-wip-us.apache.org/repos/asf/nifi/blob/05a1d630/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection-configuration.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-configuration.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection-configuration.js index 82c34e5..2d7938c 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection-configuration.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection-configuration.js @@ -24,11 +24,12 @@ 'nf.ErrorHandler', 'nf.Common', 'nf.Dialog', + 'nf.Storage', 'nf.Client', 'nf.CanvasUtils', 'nf.Connection'], - function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfCanvasUtils, nfConnection) { - return (nf.ConnectionConfiguration = factory($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfCanvasUtils, nfConnection)); + function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfCanvasUtils, nfConnection) { + return (nf.ConnectionConfiguration = factory($, d3, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfCanvasUtils, nfConnection)); }); } else if (typeof exports === 'object' && typeof module === 'object') { module.exports = (nf.ConnectionConfiguration = @@ -37,6 +38,7 @@ require('nf.ErrorHandler'), require('nf.Common'), require('nf.Dialog'), + require('nf.Storage'), require('nf.Client'), require('nf.CanvasUtils'), require('nf.Connection'))); @@ -46,11 +48,12 @@ root.nf.ErrorHandler, root.nf.Common, root.nf.Dialog, + root.nf.Storage, root.nf.Client, root.nf.CanvasUtils, root.nf.Connection); } -}(this, function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfCanvasUtils, nfConnection) { +}(this, function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfCanvasUtils, nfConnection) { 'use strict'; var nfBirdseye; @@ -924,6 +927,7 @@ 'version': 0 } }), + 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(), 'component': { 'name': connectionName, 'source': { @@ -1008,6 +1012,7 @@ var d = nfConnection.get(connectionId); var connectionEntity = { 'revision': nfClient.getRevision(d), + 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(), 'component': { 'id': connectionId, 'name': connectionName,
http://git-wip-us.apache.org/repos/asf/nifi/blob/05a1d630/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 611e143..7c57d04 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 @@ -1524,6 +1524,7 @@ var save = function (d, connection) { var entity = { 'revision': nfClient.getRevision(d), + 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(), 'component': connection }; @@ -1720,6 +1721,7 @@ var connectionEntity = { 'revision': nfClient.getRevision(connectionData), + 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(), 'component': { 'id': connectionData.id, 'destination': { http://git-wip-us.apache.org/repos/asf/nifi/blob/05a1d630/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-service.js ---------------------------------------------------------------------- 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 4622ddf..e8c4eb2 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 @@ -24,14 +24,15 @@ 'nf.ErrorHandler', 'nf.Common', 'nf.Dialog', + 'nf.Storage', 'nf.Client', 'nf.Settings', 'nf.UniversalCapture', 'nf.CustomUi', 'nf.CanvasUtils', 'nf.Processor'], - function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfSettings, nfUniversalCapture, nfCustomUi, nfCanvasUtils, nfProcessor) { - return (nf.ControllerService = factory($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfSettings, nfUniversalCapture, nfCustomUi, nfCanvasUtils, nfProcessor)); + function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfSettings, nfUniversalCapture, nfCustomUi, nfCanvasUtils, nfProcessor) { + return (nf.ControllerService = factory($, d3, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfSettings, nfUniversalCapture, nfCustomUi, nfCanvasUtils, nfProcessor)); }); } else if (typeof exports === 'object' && typeof module === 'object') { module.exports = (nf.ControllerService = @@ -40,6 +41,7 @@ require('nf.ErrorHandler'), require('nf.Common'), require('nf.Dialog'), + require('nf.Storage'), require('nf.Client'), require('nf.Settings'), require('nf.UniversalCapture'), @@ -52,6 +54,7 @@ root.nf.ErrorHandler, root.nf.Common, root.nf.Dialog, + root.nf.Storage, root.nf.Client, root.nf.Settings, root.nf.UniversalCapture, @@ -59,7 +62,7 @@ root.nf.CanvasUtils, root.nf.Processor); } -}(this, function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfSettings, nfUniversalCapture, nfCustomUi, nfCanvasUtils, nfProcessor) { +}(this, function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfSettings, nfUniversalCapture, nfCustomUi, nfCanvasUtils, nfProcessor) { 'use strict'; var nfControllerServices, nfReportingTask; @@ -141,6 +144,7 @@ // create the controller service entity var controllerServiceEntity = {}; + controllerServiceEntity['disconnectedNodeAcknowledged'] = nfStorage.isDisconnectionAcknowledged(); controllerServiceEntity['component'] = controllerServiceDto; // return the marshaled details @@ -631,6 +635,7 @@ // build the request entity var updateControllerServiceEntity = { 'revision': nfClient.getRevision(controllerServiceEntity), + 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(), 'component': { 'id': controllerServiceEntity.id, 'state': enabled ? 'ENABLED' : 'DISABLED' @@ -753,7 +758,8 @@ var referenceEntity = { 'id': controllerServiceEntity.id, 'state': running ? 'RUNNING' : 'STOPPED', - 'referencingComponentRevisions': referencingRevisions + 'referencingComponentRevisions': referencingRevisions, + 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged() }; // issue the request to update the referencing components @@ -1048,7 +1054,8 @@ var referenceEntity = { 'id': controllerServiceEntity.id, 'state': enabled ? 'ENABLED' : 'DISABLED', - 'referencingComponentRevisions': referencingRevisions + 'referencingComponentRevisions': referencingRevisions, + 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged() }; // issue the request to update the referencing components @@ -2181,8 +2188,9 @@ $.ajax({ type: 'DELETE', url: controllerServiceEntity.uri + '?' + $.param({ - version: revision.version, - clientId: revision.clientId + 'version': revision.version, + 'clientId': revision.clientId, + 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged() }), dataType: 'json' }).done(function (response) { http://git-wip-us.apache.org/repos/asf/nifi/blob/05a1d630/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-services.js ---------------------------------------------------------------------- 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 0848459..e85d7a8 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 @@ -29,6 +29,7 @@ 'nf.ErrorHandler', 'nf.FilteredDialogCommon', 'nf.Dialog', + 'nf.Storage', 'nf.Common', 'nf.ControllerService', 'nf.ProcessGroup', @@ -36,8 +37,8 @@ 'nf.ComponentState', 'nf.ComponentVersion', 'nf.ng.Bridge'], - function ($, d3, Slick, nfClient, nfShell, nfProcessGroupConfiguration, nfCanvasUtils, nfErrorHandler, nfFilteredDialogCommon, nfDialog, nfCommon, nfControllerService, nfProcessGroup, nfPolicyManagement, nfComponentState, nfComponentVersion, nfNgBridge) { - return (nf.ControllerServices = factory($, d3, Slick, nfClient, nfShell, nfProcessGroupConfiguration, nfCanvasUtils, nfErrorHandler, nfFilteredDialogCommon, nfDialog, nfCommon, nfControllerService, nfProcessGroup, nfPolicyManagement, nfComponentState, nfComponentVersion, nfNgBridge)); + function ($, d3, Slick, nfClient, nfShell, nfProcessGroupConfiguration, nfCanvasUtils, nfErrorHandler, nfFilteredDialogCommon, nfDialog, nfStorage, nfCommon, nfControllerService, nfProcessGroup, nfPolicyManagement, nfComponentState, nfComponentVersion, nfNgBridge) { + return (nf.ControllerServices = factory($, d3, Slick, nfClient, nfShell, nfProcessGroupConfiguration, nfCanvasUtils, nfErrorHandler, nfFilteredDialogCommon, nfDialog, nfStorage, nfCommon, nfControllerService, nfProcessGroup, nfPolicyManagement, nfComponentState, nfComponentVersion, nfNgBridge)); }); } else if (typeof exports === 'object' && typeof module === 'object') { module.exports = (nf.ControllerServices = @@ -51,6 +52,7 @@ require('nf.ErrorHandler'), require('nf.FilteredDialogCommon'), require('nf.Dialog'), + require('nf.Storage'), require('nf.Common'), require('nf.ControllerService'), require('nf.ProcessGroup'), @@ -69,6 +71,7 @@ root.nf.ErrorHandler, root.nf.FilteredDialogCommon, root.nf.Dialog, + root.nf.Storage, root.nf.Common, root.nf.ControllerService, root.nf.ProcessGroup, @@ -77,7 +80,7 @@ root.nf.ComponentVersion, root.nf.ng.Bridge); } -}(this, function ($, d3, Slick, nfClient, nfShell, nfProcessGroupConfiguration, nfCanvasUtils, nfErrorHandler, nfFilteredDialogCommon, nfDialog, nfCommon, nfControllerService, nfProcessGroup, nfPolicyManagement, nfComponentState, nfComponentVersion, nfNgBridge) { +}(this, function ($, d3, Slick, nfClient, nfShell, nfProcessGroupConfiguration, nfCanvasUtils, nfErrorHandler, nfFilteredDialogCommon, nfDialog, nfStorage, nfCommon, nfControllerService, nfProcessGroup, nfPolicyManagement, nfComponentState, nfComponentVersion, nfNgBridge) { 'use strict'; var dblClick = null; @@ -301,6 +304,7 @@ 'version': 0 } }), + 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(), 'component': { 'type': controllerServiceType, 'bundle': controllerServiceBundle http://git-wip-us.apache.org/repos/asf/nifi/blob/05a1d630/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-custom-ui.js ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-custom-ui.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-custom-ui.js index f54268a..de26b1f 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-custom-ui.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-custom-ui.js @@ -23,23 +23,26 @@ 'nf.Common', 'nf.Shell', 'nf.Dialog', - 'nf.Client'], function ($, nfCommon, nfShell, nfDialog, nfClient) { - return (nf.CustomUi = factory($, nfCommon, nfShell, nfDialog, nfClient)); + 'nf.Storage', + 'nf.Client'], function ($, nfCommon, nfShell, nfDialog, nfStorage, nfClient) { + return (nf.CustomUi = factory($, nfCommon, nfShell, nfDialog, nfStorage, nfClient)); }); } else if (typeof exports === 'object' && typeof module === 'object') { module.exports = (nf.CustomUi = factory(require('jquery'), require('nf.Common'), require('nf.Shell'), require('nf.Dialog'), + require('nf.Storage'), require('nf.Client'))); } else { nf.CustomUi = factory(root.$, root.nf.Common, root.nf.Shell, root.nf.Dialog, + root.nf.Storage, root.nf.Client); } -}(this, function ($, nfCommon, nfShell, nfDialog, nfClient) { +}(this, function ($, nfCommon, nfShell, nfDialog, nfStorage, nfClient) { 'use strict'; return { @@ -63,7 +66,8 @@ 'id': entity.id, 'revision': revision.version, 'clientId': revision.clientId, - 'editable': editable + 'editable': editable, + 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged() }; // conditionally include the ui extension token http://git-wip-us.apache.org/repos/asf/nifi/blob/05a1d630/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-draggable.js ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-draggable.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-draggable.js index 5b8307b..95869e6 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-draggable.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-draggable.js @@ -21,6 +21,7 @@ if (typeof define === 'function' && define.amd) { define(['jquery', 'd3', + 'nf.Storage', 'nf.Connection', 'nf.Birdseye', 'nf.CanvasUtils', @@ -28,13 +29,14 @@ 'nf.Dialog', 'nf.Client', 'nf.ErrorHandler'], - function ($, d3, nfConnection, nfBirdseye, nfCanvasUtils, nfCommon, nfDialog, nfClient, nfErrorHandler) { - return (nf.Draggable = factory($, d3, nfConnection, nfBirdseye, nfCanvasUtils, nfCommon, nfDialog, nfClient, nfErrorHandler)); + function ($, d3, nfStorage, nfConnection, nfBirdseye, nfCanvasUtils, nfCommon, nfDialog, nfClient, nfErrorHandler) { + return (nf.Draggable = factory($, d3, nfStorage, nfConnection, nfBirdseye, nfCanvasUtils, nfCommon, nfDialog, nfClient, nfErrorHandler)); }); } else if (typeof exports === 'object' && typeof module === 'object') { module.exports = (nf.Draggable = factory(require('jquery'), require('d3'), + require('nf.Storage'), require('nf.Connection'), require('nf.Birdseye'), require('nf.CanvasUtils'), @@ -45,6 +47,7 @@ } else { nf.Draggable = factory(root.$, root.d3, + root.nf.Storage, root.nf.Connection, root.nf.Birdseye, root.nf.CanvasUtils, @@ -53,7 +56,7 @@ root.nf.Client, root.nf.ErrorHandler); } -}(this, function ($, d3, nfConnection, nfBirdseye, nfCanvasUtils, nfCommon, nfDialog, nfClient, nfErrorHandler) { +}(this, function ($, d3, nfStorage, nfConnection, nfBirdseye, nfCanvasUtils, nfCommon, nfDialog, nfClient, nfErrorHandler) { 'use strict'; var nfCanvas; @@ -264,6 +267,7 @@ // build the entity var entity = { 'revision': nfClient.getRevision(d), + 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(), 'component': { 'id': d.id, 'position': newPosition @@ -325,6 +329,7 @@ var entity = { 'revision': nfClient.getRevision(d), + 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(), 'component': { id: d.id, bends: newBends http://git-wip-us.apache.org/repos/asf/nifi/blob/05a1d630/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-flow-version.js ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-flow-version.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-flow-version.js index 2bb45f9..fbc3db5 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-flow-version.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-flow-version.js @@ -26,6 +26,7 @@ 'nf.ng.Bridge', 'nf.ErrorHandler', 'nf.Dialog', + 'nf.Storage', 'nf.Common', 'nf.Client', 'nf.CanvasUtils', @@ -33,8 +34,8 @@ 'nf.ProcessGroupConfiguration', 'nf.Graph', 'nf.Birdseye'], - function ($, nfNgBridge, nfErrorHandler, nfDialog, nfCommon, nfClient, nfCanvasUtils, nfProcessGroup, nfProcessGroupConfiguration, nfGraph, nfBirdseye) { - return (nf.FlowVersion = factory($, nfNgBridge, nfErrorHandler, nfDialog, nfCommon, nfClient, nfCanvasUtils, nfProcessGroup, nfProcessGroupConfiguration, nfGraph, nfBirdseye)); + function ($, nfNgBridge, nfErrorHandler, nfDialog, nfStorage, nfCommon, nfClient, nfCanvasUtils, nfProcessGroup, nfProcessGroupConfiguration, nfGraph, nfBirdseye) { + return (nf.FlowVersion = factory($, nfNgBridge, nfErrorHandler, nfDialog, nfStorage, nfCommon, nfClient, nfCanvasUtils, nfProcessGroup, nfProcessGroupConfiguration, nfGraph, nfBirdseye)); }); } else if (typeof exports === 'object' && typeof module === 'object') { module.exports = (nf.FlowVerison = @@ -42,6 +43,7 @@ require('nf.ng.Bridge'), require('nf.ErrorHandler'), require('nf.Dialog'), + require('nf.Storage'), require('nf.Common'), require('nf.Client'), require('nf.CanvasUtils'), @@ -54,6 +56,7 @@ root.nf.ng.Bridge, root.nf.ErrorHandler, root.nf.Dialog, + root.nf.Storage, root.nf.Common, root.nf.Client, root.nf.CanvasUtils, @@ -62,7 +65,7 @@ root.nf.Graph, root.nf.Birdseye); } -}(this, function ($, nfNgBridge, nfErrorHandler, nfDialog, nfCommon, nfClient, nfCanvasUtils, nfProcessGroup, nfProcessGroupConfiguration, nfGraph, nfBirdseye) { +}(this, function ($, nfNgBridge, nfErrorHandler, nfDialog, nfStorage, nfCommon, nfClient, nfCanvasUtils, nfProcessGroup, nfProcessGroupConfiguration, nfGraph, nfBirdseye) { 'use strict'; var serverTimeOffset = null; @@ -387,7 +390,8 @@ revision: { version: processGroupRevision.version } - }) + }), + 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged() }; var versionControlInformation = $('#save-flow-version-process-group-id').data('versionControlInformation'); @@ -980,6 +984,7 @@ 'version': 0 } }), + 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(), 'component': { 'position': { 'x': pt.x, @@ -1100,6 +1105,7 @@ 'version': processGroupRevision.version } }), + 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(), 'versionControlInformation': { 'groupId': processGroupId, 'registryId': versionControlInformation.registryId, @@ -1160,7 +1166,9 @@ if (nfCommon.isDefinedAndNotNull(changeRequest)) { $.ajax({ type: 'DELETE', - url: changeRequest.uri, + url: changeRequest.uri + '?' + $.param({ + 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged() + }), dataType: 'json' }).done(function (response) { changeRequest = response.request; @@ -1447,6 +1455,7 @@ 'version': response.processGroupRevision.version } }), + 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(), 'versionControlInformation': response.versionControlInformation }; @@ -1501,7 +1510,9 @@ if (nfCommon.isDefinedAndNotNull(revertRequest)) { $.ajax({ type: 'DELETE', - url: revertRequest.uri, + url: revertRequest.uri + '?' + $.param({ + 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged() + }), dataType: 'json' }).done(function (response) { revertRequest = response.request; @@ -1937,7 +1948,9 @@ $.ajax({ type: 'DELETE', - url: '../nifi-api/versions/process-groups/' + encodeURIComponent(processGroupId) + '?' + $.param(revision), + url: '../nifi-api/versions/process-groups/' + encodeURIComponent(processGroupId) + '?' + $.param($.extend({ + 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged() + }, revision)), dataType: 'json', contentType: 'application/json' }).done(function (response) { http://git-wip-us.apache.org/repos/asf/nifi/blob/05a1d630/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-label-configuration.js ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-label-configuration.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-label-configuration.js index e90ce04..9063337 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-label-configuration.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-label-configuration.js @@ -21,19 +21,21 @@ if (typeof define === 'function' && define.amd) { define(['jquery', 'd3', + 'nf.Storage', 'nf.ErrorHandler', 'nf.Common', 'nf.Client', 'nf.CanvasUtils', 'nf.ng.Bridge', 'nf.Label'], - function ($, d3, nfErrorHandler, nfCommon, nfClient, nfCanvasUtils, nfNgBridge, nfLabel) { - return (nf.LabelConfiguration = factory($, d3, nfErrorHandler, nfCommon, nfClient, nfCanvasUtils, nfNgBridge, nfLabel)); + function ($, d3, nfStorage, nfErrorHandler, nfCommon, nfClient, nfCanvasUtils, nfNgBridge, nfLabel) { + return (nf.LabelConfiguration = factory($, d3, nfStorage, nfErrorHandler, nfCommon, nfClient, nfCanvasUtils, nfNgBridge, nfLabel)); }); } else if (typeof exports === 'object' && typeof module === 'object') { module.exports = (nf.LabelConfiguration = factory(require('jquery'), require('d3'), + require('nf.Storage'), require('nf.ErrorHandler'), require('nf.Common'), require('nf.Client'), @@ -43,6 +45,7 @@ } else { nf.LabelConfiguration = factory(root.$, root.d3, + root.nf.Storage, root.nf.ErrorHandler, root.nf.Common, root.nf.Client, @@ -50,7 +53,7 @@ root.nf.ng.Bridge, root.nf.Label); } -}(this, function ($, d3, nfErrorHandler, nfCommon, nfClient, nfCanvasUtils, nfNgBridge, nfLabel) { +}(this, function ($, d3, nfStorage, nfErrorHandler, nfCommon, nfClient, nfCanvasUtils, nfNgBridge, nfLabel) { 'use strict'; var labelId = ''; @@ -83,6 +86,7 @@ // build the label entity var labelEntity = { 'revision': nfClient.getRevision(labelData), + 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(), 'component': { 'id': labelId, 'label': labelValue, http://git-wip-us.apache.org/repos/asf/nifi/blob/05a1d630/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-label.js ---------------------------------------------------------------------- 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 c6f9764..d5618ae 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 @@ -21,27 +21,30 @@ if (typeof define === 'function' && define.amd) { define(['jquery', 'd3', + 'nf.Storage', 'nf.Common', 'nf.Client', 'nf.CanvasUtils'], - function ($, d3, nfCommon, nfClient, nfCanvasUtils) { - return (nf.Label = factory($, d3, nfCommon, nfClient, nfCanvasUtils)); + function ($, d3, nfStorage, nfCommon, nfClient, nfCanvasUtils) { + return (nf.Label = factory($, d3, nfStorage, nfCommon, nfClient, nfCanvasUtils)); }); } else if (typeof exports === 'object' && typeof module === 'object') { module.exports = (nf.Label = factory(require('jquery'), require('d3'), + require('nf.Storage'), require('nf.Common'), require('nf.Client'), require('nf.CanvasUtils'))); } else { nf.Label = factory(root.$, root.d3, + root.nf.Storage, root.nf.Common, root.nf.Client, root.nf.CanvasUtils); } -}(this, function ($, d3, nfCommon, nfClient, nfCanvasUtils) { +}(this, function ($, d3, nfStorage, nfCommon, nfClient, nfCanvasUtils) { 'use strict'; var nfConnectable; @@ -373,6 +376,7 @@ if (different) { var labelEntity = { 'revision': nfClient.getRevision(labelData), + 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(), 'component': { 'id': labelData.id, 'width': labelData.dimensions.width, http://git-wip-us.apache.org/repos/asf/nifi/blob/05a1d630/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-policy-management.js ---------------------------------------------------------------------- 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 b0f1d43..3105d41 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 @@ -24,12 +24,13 @@ 'nf.ErrorHandler', 'nf.Common', 'nf.Client', + 'nf.Storage', 'nf.CanvasUtils', 'nf.ng.Bridge', 'nf.Dialog', 'nf.Shell'], - function ($, Slick, nfErrorHandler, nfCommon, nfClient, nfCanvasUtils, nfNgBridge, nfDialog, nfShell) { - return (nf.PolicyManagement = factory($, Slick, nfErrorHandler, nfCommon, nfClient, nfCanvasUtils, nfNgBridge, nfDialog, nfShell)); + function ($, Slick, nfErrorHandler, nfCommon, nfClient, nfStorage, nfCanvasUtils, nfNgBridge, nfDialog, nfShell) { + return (nf.PolicyManagement = factory($, Slick, nfErrorHandler, nfCommon, nfClient, nfStorage, nfCanvasUtils, nfNgBridge, nfDialog, nfShell)); }); } else if (typeof exports === 'object' && typeof module === 'object') { module.exports = (nf.PolicyManagement = @@ -38,6 +39,7 @@ require('nf.ErrorHandler'), require('nf.Common'), require('nf.Client'), + require('nf.Storage'), require('nf.CanvasUtils'), require('nf.ng.Bridge'), require('nf.Dialog'), @@ -48,12 +50,13 @@ root.nf.ErrorHandler, root.nf.Common, root.nf.Client, + root.nf.Storage, root.nf.CanvasUtils, root.nf.ng.Bridge, root.nf.Dialog, root.nf.Shell); } -}(this, function ($, Slick, nfErrorHandler, nfCommon, nfClient, nfCanvasUtils, nfNgBridge, nfDialog, nfShell) { +}(this, function ($, Slick, nfErrorHandler, nfCommon, nfClient, nfStorage, nfCanvasUtils, nfNgBridge, nfDialog, nfShell) { 'use strict'; var config = { @@ -792,11 +795,14 @@ */ var deletePolicy = function () { var currentEntity = $('#policy-table').data('policy'); + var revision = nfClient.getRevision(currentEntity); if (nfCommon.isDefinedAndNotNull(currentEntity)) { $.ajax({ type: 'DELETE', - url: currentEntity.uri + '?' + $.param(nfClient.getRevision(currentEntity)), + url: currentEntity.uri + '?' + $.param($.extend({ + 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged() + }, revision)), dataType: 'json' }).done(function () { loadPolicy(); @@ -1236,6 +1242,7 @@ 'version': 0 } }), + 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(), 'component': { 'action': resourceAndAction.action, 'resource': resourceAndAction.resource, @@ -1291,6 +1298,7 @@ if (nfCommon.isDefinedAndNotNull(currentEntity)) { var entity = { 'revision': nfClient.getRevision(currentEntity), + 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(), 'component': { 'id': currentEntity.id, 'users': users, http://git-wip-us.apache.org/repos/asf/nifi/blob/05a1d630/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port-configuration.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-configuration.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port-configuration.js index 083b8cd..0ee0a42 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port-configuration.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port-configuration.js @@ -24,12 +24,13 @@ 'nf.ErrorHandler', 'nf.Common', 'nf.Dialog', + 'nf.Storage', 'nf.Client', 'nf.CanvasUtils', 'nf.ng.Bridge', 'nf.Port'], - function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfCanvasUtils, nfNgBridge, nfPort) { - return (nf.PortConfiguration = factory($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfCanvasUtils, nfNgBridge, nfPort)); + function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfCanvasUtils, nfNgBridge, nfPort) { + return (nf.PortConfiguration = factory($, d3, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfCanvasUtils, nfNgBridge, nfPort)); }); } else if (typeof exports === 'object' && typeof module === 'object') { module.exports = (nf.PortConfiguration = @@ -38,6 +39,7 @@ require('nf.ErrorHandler'), require('nf.Common'), require('nf.Dialog'), + require('nf.Storage'), require('nf.Client'), require('nf.CanvasUtils'), require('nf.ng.Bridge'), @@ -48,12 +50,13 @@ root.nf.ErrorHandler, root.nf.Common, root.nf.Dialog, + root.nf.Storage, root.nf.Client, root.nf.CanvasUtils, root.nf.ng.Bridge, root.nf.Port); } -}(this, function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfCanvasUtils, nfNgBridge, nfPort) { +}(this, function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfCanvasUtils, nfNgBridge, nfPort) { 'use strict'; /** @@ -98,6 +101,7 @@ // build the port entity var portEntity = { 'revision': nfClient.getRevision(portData), + 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(), 'component': port }; http://git-wip-us.apache.org/repos/asf/nifi/blob/05a1d630/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group-configuration.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-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 58402df..fb6756d 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 @@ -24,12 +24,13 @@ 'nf.ErrorHandler', 'nf.Common', 'nf.Dialog', + 'nf.Storage', 'nf.Client', 'nf.ProcessGroup', 'nf.Shell', 'nf.CanvasUtils'], - function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfProcessGroup, nfShell, nfCanvasUtils) { - return (nf.ProcessGroupConfiguration = factory($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfProcessGroup, nfShell, nfCanvasUtils)); + function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfProcessGroup, nfShell, nfCanvasUtils) { + return (nf.ProcessGroupConfiguration = factory($, d3, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfProcessGroup, nfShell, nfCanvasUtils)); }); } else if (typeof exports === 'object' && typeof module === 'object') { module.exports = (nf.ProcessGroupConfiguration = @@ -38,6 +39,7 @@ require('nf.ErrorHandler'), require('nf.Common'), require('nf.Dialog'), + require('nf.Storage'), require('nf.Client'), require('nf.ProcessGroup'), require('nf.Shell'), @@ -48,12 +50,13 @@ root.nf.ErrorHandler, root.nf.Common, root.nf.Dialog, + root.nf.Storage, root.nf.Client, root.nf.ProcessGroup, root.nf.Shell, root.nf.CanvasUtils); } -}(this, function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfProcessGroup, nfShell, nfCanvasUtils) { +}(this, function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfProcessGroup, nfShell, nfCanvasUtils) { 'use strict'; var nfControllerServices; @@ -93,6 +96,7 @@ 'version': version } }), + 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(), 'component': { 'id': groupId, 'name': $('#process-group-name').val(), http://git-wip-us.apache.org/repos/asf/nifi/blob/05a1d630/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-configuration.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-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 f6c69a6..c170fe3 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 @@ -23,6 +23,7 @@ 'nf.ErrorHandler', 'nf.Common', 'nf.Dialog', + 'nf.Storage', 'nf.Client', 'nf.CanvasUtils', 'nf.ng.Bridge', @@ -31,8 +32,8 @@ 'nf.CustomUi', 'nf.UniversalCapture', 'nf.Connection'], - function ($, nfErrorHandler, nfCommon, nfDialog, nfClient, nfCanvasUtils, nfNgBridge, nfProcessor, nfClusterSummary, nfCustomUi, nfUniversalCapture, nfConnection) { - return (nf.ProcessorConfiguration = factory($, nfErrorHandler, nfCommon, nfDialog, nfClient, nfCanvasUtils, nfNgBridge, nfProcessor, nfClusterSummary, nfCustomUi, nfUniversalCapture, nfConnection)); + function ($, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfCanvasUtils, nfNgBridge, nfProcessor, nfClusterSummary, nfCustomUi, nfUniversalCapture, nfConnection) { + return (nf.ProcessorConfiguration = factory($, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfCanvasUtils, nfNgBridge, nfProcessor, nfClusterSummary, nfCustomUi, nfUniversalCapture, nfConnection)); }); } else if (typeof exports === 'object' && typeof module === 'object') { module.exports = (nf.ProcessorConfiguration = @@ -40,6 +41,7 @@ require('nf.ErrorHandler'), require('nf.Common'), require('nf.Dialog'), + require('nf.Storage'), require('nf.Client'), require('nf.CanvasUtils'), require('nf.ng.Bridge'), @@ -53,6 +55,7 @@ root.nf.ErrorHandler, root.nf.Common, root.nf.Dialog, + root.nf.Storage, root.nf.Client, root.nf.CanvasUtils, root.nf.ng.Bridge, @@ -62,7 +65,7 @@ root.nf.UniversalCapture, root.nf.Connection); } -}(this, function ($, nfErrorHandler, nfCommon, nfDialog, nfClient, nfCanvasUtils, nfNgBridge, nfProcessor, nfClusterSummary, nfCustomUi, nfUniversalCapture, nfConnection) { +}(this, function ($, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfCanvasUtils, nfNgBridge, nfProcessor, nfClusterSummary, nfCustomUi, nfUniversalCapture, nfConnection) { 'use strict'; // possible values for a processor's run duration (in millis) @@ -493,6 +496,7 @@ // set the revision var d = nfProcessor.get(processor.id); updatedProcessor['revision'] = nfClient.getRevision(d); + updatedProcessor['disconnectedNodeAcknowledged'] = nfStorage.isDisconnectionAcknowledged(); // update the selected component return $.ajax({ http://git-wip-us.apache.org/repos/asf/nifi/blob/05a1d630/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-configuration.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-configuration.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-configuration.js index 279350e..3f23c38 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-configuration.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-configuration.js @@ -24,12 +24,13 @@ 'nf.ErrorHandler', 'nf.Common', 'nf.Dialog', + 'nf.Storage', 'nf.Client', 'nf.CanvasUtils', 'nf.ng.Bridge', 'nf.RemoteProcessGroup'], - function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfCanvasUtils, nfNgBridge, nfRemoteProcessGroup) { - return (nf.RemoteProcessGroupConfiguration = factory($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfCanvasUtils, nfNgBridge, nfRemoteProcessGroup)); + function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfCanvasUtils, nfNgBridge, nfRemoteProcessGroup) { + return (nf.RemoteProcessGroupConfiguration = factory($, d3, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfCanvasUtils, nfNgBridge, nfRemoteProcessGroup)); }); } else if (typeof exports === 'object' && typeof module === 'object') { module.exports = (nf.RemoteProcessGroupConfiguration = @@ -38,6 +39,7 @@ require('nf.ErrorHandler'), require('nf.Common'), require('nf.Dialog'), + require('nf.Storage'), require('nf.Client'), require('nf.CanvasUtils'), require('nf.ng.Bridge'), @@ -48,12 +50,13 @@ root.nf.ErrorHandler, root.nf.Common, root.nf.Dialog, + root.nf.Storage, root.nf.Client, root.nf.CanvasUtils, root.nf.ng.Bridge, root.nf.RemoteProcessGroup); } -}(this, function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfCanvasUtils, nfNgBridge, nfRemoteProcessGroup) { +}(this, function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfCanvasUtils, nfNgBridge, nfRemoteProcessGroup) { 'use strict'; return { @@ -76,6 +79,7 @@ // create the remote process group details var remoteProcessGroupEntity = { 'revision': nfClient.getRevision(remoteProcessGroupData), + 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(), 'component': { id: remoteProcessGroupId, targetUris: $('#remote-process-group-urls').val(), http://git-wip-us.apache.org/repos/asf/nifi/blob/05a1d630/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 ---------------------------------------------------------------------- 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 4232cab..cad61d0 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 @@ -24,12 +24,13 @@ 'nf.ErrorHandler', 'nf.Common', 'nf.Dialog', + 'nf.Storage', 'nf.Client', 'nf.CanvasUtils', 'nf.ng.Bridge', 'nf.RemoteProcessGroup'], - function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfCanvasUtils, nfNgBridge, nfRemoteProcessGroup) { - return (nf.RemoteProcessGroupPorts = factory($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfCanvasUtils, nfNgBridge, nfRemoteProcessGroup)); + function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfCanvasUtils, nfNgBridge, nfRemoteProcessGroup) { + return (nf.RemoteProcessGroupPorts = factory($, d3, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfCanvasUtils, nfNgBridge, nfRemoteProcessGroup)); }); } else if (typeof exports === 'object' && typeof module === 'object') { module.exports = (nf.RemoteProcessGroupPorts = @@ -38,6 +39,7 @@ require('nf.ErrorHandler'), require('nf.Common'), require('nf.Dialog'), + require('nf.Storage'), require('nf.Client'), require('nf.CanvasUtils'), require('nf.ng.Bridge'), @@ -48,12 +50,13 @@ root.nf.ErrorHandler, root.nf.Common, root.nf.Dialog, + root.nf.Storage, root.nf.Client, root.nf.CanvasUtils, root.nf.ng.Bridge, root.nf.RemoteProcessGroup); } -}(this, function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfCanvasUtils, nfNgBridge, nfRemoteProcessGroup) { +}(this, function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfCanvasUtils, nfNgBridge, nfRemoteProcessGroup) { 'use strict'; /** @@ -93,6 +96,7 @@ // create the remote process group details var remoteProcessGroupPortEntity = { 'revision': nfClient.getRevision(remoteProcessGroupData), + 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(), 'remoteProcessGroupPort': { id: remotePortId, groupId: remoteProcessGroupId, @@ -371,6 +375,7 @@ // create the remote process group details var remoteProcessGroupPortEntity = { 'revision': nfClient.getRevision(remoteProcessGroupData), + 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(), 'remoteProcessGroupPort': { id: port.id, groupId: remoteProcessGroupId, http://git-wip-us.apache.org/repos/asf/nifi/blob/05a1d630/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-reporting-task.js ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-reporting-task.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-reporting-task.js index 5525874..0d8d92d 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-reporting-task.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-reporting-task.js @@ -23,13 +23,14 @@ 'nf.ErrorHandler', 'nf.Common', 'nf.Dialog', + 'nf.Storage', 'nf.Client', 'nf.ControllerService', 'nf.ControllerServices', 'nf.UniversalCapture', 'nf.CustomUi'], - function ($, nfErrorHandler, nfCommon, nfDialog, nfClient, nfControllerService, nfControllerServices, nfUniversalCapture, nfCustomUi) { - return (nf.ReportingTask = factory($, nfErrorHandler, nfCommon, nfDialog, nfClient, nfControllerService, nfControllerServices, nfUniversalCapture, nfCustomUi)); + function ($, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfControllerService, nfControllerServices, nfUniversalCapture, nfCustomUi) { + return (nf.ReportingTask = factory($, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfControllerService, nfControllerServices, nfUniversalCapture, nfCustomUi)); }); } else if (typeof exports === 'object' && typeof module === 'object') { module.exports = (nf.ReportingTask = @@ -37,6 +38,7 @@ require('nf.ErrorHandler'), require('nf.Common'), require('nf.Dialog'), + require('nf.Storage'), require('nf.Client'), require('nf.ControllerService'), require('nf.ControllerServices'), @@ -47,13 +49,14 @@ root.nf.ErrorHandler, root.nf.Common, root.nf.Dialog, + root.nf.Storage, root.nf.Client, root.nf.ControllerService, root.nf.ControllerServices, root.nf.UniversalCapture, root.nf.CustomUi); } -}(this, function ($, nfErrorHandler, nfCommon, nfDialog, nfClient, nfControllerService, nfControllerServices, nfUniversalCapture, nfCustomUi) { +}(this, function ($, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfControllerService, nfControllerServices, nfUniversalCapture, nfCustomUi) { 'use strict'; var nfSettings; @@ -243,6 +246,7 @@ var setRunning = function (reportingTaskEntity, running) { var entity = { 'revision': nfClient.getRevision(reportingTaskEntity), + 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(), 'component': { 'id': reportingTaskEntity.id, 'state': running === true ? 'RUNNING' : 'STOPPED' @@ -306,6 +310,7 @@ // ensure details are valid as far as we can tell if (validateDetails(updatedReportingTask)) { updatedReportingTask['revision'] = nfClient.getRevision(reportingTaskEntity); + updatedReportingTask['disconnectedNodeAcknowledged'] = nfStorage.isDisconnectionAcknowledged(); // update the selected component return $.ajax({ @@ -813,8 +818,9 @@ $.ajax({ type: 'DELETE', url: reportingTaskEntity.uri + '?' + $.param({ - version: revision.version, - clientId: revision.clientId + 'version': revision.version, + 'clientId': revision.clientId, + 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged() }), dataType: 'json' }).done(function (response) { http://git-wip-us.apache.org/repos/asf/nifi/blob/05a1d630/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-settings.js ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-settings.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-settings.js index 8c49a4d..2ba7952 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-settings.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-settings.js @@ -24,6 +24,7 @@ 'd3', 'nf.Client', 'nf.Dialog', + 'nf.Storage', 'nf.Common', 'nf.CanvasUtils', 'nf.ControllerServices', @@ -34,8 +35,8 @@ 'nf.ComponentState', 'nf.ComponentVersion', 'nf.PolicyManagement'], - function ($, Slick, d3, nfClient, nfDialog, nfCommon, nfCanvasUtils, nfControllerServices, nfErrorHandler, nfFilteredDialogCommon, nfReportingTask, nfShell, nfComponentState, nfComponentVersion, nfPolicyManagement) { - return (nf.Settings = factory($, Slick, d3, nfClient, nfDialog, nfCommon, nfCanvasUtils, nfControllerServices, nfErrorHandler, nfFilteredDialogCommon, nfReportingTask, nfShell, nfComponentState, nfComponentVersion, nfPolicyManagement)); + function ($, Slick, d3, nfClient, nfDialog, nfStorage, nfCommon, nfCanvasUtils, nfControllerServices, nfErrorHandler, nfFilteredDialogCommon, nfReportingTask, nfShell, nfComponentState, nfComponentVersion, nfPolicyManagement) { + return (nf.Settings = factory($, Slick, d3, nfClient, nfDialog, nfStorage, nfCommon, nfCanvasUtils, nfControllerServices, nfErrorHandler, nfFilteredDialogCommon, nfReportingTask, nfShell, nfComponentState, nfComponentVersion, nfPolicyManagement)); }); } else if (typeof exports === 'object' && typeof module === 'object') { module.exports = (nf.Settings = @@ -44,6 +45,7 @@ require('d3'), require('nf.Client'), require('nf.Dialog'), + require('nf.Storage'), require('nf.Common'), require('nf.CanvasUtils'), require('nf.ControllerServices'), @@ -60,6 +62,7 @@ root.d3, root.nf.Client, root.nf.Dialog, + root.nf.Storage, root.nf.Common, root.nf.CanvasUtils, root.nf.ControllerServices, @@ -71,7 +74,7 @@ root.nf.ComponentVersion, root.nf.PolicyManagement); } -}(this, function ($, Slick, d3, nfClient, nfDialog, nfCommon, nfCanvasUtils, nfControllerServices, nfErrorHandler, nfFilteredDialogCommon, nfReportingTask, nfShell, nfComponentState, nfComponentVersion, nfPolicyManagement) { +}(this, function ($, Slick, d3, nfClient, nfDialog, nfStorage, nfCommon, nfCanvasUtils, nfControllerServices, nfErrorHandler, nfFilteredDialogCommon, nfReportingTask, nfShell, nfComponentState, nfComponentVersion, nfPolicyManagement) { 'use strict'; @@ -119,6 +122,7 @@ 'version': version } }), + 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(), 'component': configuration }; @@ -435,6 +439,7 @@ 'version': 0 } }), + 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(), 'component': { 'type': reportingTaskType, 'bundle': reportingTaskBundle @@ -483,6 +488,7 @@ 'version': 0 } }), + 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(), 'component': { 'name': $('#registry-name').val(), 'uri': $('#registry-location').val(), @@ -533,6 +539,7 @@ var registryEntity = registriesData.getItemById(registryId); var requestRegistryEntity = { 'revision': nfClient.getRevision(registryEntity), + 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(), 'component': { 'id': registryId, 'name': $('#registry-name').val(), @@ -1481,8 +1488,9 @@ $.ajax({ type: 'DELETE', url: registryEntity.uri + '?' + $.param({ - version: revision.version, - clientId: revision.clientId + 'version': revision.version, + 'clientId': revision.clientId, + 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged() }), dataType: 'json' }).done(function (response) { http://git-wip-us.apache.org/repos/asf/nifi/blob/05a1d630/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-snippet.js ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-snippet.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-snippet.js index e5c3658..c4f4580 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-snippet.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-snippet.js @@ -21,24 +21,27 @@ if (typeof define === 'function' && define.amd) { define(['jquery', 'd3', + 'nf.Storage', 'nf.CanvasUtils', 'nf.Client'], - function ($, d3, nfCanvasUtils, nfClient) { - return (nf.Snippet = factory($, d3, nfCanvasUtils, nfClient)); + function ($, d3, nfStorage, nfCanvasUtils, nfClient) { + return (nf.Snippet = factory($, d3, nfStorage, nfCanvasUtils, nfClient)); }); } else if (typeof exports === 'object' && typeof module === 'object') { module.exports = (nf.Snippet = factory(require('jquery'), require('d3'), + require('nf.Storage'), require('nf.CanvasUtils'), require('nf.Client'))); } else { nf.Snippet = factory(root.$, root.d3, + root.nf.Storage, root.nf.CanvasUtils, root.nf.Client); } -}(this, function ($, d3, nfCanvasUtils, nfClient) { +}(this, function ($, d3, nfStorage, nfCanvasUtils, nfClient) { 'use strict'; var config = { @@ -102,6 +105,7 @@ */ create: function (snippet) { var snippetEntity = { + 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(), 'snippet': snippet }; @@ -125,7 +129,8 @@ var copySnippetRequestEntity = { 'snippetId': snippetId, 'originX': origin.x, - 'originY': origin.y + 'originY': origin.y, + 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged() }; return $.ajax({ @@ -145,7 +150,9 @@ remove: function (snippetId) { return $.ajax({ type: 'DELETE', - url: config.urls.snippets + '/' + encodeURIComponent(snippetId) + url: config.urls.snippets + '/' + encodeURIComponent(snippetId) + '?' + $.param({ + 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged() + }) }); }, @@ -157,6 +164,7 @@ */ move: function (snippetId, newGroupId) { var moveSnippetEntity = { + 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(), 'snippet': { 'id': snippetId, 'parentGroupId': newGroupId http://git-wip-us.apache.org/repos/asf/nifi/blob/05a1d630/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-variable-registry.js ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-variable-registry.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-variable-registry.js index 86590f6..d8057d9 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-variable-registry.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-variable-registry.js @@ -29,14 +29,15 @@ 'nf.CanvasUtils', 'nf.ErrorHandler', 'nf.Dialog', + 'nf.Storage', 'nf.Client', 'nf.Common', 'nf.ng.Bridge', 'nf.Processor', 'nf.ProcessGroup', 'nf.ProcessGroupConfiguration'], - function ($, d3, Slick, nfCanvas, nfCanvasUtils, nfErrorHandler, nfDialog, nfClient, nfCommon, nfNgBridge, nfProcessor, nfProcessGroup, nfProcessGroupConfiguration) { - return (nf.ComponentState = factory($, d3, Slick, nfCanvas, nfCanvasUtils, nfErrorHandler, nfDialog, nfClient, nfCommon, nfNgBridge, nfProcessor, nfProcessGroup, nfProcessGroupConfiguration)); + function ($, d3, Slick, nfCanvas, nfCanvasUtils, nfErrorHandler, nfDialog, nfStorage, nfClient, nfCommon, nfNgBridge, nfProcessor, nfProcessGroup, nfProcessGroupConfiguration) { + return (nf.ComponentState = factory($, d3, Slick, nfCanvas, nfCanvasUtils, nfErrorHandler, nfDialog, nfStorage, nfClient, nfCommon, nfNgBridge, nfProcessor, nfProcessGroup, nfProcessGroupConfiguration)); }); } else if (typeof exports === 'object' && typeof module === 'object') { module.exports = (nf.ComponentState = @@ -47,6 +48,7 @@ require('nf.CanvasUtils'), require('nf.ErrorHandler'), require('nf.Dialog'), + require('nf.Storage'), require('nf.Client'), require('nf.Common'), require('nf.ng.Bridge'), @@ -61,6 +63,7 @@ root.nf.CanvasUtils, root.nf.ErrorHandler, root.nf.Dialog, + root.nf.Storage, root.nf.Client, root.nf.Common, root.nf.ng.Bridge, @@ -68,7 +71,7 @@ root.nf.ProcessGroup, root.nf.ProcessGroupConfiguration); } -}(this, function ($, d3, Slick, nfCanvas, nfCanvasUtils, nfErrorHandler, nfDialog, nfClient, nfCommon, nfNgBridge, nfProcessor, nfProcessGroup, nfProcessGroupConfiguration) { +}(this, function ($, d3, Slick, nfCanvas, nfCanvasUtils, nfErrorHandler, nfDialog, nfStorage, nfClient, nfCommon, nfNgBridge, nfProcessor, nfProcessGroup, nfProcessGroupConfiguration) { 'use strict'; var lastSelectedId = null; @@ -1333,6 +1336,7 @@ version: processGroupRevision.version } }), + 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged(), variableRegistry: { processGroupId: processGroupId, variables: variables @@ -1373,7 +1377,9 @@ var deleteUpdateRequest = function (processGroupId, updateRequestId) { return $.ajax({ type: 'DELETE', - url: '../nifi-api/process-groups/' + encodeURIComponent(processGroupId) + '/variable-registry/update-requests/' + encodeURIComponent(updateRequestId), + url: '../nifi-api/process-groups/' + encodeURIComponent(processGroupId) + '/variable-registry/update-requests/' + encodeURIComponent(updateRequestId) + '?' + $.param({ + 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged() + }), dataType: 'json' }).fail(nfErrorHandler.handleAjaxError); }; http://git-wip-us.apache.org/repos/asf/nifi/blob/05a1d630/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-cluster-summary.js ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-cluster-summary.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-cluster-summary.js index 9a0acad..8bcbcab 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-cluster-summary.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-cluster-summary.js @@ -29,6 +29,7 @@ nf.ClusterSummary = factory(root.$); } }(this, function ($) { + var knownConnectionState = false; var clustered = false; var connectedToCluster = false; var connectedStateChanged = false; @@ -56,13 +57,25 @@ var clusterSummary = clusterSummaryResponse.clusterSummary; // see if the connected state changes - if (connectedToCluster !== clusterSummary.connectedToCluster) { - connectedStateChanged = true; + if (knownConnectionState === true) { + if (connectedToCluster !== clusterSummary.connectedToCluster) { + connectedStateChanged = true; + } + } else { + // if the state hasn't changed, but the node is disconnected treat it + // as the state changing + if (clusterSummary.clustered && !clusterSummary.connectedToCluster) { + connectedStateChanged = true; + } } - // establish the initial cluster state + + // establish the current cluster state clustered = clusterSummary.clustered; connectedToCluster = clusterSummary.connectedToCluster; + + // record that we have a known connection state + knownConnectionState = true; }); }, http://git-wip-us.apache.org/repos/asf/nifi/blob/05a1d630/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-dialog.js ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-dialog.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-dialog.js index 01a5411..f04aec5 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-dialog.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-dialog.js @@ -156,20 +156,30 @@ /** * Shows a message when disconnected from the cluster. */ - showDisconnectedFromClusterMessage: function () { + showDisconnectedFromClusterMessage: function (okHandler) { nfDialog.showOkDialog({ headerText: 'Cluster Connection', - dialogContent: 'This node is currently not connected to the cluster. Any modifications to the data flow made here will not replicate across the cluster.' + dialogContent: 'This node is currently not connected to the cluster. Any modifications to the data flow made here will not replicate across the cluster.', + okHandler: function () { + if (typeof okHandler === 'function') { + okHandler.call(this); + } + } }); }, /** * Shows a message when connected to the cluster. */ - showConnectedToClusterMessage: function () { + showConnectedToClusterMessage: function (okHandler) { nfDialog.showOkDialog({ headerText: 'Cluster Connection', - dialogContent: 'This node just joined the cluster. Any modifications to the data flow made here will replicate across the cluster.' + dialogContent: 'This node just joined the cluster. Any modifications to the data flow made here will replicate across the cluster.', + okHandler: function () { + if (typeof okHandler === 'function') { + okHandler.call(this); + } + } }); } }; http://git-wip-us.apache.org/repos/asf/nifi/blob/05a1d630/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-storage.js ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-storage.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-storage.js index 56785f3..155b844 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-storage.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-storage.js @@ -29,6 +29,8 @@ } }(this, function () { + var disconnectionAcknowledged = false; + // Store items for two days before being eligible for removal. var MILLIS_PER_DAY = 86400000; var TWO_DAYS = MILLIS_PER_DAY * 2; @@ -103,6 +105,18 @@ } }, + acknowledgeDisconnection: function () { + disconnectionAcknowledged = true; + }, + + resetDisconnectionAcknowledgement: function () { + disconnectionAcknowledged = false; + }, + + isDisconnectionAcknowledged: function () { + return disconnectionAcknowledged; + }, + /** * Stores the specified item. * http://git-wip-us.apache.org/repos/asf/nifi/blob/05a1d630/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/templates/nf-templates-table.js ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/templates/nf-templates-table.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/templates/nf-templates-table.js index 26dea4a..4bd0c31 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/templates/nf-templates-table.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/templates/nf-templates-table.js @@ -44,6 +44,8 @@ }(this, function ($, Slick, nfCommon, nfDialog, nfErrorHandler) { 'use strict'; + var isDisconnectionAcknowledged = false; + /** * Configuration object used to hold a number of configuration items. */ @@ -129,7 +131,9 @@ var deleteTemplate = function (templateEntity) { $.ajax({ type: 'DELETE', - url: templateEntity.template.uri, + url: templateEntity.template.uri + '?' + $.param({ + 'disconnectedNodeAcknowledged': isDisconnectionAcknowledged + }), dataType: 'json' }).done(function () { var templatesGrid = $('#templates-table').data('gridInstance'); @@ -226,7 +230,9 @@ /** * Initializes the templates list. */ - init: function () { + init: function (disconnectionAcknowledged) { + isDisconnectionAcknowledged = disconnectionAcknowledged; + // define the function for filtering the list $('#templates-filter').keyup(function () { applyFilter(); @@ -286,12 +292,11 @@ markup += '<div title="Download" class="pointer export-template icon icon-template-save"></div>'; } - // all DFMs to remove templates if (dataContext.permissions.canWrite === true) { markup += '<div title="Remove Template" class="pointer prompt-to-delete-template fa fa-trash"></div>'; } - // allow policy configuration conditionally if embedded in + // allow policy configuration conditionally if framed if (top !== window && nfCommon.canAccessTenants()) { if (nfCommon.isDefinedAndNotNull(parent.nf) && nfCommon.isDefinedAndNotNull(parent.nf.CanvasUtils) && parent.nf.CanvasUtils.isManagedAuthorizer()) { markup += '<div title="Access Policies" class="pointer edit-access-policies fa fa-key"></div>'; http://git-wip-us.apache.org/repos/asf/nifi/blob/05a1d630/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/templates/nf-templates.js ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/templates/nf-templates.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/templates/nf-templates.js index 59f9a7d..7067ed9 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/templates/nf-templates.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/templates/nf-templates.js @@ -21,27 +21,30 @@ if (typeof define === 'function' && define.amd) { define(['jquery', 'nf.Common', + 'nf.Dialog', 'nf.TemplatesTable', 'nf.ErrorHandler', 'nf.Storage'], - function ($, nfCommon, nfTemplatesTable, nfErrorHandler, nfStorage) { - return (nf.Templates = factory($, nfCommon, nfTemplatesTable, nfErrorHandler, nfStorage)); + function ($, nfCommon, nfDialog, nfTemplatesTable, nfErrorHandler, nfStorage) { + return (nf.Templates = factory($, nfCommon, nfDialog, nfTemplatesTable, nfErrorHandler, nfStorage)); }); } else if (typeof exports === 'object' && typeof module === 'object') { module.exports = (nf.Templates = factory(require('jquery'), require('nf.Common'), + require('nf.Dialog'), require('nf.TemplatesTable'), require('nf.ErrorHandler'), require('nf.Storage'))); } else { nf.Templates = factory(root.$, root.nf.Common, + root.nf.Dialog, root.nf.TemplatesTable, root.nf.ErrorHandler, root.nf.Storage); } -}(this, function ($, nfCommon, nfTemplatesTable, nfErrorHandler, nfStorage) { +}(this, function ($, nfCommon, nfDialog, nfTemplatesTable, nfErrorHandler, nfStorage) { 'use strict'; $(document).ready(function () { @@ -74,6 +77,36 @@ }; /** + * Verifies if the current node is disconnected from the cluster. + */ + var verifyDisconnectedCluster = function () { + return $.Deferred(function (deferred) { + if (top !== window && nfCommon.isDefinedAndNotNull(parent.nf) && nfCommon.isDefinedAndNotNull(parent.nf.Storage)) { + deferred.resolve(parent.nf.Storage.isDisconnectionAcknowledged()); + } else { + $.ajax({ + type: 'GET', + url: '../nifi-api/flow/cluster/summary', + dataType: 'json' + }).done(function (clusterSummaryResult) { + var clusterSummaryResponse = clusterSummaryResult; + var clusterSummary = clusterSummaryResponse.clusterSummary; + + if (clusterSummary.connectedToCluster) { + deferred.resolve(false); + } else { + nfDialog.showDisconnectedFromClusterMessage(function () { + deferred.resolve(true); + }); + } + }).fail(nfErrorHandler.handleAjaxError).fail(function () { + deferred.reject(); + }); + } + }).promise(); + }; + + /** * Initializes the templates table. */ var initializeTemplatesPage = function () { @@ -139,10 +172,10 @@ nfStorage.init(); // load the current user - loadCurrentUser().done(function () { + $.when(verifyDisconnectedCluster(), loadCurrentUser()).done(function (verifyDisconnectedClusterResult) { // create the templates table - nfTemplatesTable.init(); + nfTemplatesTable.init(verifyDisconnectedClusterResult); // load the table nfTemplatesTable.loadTemplatesTable().done(function () { http://git-wip-us.apache.org/repos/asf/nifi/blob/05a1d630/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/users/nf-users-table.js ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/users/nf-users-table.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/users/nf-users-table.js index 2dfaec9..48e56f3 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/users/nf-users-table.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/users/nf-users-table.js @@ -44,6 +44,8 @@ }(this, function ($, Slick, nfCommon, nfClient, nfErrorHandler) { 'use strict'; + var isDisconnectionAcknowledged = false; + /** * Configuration object used to hold a number of configuration items. */ @@ -72,11 +74,14 @@ var usersGrid = $('#users-table').data('gridInstance'); var usersData = usersGrid.getData(); var user = usersData.getItemById(userId); + var revision = nfClient.getRevision(user); // update the user $.ajax({ type: 'DELETE', - url: user.uri + '?' + $.param(nfClient.getRevision(user)), + url: user.uri + '?' + $.param($.extend({ + 'disconnectedNodeAcknowledged': isDisconnectionAcknowledged + }, revision)), dataType: 'json' }).done(function () { nfUsersTable.loadUsersTable(); @@ -170,6 +175,7 @@ // build the request entity var updatedGroupEntity = { 'revision': nfClient.getRevision(groupEntity), + 'disconnectedNodeAcknowledged': isDisconnectionAcknowledged, 'component': $.extend({}, groupEntity.component, { 'users': groupMembers }) @@ -208,6 +214,7 @@ // build the request entity var updatedGroupEntity = { 'revision': nfClient.getRevision(groupEntity), + 'disconnectedNodeAcknowledged': isDisconnectionAcknowledged, 'component': $.extend({}, groupEntity.component, { 'users': groupMembers }) @@ -277,6 +284,7 @@ var updatedUserEntity = { 'revision': nfClient.getRevision(userEntity), + 'disconnectedNodeAcknowledged': isDisconnectionAcknowledged, 'component': { 'id': userId, 'identity': userIdentity @@ -370,6 +378,7 @@ var updatedGroupoEntity = { 'revision': nfClient.getRevision(groupEntity), + 'disconnectedNodeAcknowledged': isDisconnectionAcknowledged, 'component': { 'id': groupId, 'identity': groupIdentity, @@ -414,7 +423,8 @@ 'revision': { 'version': 0 } - }) + }), + 'disconnectedNodeAcknowledged': isDisconnectionAcknowledged }; // handle whether it's a user or a group @@ -1234,7 +1244,9 @@ }; var nfUsersTable = { - init: function (configurableUsersAndGroups) { + init: function (configurableUsersAndGroups, disconnectionAcknowledged) { + isDisconnectionAcknowledged = disconnectionAcknowledged; + initUserDialog(); initUserPoliciesDialog(); initUserPoliciesTable();