Repository: nifi Updated Branches: refs/heads/master ae251c1a6 -> abaacfa5e
[NIFI-2721] update CS GoTo. This closes #998 Project: http://git-wip-us.apache.org/repos/asf/nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/abaacfa5 Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/abaacfa5 Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/abaacfa5 Branch: refs/heads/master Commit: abaacfa5e59c15cad642ec2bd7a1fbdb7bb3c925 Parents: ae251c1 Author: Scott Aslan <[email protected]> Authored: Fri Sep 9 12:13:43 2016 -0400 Committer: Matt Gilman <[email protected]> Committed: Fri Sep 9 12:31:46 2016 -0400 ---------------------------------------------------------------------- .../webapp/js/nf/canvas/nf-controller-service.js | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/nifi/blob/abaacfa5/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 c972d12..0350a16 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 @@ -1566,6 +1566,11 @@ nf.ControllerService = (function () { return referencedServices; }; + /** + * Track the current table + */ + var currentTable; + return { /** * Initializes the controller service configuration dialog. @@ -1720,8 +1725,11 @@ nf.ControllerService = (function () { * @argument {object} controllerServiceEntity The controller service */ showConfiguration: function (serviceTable, controllerServiceEntity) { + if (nf.Common.isUndefined(currentTable)){ + currentTable = serviceTable; + } var controllerServiceDialog = $('#controller-service-configuration'); - if (controllerServiceDialog.data('mode') !== config.edit) { + if (controllerServiceDialog.data('mode') !== config.edit || currentTable !== serviceTable) { // update the visibility $('#controller-service-configuration .controller-service-read-only').hide(); $('#controller-service-configuration .controller-service-editable').show(); @@ -1738,15 +1746,13 @@ nf.ControllerService = (function () { // calculate the correct uri var createdControllerService = response.component; if (nf.Common.isDefinedAndNotNull(createdControllerService.parentGroupId)) { - createdControllerServicesTable = $('#process-group-controller-services-table'); controllerServicesUri = config.urls.api + '/flow/process-groups/' + encodeURIComponent(createdControllerService.parentGroupId) + '/controller-services'; } else { - createdControllerServicesTable = $('#controller-services-table'); controllerServicesUri = config.urls.api + '/flow/controller/controller-services'; } // load the controller services accordingly - return nf.ControllerServices.loadControllerServices(controllerServicesUri, createdControllerServicesTable); + return nf.ControllerServices.loadControllerServices(controllerServicesUri, serviceTable); }, goToServiceDeferred: function () { return goToServiceFromProperty(serviceTable); @@ -1757,6 +1763,9 @@ nf.ControllerService = (function () { controllerServiceDialog.data('mode', config.edit); } + //track the current table + currentTable = serviceTable; + // reload the service in case the property descriptors have changed var reloadService = $.ajax({ type: 'GET',
